|
Guys,
We map printerconnections and 3 networkdrives with this script. The mapping of the networkdrives and the printers is done in the same way: We check the user's local groups "LOCAL groups are always SERVERNAMES in our naming convention" and the global groups "GLOBAL groups are always PRINTERNAMES or SHARENAMES in our naming convention" in these local groups. Now we get the servernames out of the local groups and the printer- and sharenames out of the globalgroups that reside in these local groups.
EG: User LEONARDB logs on and is a member of these local and global groups:
Global Groups for shares and printers = "GG" Local groups for servernames = "LG"
"GG"Printer10----------->"LG"Server1 "GG"Printer20----------->"LG"Server2 "GG"Workgroup----------->"LG"Server3 "GG"Project------------->"LG"Server4 "GG"Application--------->"LG"Server5
The script will try to match all the servernames from local groups with all the share- and/or printernames from the global groups. In this case the result when the script ends will be:
Added printerconnections: \\Server1\Printer10 \\Server2\Printer20
Mapped networkdrives: G:\\Server3\Workgroup Q:\\Server4\Projects S:\\Server5\Application
THE ONE REMAINING PROBLEM NOW IS that sometimes the workgroup mapping is for example mapped to the application mapping so the 3 mappings sometimes partially or all switch places "because users are in a lot more groups" and we want to script that possibility away.
PS: I COULD NOT UPLOAD THE FULL SCRIPT BECAUSE THE BUTTETIN BOARD SAID "Sorry, we do not permit this HTML tag: Parenthesis in HTML tag"
|