Add Utility Scripts/Remove Local Printers.ps1

This commit is contained in:
Gabe committed 2026-11-23 23:22:22 +00:00
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