How can I modify this PS script to delete local printers instead of network printers?
i found following script need opposite , delete local printers instead command delete printer doesn't start '\\'. please advise if know how. thanks!
$printers = get-wmiobject -class win32_printer
foreach ($printer in $printers)
{
#remove network printers
if($printer.name -ne $null -and $printer.name.startswith(“\\”))
{
$printer.delete()
}
}
sorry not fix or rewrite scripts found on network.
if not scripter find in company help.
you can use printer scripts found here "c:\windows\system32\printing_admin_scripts\en-us" manage local printers.
for more assistance no-technical users post in windows printing or windows general forum.
you can find dozens of scripts in gallery.
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment