No announcement yet.

Removing printers assigned with a script

  • Filter
  • Time
  • Show
Clear All
new posts

  • Removing printers assigned with a script

    A while back I created a vbs script to map printers on workstations on the LAN. I did this via GP. I created GPO and assigned a user group to it. It works very well and assigns the printers as written. The problem I am running into is that I have added new printers and removed others. When I remove the old ones from the script the printers are still mapped at logon. I deleted the printers manually, but still they come back. I have even gone into the registry on the workstations and deleted any reference to the printers and, again,they come back. Are the scripts stored locally on the workstations? What am I missing? Thanks for the help.

  • #2
    Re: Removing printers assigned with a script

    Run "gpresult" from a cmd prompt and see if there are other policies being applied. It seems to me that you may have printers mapped by another GPO that runs before the one you are editing.

    Please read this before you post:

    Quis custodiet ipsos custodes?


    • #3
      Re: Removing printers assigned with a script

      Are the new printers added correctly through the script?
      Technical Consultant

      MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
      "No matter how secure, there is always the human factor."

      "Enjoy life today, tomorrow may never come."
      "If you're going through hell, keep going. ~Winston Churchill"


      • #4
        Re: Removing printers assigned with a script

        When you manually try to remove the printer from a client, do you then get the message:
        "You either entered a printer name that was incorrect or the specified printer is no longer connected to the server. Click Help for more information" ?


        You wrote that you already manually deleted any reference to the printers from registry on one of the clients (and you were logged-on with an account that is member of that users group?). Still the printers are comming back. That means the old script is still being called, rename it.
        The GPO you added the previous script and that was assiged to a particular users group, are you still using that same GPO? Do run GPresults as been suggested by Andy.
        Last edited by Rems; 16th April 2008, 10:32.

        This posting is provided "AS IS" with no warranties, and confers no rights.


        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts


        • #5
          Re: Removing printers assigned with a script

          What sometimes does the trick is the following:

          NET STOP "Print Spooler"
          Go to this folder: C:\WINDOWS\system32\spool\PRINTERS
          Delete the files in this folder (To be sure check google for the extension if you could delete those or use a reference computer)
          NET START "Print Spooler"

          Check if the printer is still available if so try to delete it.