discoveranother Posted October 1, 2019 Posted October 1, 2019 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
LTurner3692 Posted October 1, 2019 Posted October 1, 2019 You can use GPO to remove old drive mappings 1
jthompson Posted October 1, 2019 Posted October 1, 2019 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 1
Zourous Posted October 2, 2019 Posted October 2, 2019 Deleting printer drivers in windows 7 https://www.edugeek.net/showthread.php?t=108186 One of my old posts, might help 1
XiJ Posted October 2, 2019 Posted October 2, 2019 Mappings I would delete using GPP. I’m sure I used to have a local printer removal script too.
discoveranother Posted October 3, 2019 Author Posted October 3, 2019 Thanks for all the replies guys. I plan on using GPO to install the mapped drives and printers, but now sure where to use GPO to remove existing ones. Thanks all
Koldov Posted October 3, 2019 Posted October 3, 2019 (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... EDIT: YMMV, UAYOR, etc.... EDIT2: TEST, TEST, TEST! Edited October 3, 2019 by Koldov
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now