by fjumayao at 2013-04-05 08:53:55
Headstart PS User here, hoping to move up to Kindergarten in a few weeks…by MasterOfTheHat at 2013-04-05 09:26:37
Been Googling this but have not found a specific answer, can I delete a tcpip/local printer remotely with powershell?
Should be able to! Take a look here: http://technet.microsoft.com/en-us/library/dd347648.aspx and here: http://technet.microsoft.com/en-us/library/hh849719.aspxby Nobody at 2013-04-05 09:32:12
You’ll basically include the syntax from the first link as the ScriptBlock parameter in the Invoke-Command cmdlet from the second link. I’m sure someone out here has real-world experience with it, too.
You can use Get-WMIObject to get the printer object from the remote computer, then use the delete method of the object to delete the printer.by fjumayao at 2013-04-05 10:45:11
$a = get-wmiobject -computername computer -query “SELECT * FROM win32_printer WHERE name = ‘PrinterName’”
Worked like a charm - awesome!
Thank you for the prompt reply and the assistance.