|
Hey guys,
This is my first post on this forum, hope I am posting in the right section.
My question is:
Is it possible to extract numbers from %logonserver% and use those numbers to map network drives?
Situation is as follows:
I have roaming users on a school network. Depending on what school they are at, will depend on what network drives I would like mapped. I have decided that the best unique identifier would be their logonserver. Each school has a domain controller and a file/print server. The first few digits of the logonserver are the same digits on the FNP server.
So what I would like is something like the following:
%logonserver% = 1234DC01
I would like to use the 1234 in the example above to map drives: use M: \\1234fnp01\data
If the logonserver has 5 digits e.g. 12345, I would like to use that also.
I want to avoid doing the following: IF %logonserver% = 1234dc01 use m: \\1234fnp01\data IF %logonserver% = 13456 use m: \\13456\data
Reason being is that they have close to 100 domain controllers and the script will not look very nice and probably take a while to run. I would like to just query the logonserver for the numbers I need and map drives based on that.
Hope I am clear in the description...
Thanks in advance...
|