|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I am currently using this script to map network drives based on group
membership. http://www.microsoft.com/technet/scr...4/hey1210.mspx I now need to modify it so it is also based on the location of the computer. For instance we have a remote site that uses a ISDN connection and I dont want the drive mapings to happen accros this link, instead I would like the drive mappings to go to the local server and not accross the ISDN line. So if the user belongs to group a and the ip is 192.168.36.1 then they map H to server1\folders And then if the user is in group a and the ip is 192.168.56.1 then they map H to server2\folders Let me know if anyone can me or point me in the right direction. I hope all it is to just add a couple of lines in the script I am already using. Thank you bthompson@dhmh.state.md.us |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Bryan wrote:
>I am currently using this script to map network drives based on group >membership. > http://www.microsoft.com/technet/scr...4/hey1210.mspx > > I now need to modify it so it is also based on the location of the > computer. For instance we have a remote site that uses a ISDN connection > and I dont want the drive mapings to happen accros this link, instead I > would like the drive mappings to go to the local server and not accross > the ISDN line. > > So if the user belongs to group a and the ip is 192.168.36.1 then they map > H to server1\folders > And then if the user is in group a and the ip is 192.168.56.1 then they > map H to server2\folders > > Let me know if anyone can me or point me in the right direction. I > hope all it is to just add a couple of lines in the script I am already > using. > > Thank you > bthompson@dhmh.state.md.us Retrieving IP address can get complex. One solution could be to use Computer account group membership. All computers in a subnet could be made members of a group, then test for computer object group membership. Another option is to retrieve the Site from AD. You can use properties of the ADSystemInfo object for this. The Distinguished Name of the current computer is objSysInfo.ComputerName. The name of the current site is objSysInfo.SiteName. -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net -- |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
"Richard Mueller [MVP]" <rlmueller-nospam@ameritech.nospam.net> wrote in message news:%23J$Mck2CIHA.2324@TK2MSFTNGP03.phx.gbl... > Bryan wrote: > >>I am currently using this script to map network drives based on group >>membership. >> http://www.microsoft.com/technet/scr...4/hey1210.mspx >> >> I now need to modify it so it is also based on the location of the >> computer. For instance we have a remote site that uses a ISDN connection >> and I dont want the drive mapings to happen accros this link, instead I >> would like the drive mappings to go to the local server and not accross >> the ISDN line. >> >> So if the user belongs to group a and the ip is 192.168.36.1 then they >> map H to server1\folders >> And then if the user is in group a and the ip is 192.168.56.1 then they >> map H to server2\folders >> >> Let me know if anyone can me or point me in the right direction. I >> hope all it is to just add a couple of lines in the script I am already >> using. >> >> Thank you >> bthompson@dhmh.state.md.us > > Retrieving IP address can get complex. One solution could be to use > Computer account group membership. All computers in a subnet could be made > members of a group, then test for computer object group membership. > Another option is to retrieve the Site from AD. > > You can use properties of the ADSystemInfo object for this. The > Distinguished Name of the current computer is objSysInfo.ComputerName. The > name of the current site is objSysInfo.SiteName. > > -- > Richard Mueller > Microsoft MVP Scripting and ADSI > Hilltop Lab - http://www.rlmueller.net > -- If AD sites are not granular enough, I believe there is also a way to uad ADSystemInfo to determine the subnet a computer is located in. /Al |
|
![]() |
| Outils de la discussion | |
|
|