Files
Powershell-Scripts/Fix Scripts/Fix - Remove all WSD Ports.ps1
T

13 lines
375 B
PowerShell
Raw Normal View History

2025-08-06 17:54:16 +00:00
$WSD = @()
$printername = Get-Printer | Where-Object { $_.Portname -like "*WSD*" } | Select-Object -ExpandProperty Name
Add-PrinterPort -Name "LocalPort:"
Get-Printer $printername | Set-Printer -PortName "LocalPort:"
Restart-Service Spooler
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\WSD Port" /f
Start-Service Spooler