win7 printerdriver removal

Welcome Forums General PowerShell Q&A win7 printerdriver removal

This topic contains 6 replies, has 4 voices, and was last updated by

 
Participant
1 year, 2 months ago.

  • Author
    Posts
  • #80972

    Participant
    Points: 1
    Rank: Member

    I need a script to look at all printers find the ones with printdriver from company "x" and remove the driver and the printer.

    for win8 and newer I see remove-printer and remove-printdriver... any ideas for win 7 how I can do this in POSH

    thanks as always

  • #80977

    Participant
    Points: 22
    Rank: Member

    You probably could pull this info using WMI or CIM. You could then remove the driver using that info but I don't know if you can actually uninstall the printer.

    • #80980

      Participant
      Points: 1
      Rank: Member

      I didn't see a method to remove the driver.. any examples?

    • #80983

      Participant
      Points: 22
      Rank: Member

      Take a look at

      Get-CimInstance -ClassName Win32_PrinterDriver

      , there are some fields that give you a path to the driver files you could delete using

      Remove-Item
  • #81098
    js

    Participant
    Points: 320
    Helping Hand
    Rank: Contributor

    If it's a 3rd party driver, you can try looking for it with pnputil.

    • #81125

      Participant
      Points: 23
      Rank: Member

      Hello scott s,
      Update your powershell version on your windows 7.
      You will be able to use Get-PrinterDriver & Remove-PrinterDriver
      BR
      Laurent.

    • #81128

      Participant
      Points: 1
      Rank: Member

      Those 2 commands are not for win7, just 8 and up.

      But thanks to everyone I got it figured out

The topic ‘win7 printerdriver removal’ is closed to new replies.