PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.win.server.scripting > Map drives based on IP of computers
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Map drives based on IP of computers

Réponse
 
LinkBack Outils de la discussion
Vieux 10/10/2007, 18h35   #1
Bryan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Map drives based on IP of computers

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



  Réponse avec citation
Vieux 10/10/2007, 19h12   #2
Richard Mueller [MVP]
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Map drives based on IP of computers

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
--


  Réponse avec citation
Vieux 12/10/2007, 19h06   #3
Al Dunbar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Map drives based on IP of computers


"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


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h52.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13681 seconds with 11 queries