{"id":"4E5GysHSHB","url":"https://pastebin.ca/4E5GysHSHB","raw_url":"https://raw.anybin.ca/4E5GysHSHB","visibility":"public","access":"public","created_at":1795377172484,"expires_at":1795981972484,"fetch_limit":null,"fetches_used":0,"reads_remaining":null,"size_bytes":897,"syntax_hint":null,"title":null,"filename":null,"change_note":null,"cipher":null,"cipher_meta":null,"parent_id":null,"root_id":"4E5GysHSHB","version":1,"owner_id":null,"recipient_id":null,"body":"$Url  = 'http://HP48EA62BF714A.local:631/ipp/print'\n$Name = 'HP Envy 6500e'\n\n# Remove phantom queue node and any re-created IPP pairing (spooler running)\nRestart-Service Spooler -Force; Start-Sleep 3\nGet-PnpDevice | Where-Object {\n    ($_.InstanceId -like 'SWD\\PRINTENUM\\*' -and $_.FriendlyName -match 'Envy|6500') -or\n    $_.InstanceId -like 'SWD\\IPP\\E7483655*' -or\n    $_.InstanceId -like 'SWD\\PRINTENUM\\WSD-48A8B836*'\n} | ForEach-Object { pnputil /remove-device \"$($_.InstanceId)\" }\nRestart-Service Spooler -Force; Start-Sleep 5\n\n# Add over IPP, verify, print\nAdd-Printer -Name $Name -IppURL $Url\nStart-Sleep 5\n$p = Get-Printer -Name $Name\n$p | Format-List Name,DriverName,PortName,PrinterStatus\nif ($p -and $p.PortName -notlike 'WSD-*') {\n    Get-CimInstance Win32_Printer -Filter \"Name='$Name'\" | Invoke-CimMethod -MethodName PrintTestPage | Out-Null\n    \"SUCCESS: test page sent over IPP.\"\n}"}