diff --git a/Utility Scripts/Remove Local Printers.ps1 b/Utility Scripts/Remove Local Printers.ps1 new file mode 100644 index 0000000..ea5caca --- /dev/null +++ b/Utility Scripts/Remove Local Printers.ps1 @@ -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 \ No newline at end of file