factory null

ferns-background

gallery

projects

adventures

sysadmin

about

oneilldle

Silly projects. Photos. System Administration.



8 May 2022

Finding WSD Printers with Powershell

by Steve O'Neill

WSD, or Web Services for Devices, is a printer port monitor that was developed by Microsoft around the time Vista was released. It doesn’t have a good reputation with system administrators - I’ve heard some try to disable it in the firmware of every printer that gets purchased in their company - but it seems to have applications that are useful outside of the enterprise.

Either way, you might find it useful to audit the WSD printers in your organization someday. Maybe you have just added a print server (or started using Universal Print). Or maybe you are merging with another department and want to do some discovery on what you need to start managing.

Here are a few lines of Powershell I wrote after not finding anything else online:

Get-ChildItem -Path Registry::\HKLM\SYSTEM\CurrentControlSet\Enum\SWD\DAFWSDProvider -ErrorAction SilentlyContinue | Get-ItemProperty | Select-Object LocationInformation,Mfg,FriendlyName | Sort-Object -Property LocationInformation,Mfg,FriendlyName | Get-Unique -AsString

Here is the output:

LocationInformation Mfg FriendlyName
------------------- --- ------------
http://10.0.0.157:3911/ HP HP3D9932 (HP OfficeJet Pro 6960)
http://192.168.1.142:3911/ HP HP69791D.hsd1.ma.comcast.net (HP OfficeJet Pro 8020 series)

As shown above, querying for the IP addresses of WSD printers is not as simple as getting the IPs of regular TCP/IP printers, which can be viewed by the following simple command:

Get-Printer | select Name,PortName,DriverName

If you have a way of deploying this script to users’ computers, you can get some pretty interesting reporting of what network printers have been installed locally. Just keep in mind that home printers may be included in whatever results come back - so stay respectful of privacy.

tags: windows

⇠ Logging radio traffic with the AssemblyAI API

Using RSAT Tools with Custom Taskpads ⇢



Other links:

  • Using RSAT Tools with Custom Taskpads

  • Finding WSD Printers with Powershell

  • Logging radio traffic with the AssemblyAI API

  • Anodizing @ Home (2017 archive)

  • Simple PXE Server with CentOS and PartedMagic

  • Cobbler for Bare Metal Provisioning

  • Berkshire Epic