Remove network printer

Comments

4 comments

  • Stephen Valdinger

    Powershell:

    Get-Printer | Where-object $_.Name -Like "Third Floor b/w letterhead HP 4050"  } | Remove-Printer
    0
    Comment actions Permalink
  • Zillafan44

    These workstations are Windows 7 with Powershell 2.  Get-Printer won't work.

    0
    Comment actions Permalink
  • Stephen Valdinger

    Well step one should be to install Powershell 5 then! 

    But in all seriousness:

    Get-WMIObject win32_Printer | Where {$_.Name -like '*Third floor b/w letter*' } | Foreach-Object {$_.Delete() }
    0
    Comment actions Permalink
  • Sean AuYoung

    Hi Stephen,

    I've tried running your script locally and it works.  However, I cannot get it to work through PDQ Deploy.  Would you be able to help?

    0
    Comment actions Permalink

Please sign in to leave a comment.