Jump to content

Recommended Posts

Posted

Hi all,

 

Looking for a script of some sort whereby I can delete old mapped drives and printers when a user logs in on a domain. I will be transferring to a new renamed server and want the old drive mappings and printers to be deleted as the user logs on for example and picks up the new mappings via the new server GPO. I don't want the old mappings on their existing machines to still show when they log in. Sometimes I have noticed this and had to delete them manually on a notebook for instance and then the new mappings get picked up or sometimes the old mappings still show along with the old ones on a users notebook for example and confuses the user.

 

Thanks all

Posted

Not sure about the printers, but to delete a drive mapping in a logon script, you can use:

net use x: /d

Where x is the drive letter.

 

If that interferes with the new drive mapping from the GPO, you can add this to the logon script:

net use x: \\path\to\new
  • Thanks 1
Posted (edited)

I might not be able to help you with the finer detail as these things can become complicated depending on who has what drive mappings/printers installed, why and how they are given out!

 

However, on the printer side of things, we found that a number of staff had found a particular MFD that they were not supposed to be using and had installed it themselves using the 'add printer wizard'... Possibly there were a number of things I could have done to prevent this, but that's another story...

 

Ultimately I took a heavy handed approach and after unticking 'list in the Directory' I added a delete all GPP setting in the printer GPO for all the teachers as 1st priority. This is a USER GP as our printers are installed depending on who somebody is and not where they are.

 

Now, this does mean they may lose their printers every time GP is refreshed, but I have only had one teacher complain. I possibly could have mitigated this by ticking 'apply once' in the GPP settings or something, but I need this to apply regularly in case they find a way to get the MFD installed again. I also could have directed the GPP to only unistall that particular MFD as 1st priority, but as it was also the beginning of the year many teachers and TA's had moved year groups and needed each year group printer removed also (as these are budgeted per year group).

 

Drive mappings GPP has similar options (something about deleting drive letters starting from X,Y,Z), but again you are going to have to know who has what share mapped to what drive letter...

 

Printer GPP.jpg

 

EDIT: YMMV, UAYOR, etc....

 

EDIT2: TEST, TEST, TEST!

Edited by Koldov

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...