Map drive

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to create a group policy and script to control the mapping of
a network drives based on where the user is located ( organizational unit
(OU) or child OU. can anyone please advise how to do this
 
Al Sayegh wrote:
Hi,
I'm trying to create a group policy and script to control the mapping
of a network drives based on where the user is located (
organizational unit (OU) or child OU. can anyone please advise how
to do this

With adsi you can read the ou containing the userobject and use this in your
script as condition for mapping a network drive.

Set objADSysInf = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objADSysInf.UserName)
Set objOU = GetObject(objUser.parent)
WScript.Echo objOU.distinguishedName

HTH
Norbert
 
An alternative strategy to the one described by Norbert is to use a custom
administrative template, such as the one at
www.willowhayes.co.uk/download/drives.adm

Be sure to untick "Only show group policy settings that can be fully
managed" in the filtering menu, otherwise the policies won't show up. Also,
leave the "connect as" field blank.

As always, test this out in a lab or in an isolated OU before rolling it out
fully.

Hope this helps

Oli
 
Back
Top