I am trying to figure out a way to write a login script that would map certain network drives, depending on which OU that user belonged to, and make them appear in that users network locations list. I’m thinking some kind of IF THEN statements. I just haven’t done much scripting.<\/p>\n
Any help would be greatly appreciated. Thanks!<\/p>","upvoteCount":3,"answerCount":8,"datePublished":"2015-02-27T20:22:09.000Z","author":{"@type":"Person","name":"jeremycrites","url":"https://community.spiceworks.com/u/jeremycrites"},"acceptedAnswer":{"@type":"Answer","text":"
Why don’t you just make Group Policies for each OU that maps the specific drives you want?<\/p>","upvoteCount":7,"datePublished":"2015-02-27T20:26:06.000Z","url":"https://community.spiceworks.com/t/scripting/383650/2","author":{"@type":"Person","name":"jimmy-t","url":"https://community.spiceworks.com/u/jimmy-t"}},"suggestedAnswer":[{"@type":"Answer","text":"
I am trying to figure out a way to write a login script that would map certain network drives, depending on which OU that user belonged to, and make them appear in that users network locations list. I’m thinking some kind of IF THEN statements. I just haven’t done much scripting.<\/p>\n
Any help would be greatly appreciated. Thanks!<\/p>","upvoteCount":3,"datePublished":"2015-02-27T20:22:09.000Z","url":"https://community.spiceworks.com/t/scripting/383650/1","author":{"@type":"Person","name":"jeremycrites","url":"https://community.spiceworks.com/u/jeremycrites"}},{"@type":"Answer","text":"
Exactly - that’s what group policies are for. There are very few things you need logon scripts for any more.<\/p>","upvoteCount":1,"datePublished":"2015-02-27T20:31:50.000Z","url":"https://community.spiceworks.com/t/scripting/383650/3","author":{"@type":"Person","name":"joewilliams","url":"https://community.spiceworks.com/u/joewilliams"}},{"@type":"Answer","text":"
I was thinking about that because it seemed like an easier way to manage it all. One of the companies we are bringing over had everything written in scripts but since we are bringing them over to our domain I will probably just do this with GP. Thanks!<\/p>","upvoteCount":0,"datePublished":"2015-02-27T20:33:42.000Z","url":"https://community.spiceworks.com/t/scripting/383650/4","author":{"@type":"Person","name":"jeremycrites","url":"https://community.spiceworks.com/u/jeremycrites"}},{"@type":"Answer","text":"
Jimmy T is right use Group policies that’s the best practice<\/p>","upvoteCount":1,"datePublished":"2015-02-27T20:37:53.000Z","url":"https://community.spiceworks.com/t/scripting/383650/5","author":{"@type":"Person","name":"ricardoarias","url":"https://community.spiceworks.com/u/ricardoarias"}},{"@type":"Answer","text":"
Hi Jeremy,<\/p>\n
I sort of agree with Jeremy here, why not just use GP and GP Preferences to map the drives?<\/p>\n
It is interesting exercise from a learning perspective… how to use get-ADUser how to trim the distinguishedname etc. some really good tasks to learn the logic flow of the script. But for this… it is already pretty much built into GP. No reason to reinvent the wheel unless you have a use case for it.<\/p>\n
Kevin<\/p>","upvoteCount":0,"datePublished":"2015-02-27T21:00:37.000Z","url":"https://community.spiceworks.com/t/scripting/383650/6","author":{"@type":"Person","name":"configureitout","url":"https://community.spiceworks.com/u/configureitout"}},{"@type":"Answer","text":"
I would agree on GPO usage. That being said, I still have some legacy kix scripts kicking around, which is pretty easy for mapping drives.<\/p>","upvoteCount":0,"datePublished":"2015-02-28T14:24:05.000Z","url":"https://community.spiceworks.com/t/scripting/383650/7","author":{"@type":"Person","name":"timvan007","url":"https://community.spiceworks.com/u/timvan007"}},{"@type":"Answer","text":"
Mapping a user to a specific user folder using Group Policy<\/p>\n
Is it possible to map a shared drive and only alloy the logged on user to access their own folder. In Group Policy I have tried the location as \\servername\\users%username% and %logonuser% but its not seeming to work. Any suggestions? Should I post this as the heading of a new thread? Thanks<\/p>","upvoteCount":0,"datePublished":"2015-03-13T21:23:19.000Z","url":"https://community.spiceworks.com/t/scripting/383650/8","author":{"@type":"Person","name":"jeremycrites","url":"https://community.spiceworks.com/u/jeremycrites"}}]}}