that sounds much better is there a remove post button somewhere?
On Mar 11, 2004, at 2:29 PM, Gil Kirkpatrick wrote:
<x-tad-smaller>Try DsAddressToSiteNames() from the platform SDK.</x-tad-smaller>Brent Westmoreland
�
<x-tad-smaller>-gil</x-tad-smaller>
�
<x-tad-smaller>Gil Kirkpatrick</x-tad-smaller>
<x-tad-smaller>CTO, NetPro</x-tad-smaller>
<x-tad-smaller>Author of "Active Directory Programming"</x-tad-smaller>
�
<x-tad-smaller>Don't miss the Directory Experts Conference</x-tad-smaller>
<x-tad-smaller>March 21-24 Reston, VA</x-tad-smaller>
<x-tad-smaller>April 25-28 Amsterdam, the Netherlands</x-tad-smaller>
<x-tad-smaller>http://www.netpro.com/events</x-tad-smaller>
<x-tad-smaller>-----Original Message-----</x-tad-smaller>
<x-tad-smaller>From:</x-tad-smaller><x-tad-smaller> [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] </x-tad-smaller><x-tad-smaller>On Behalf Of </x-tad-smaller><x-tad-smaller>Brent Westmoreland</x-tad-smaller>
<x-tad-smaller>Sent:</x-tad-smaller><x-tad-smaller> Thursday, March 11, 2004 12:19 PM</x-tad-smaller>
<x-tad-smaller>To:</x-tad-smaller><x-tad-smaller> [EMAIL PROTECTED]</x-tad-smaller>
<x-tad-smaller>Subject:</x-tad-smaller><x-tad-smaller> Re: [ActiveDir] VB Script</x-tad-smaller>
<Quick and dirty> prints out all of the subnets in the domain and their associated site.<Quick and Dirty>
Adapted from Robbie Allen's Active Directory Cookbook by O'Rielly Press
set objRootDSE = GetObject("LDAP://RootDSE")
set objSubnetsCont = GetObject("LDAP://cn=subnets,cn=sites," & _
objRootDSE.Get("configurationNamingContext") )
objSubnetsCont.Filter = Array("subnet")
for each objSubnet in objSubnetsCont
Wscript.Echo " " & objSubnet.Get("cn")& ";" & objSubnet.Get("SiteObject")
next
On Mar 11, 2004, at 1:55 PM, <[EMAIL PROTECTED]> wrote:
Using VBS and Active Directory, given an ip address, I want to be able to tell what site that ip address is associated with. �I have looked at the iadsTools but not found anything for easily doing that and have checked the Script Center for something like that. �I can read the subnets out of AD and attempt to parse thru it but there has to be an easier way to do this. �
Any ideas
Thanks
Mark Hocraffer
Rockwell Collins
Brent Westmoreland
BMW Group - Data Center Americas
Business: 864.989.6567
BMW Group - Data Center Americas
Business: 864.989.6567
