hi all,
if I go on my test computer and try this script, it works and the print queue is set in windows:
$Printer = "\\PrintServer\Queue"
$net = new-object -com wscript.network
$net.AddWindowsPrinterConnection($Printer)
now if I try the same remotely, using the next script, it says that the printer name is not valid.
$sb = {$Printer = "\\PrintServer\Queue"
$net = new-object -com wscript.network
$net.AddWindowsPrinterConnection($Printer)}
invoke-command -computername PCName -scriptblock $sb
can someone tell me what is wrong here? I'm using a domain user account and I have access to the print queue.
thanks!