win7 printerdriver removal

This topic contains 6 replies, has 4 voices, and was last updated by  scott s 1 week, 6 days ago.

  • Author
    Posts
  • #80972

    scott s
    Participant

    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

    Bill Kindle
    Participant

    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

      scott s
      Participant

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

    • #80983

      Bill Kindle
      Participant

      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

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

    • #81125

      Laurent Maene
      Participant

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

    • #81128

      scott s
      Participant

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

      But thanks to everyone I got it figured out

You must be logged in to reply to this topic.