I am trying to add printers remotely with Add-Printer. When I use the command locally it works, but when I try to run it remotely it says the server or printer name is invalid.
add-printer -ConnectionName '\\servername\old printer' -this works
icm computername {add-printer -connectionname '\\servername\old printer'} -credential domain\username -this does not work
add-printer : The specified server does not exist, or the server or printer name is invalid. Names may not contain
',' or '\' characters.
At line:1 char:1
+ add-printer -ConnectionName '\\servername\old printer\'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_Printer:ROOT/StandardCimv2/MSFT_Printer) [Add-Printer], CimException
+ FullyQualifiedErrorId : HRESULT 0x80070709,Add-Printer