I notice a Type property that seems to be set to "Local" for local printers (-Name set), maybe you could check that and put -Name or -ComputerName in the glob hash as appropriate?
@MichaelFrank Oh, it's globbing? The vast majority of the parameters in the output of Get-Printer only correspond to the complicated parameter sets of Add-Printer
I think the safest bet in terms of PowerShell being able to decide a single parameter set is -Name, but from skimming the documentation it looks like -ConnectionName and -Name don't mean the same thing
For which specifying -ConnectionName (first, simple set) or -Name (third, more featureful set) rather than passing the name as a positional parameter should work
If you've already rebooted the machine or reopened the command prompt, maybe the path is too long and getting truncated? Though I'm on Windows 10 and my path seems to be well over 2000 characters with no problems
You could have a variable that's initially $false and gets set to $true after one iteration of the loop, then pass -HideTableHeaders:$showedHeaders to Format-Table
Without anything to explicitly say "put this stuff on the screen", we were relying on the default printing after the output eventually falls out the pipeline
Hmm, if you sprinkle Write-Host lines around, do they execute in the expected order? Maybe put one before the for-each, one inside the for-each, and one before the sleep