Add Utility Scripts/Remove Local Printers.ps1
This commit is contained in:
1 parent
e61453957d
commit
73ed9c78a3
1 file changed
+8
@@ -0,0 +1,8 @@
|
|||||||
|
$Printername = Get-Printer | Where-Object { $_.Type -like "*Local*" -and $_.Name -notlike "*OneNote*" -and $_.Name -notlike "*Fax*" -and $_.Name -notlike "*Microsoft*" }
|
||||||
|
$Printername | ForEach-Object {
|
||||||
|
Remove-Printer -Name $_.Name -Confirm:$false -Verbose
|
||||||
|
}
|
||||||
|
|
||||||
|
$Printers = Get-Printer | Select-Object -ExpandProperty Name
|
||||||
|
Write-Host "Remaining printers:"
|
||||||
|
Write-Output $Printers
|
||||||
Reference in new issue
Block a user