Remove network printer
Will Donovan
Trying to remove a printer installed from a printer server. Using the following in the only step in the package:
%WINDIR%\System32\Printui.exe /gd /q /n"\\Server_Name\Third Floor b/w letterhead HP 4050"
NET STOP SPOOLER
NET START SPOOLER
The package runs without error but the printer is never removed.
Tried running as the Deploy User or the Logged in User. Makes no difference.
0
Comments
Powershell:
These workstations are Windows 7 with Powershell 2. Get-Printer won't work.
Well step one should be to install Powershell 5 then!
But in all seriousness:
Get-WMIObject win32_Printer | Where {$_.Name -like '*Third floor b/w letter*' } | Foreach-Object {$_.Delete() }Hi Stephen,
I've tried running your script locally and it works. However, I cannot get it to work through PDQ Deploy. Would you be able to help?