I am unable to run an invoke-command script to install printers on a remote machine. My code works locally, but as soon as I pipe it into Invoke-command, i get errors. Local: $Printer = "\\server1\printer1" (New-Object -Com Wscript.Network).AddWindowsPrinterConnection($Printer) And this adds the printer just fine. I can do this same [...] read more
I have a new wsd capable printer. Users can just discover it on the local network and add it and it works great. How can I push this out to these users with a GPO- so they don't have to discover the printer and add it themselves? I don't want [...] read more
I have multiple text documents with each line a shared printer in the format: > \\pserver.company.com\printername0 > \\pserver.company.com\printername1 > \\pserver.company.com\printername2 I want to automate the installation of these lists of printers, preferably with PowerShell. My goal is to get the content of the text and for each line add the [...] read more
I backed up printers from a Windows 10 system to XML files. I'm trying to add them using the Set-Printconfiguration CMDLET, but it seems to be not accepting variables? I've looked everywhere but I cannot find anything saying my syntax is wrong. #get list of printers in backup folder $printerNames [...] read more
I am trying to use Get-PrintConfiguration on a networked printer but for some reason it returns this error > Get-PrintConfiguration : The specified printer was not found. At > line:1 char:1 > + Get-PrintConfiguration -PrinterName "Printer1" > + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + CategoryInfo : NotSpecified: > (MSFT_PrinterConfiguration:ROOT/StandardCi...erConfiguration) > [Get-PrintConfiguration], CimException + [...] read more
I have gone through many blogs for finding solution for this issue, but never find a solution. $CompName = "test.domain.com" $Printer = "\\122.21.10.11\PRINTER-NAME-1" Invoke-Command -ComputerName $CompName -Scriptblock { Param($p) (New-Object -Com Wscript.Network).AddWindowsPrinterConnection($p) } -ArgumentList $Printer I have even tried PSRemoting and tried to execute the ps1 file from remote machine. [...] read more