WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How can I query a user's active directory site name?

 
   Home -> Windows Other -> Active Directory RSS
Next:  What is the securest browser for shopping on wind..  
Author Message
Ojas

External


Since: Dec 27, 2008
Posts: 2



(Msg. 1) Posted: Sat Dec 27, 2008 7:13 pm
Post subject: How can I query a user's active directory site name?
Archived from groups: microsoft>public>win2000>active_directory (more info?)

What is the best way to programmatically query a user's active
directory site name?
Back to top
Login to vote
Richard Mueller [MVP]

External


Since: Feb 25, 2007
Posts: 93



(Msg. 2) Posted: Sun Dec 28, 2008 10:41 am
Post subject: Re: How can I query a user's active directory site name? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Ojas" <ojasrege.DeleteThis@yahoo.com> wrote in message
news:e59767f5-71b6-40aa-8270-0986fb3b7f5c@d42g2000prb.googlegroups.com...
> What is the best way to programmatically query a user's active
> directory site name?

It's actually the computer's site, but the ADSystemInfo object provides
this. In VBScript:
=========
Set objSysInfo = CreateObject("ADSystemInfo")
strSite = objSysInfo.SiteName

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Back to top
Login to vote
Ojas

External


Since: Dec 27, 2008
Posts: 2



(Msg. 3) Posted: Sun Dec 28, 2008 3:41 pm
Post subject: Re: How can I query a user's active directory site name? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Richard,

Thanks. I have a background server application that the AD user does
not directly interact with, or connect to, and so I don't know the IP
address or the machine name that the user is currently using. Given
that context, is there anyway for me to determine the current site
that an AD user is associated with?
Back to top
Login to vote
Florian Frommherz [MVP]

External


Since: Feb 28, 2008
Posts: 76



(Msg. 4) Posted: Mon Dec 29, 2008 8:45 am
Post subject: Re: How can I query a user's active directory site name? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ojas,

Ojas wrote:
> Thanks. I have a background server application that the AD user does
> not directly interact with, or connect to, and so I don't know the IP
> address or the machine name that the user is currently using. Given
> that context, is there anyway for me to determine the current site
> that an AD user is associated with?

Users don't have sites. The site information is attached to the machine
via the IP address that it is configured to. The IP<->Site definition is
made in Active Directory. The only way to figure the site a user has
currently logged on to is the machine and the ip address.

cheers,

Florian
--
Microsoft MVP - Group Policy
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.
Maillist (german): http://frickelsoft.net/cms/index.php?page=mailingliste
Back to top
Login to vote
Jorge de Almeida Pinto [M

External


Since: Aug 22, 2006
Posts: 318



(Msg. 5) Posted: Mon Dec 29, 2008 7:10 pm
Post subject: Re: How can I query a user's active directory site name? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in another newsgroup, Joe Kaplan said the following (which is the answer on
HOW-TO accomplish):

> Jorge is absolutely correct here. You might want to check out the
> ActiveDirectorySite.GetComputerSite method to see if that helps you.


--

Cheers,
(HOPEFULLY THIS INFORMATION HELPS YOU!)

# Jorge de Almeida Pinto # MVP Identity & Access - Directory Services #

BLOG (WEB-BASED)--> http://blogs.dirteam.com/blogs/jorge/default.aspx
BLOG (RSS-FEEDS)--> http://blogs.dirteam.com/blogs/jorge/rss.aspx
------------------------------------------------------------------------------------------
* This posting is provided "AS IS" with no warranties and confers no rights!
* Always test ANY suggestion in a test environment before implementing!
------------------------------------------------------------------------------------------
#################################################
#################################################
------------------------------------------------------------------------------------------

"Florian Frommherz [MVP]" <florian DeleteThis @frickelsoft.DELETETHIS.net> wrote in
message news:e8U7QmYaJHA.4520@TK2MSFTNGP06.phx.gbl...
> Ojas,
>
> Ojas wrote:
>> Thanks. I have a background server application that the AD user does
>> not directly interact with, or connect to, and so I don't know the IP
>> address or the machine name that the user is currently using. Given
>> that context, is there anyway for me to determine the current site
>> that an AD user is associated with?
>
> Users don't have sites. The site information is attached to the machine
> via the IP address that it is configured to. The IP<->Site definition is
> made in Active Directory. The only way to figure the site a user has
> currently logged on to is the machine and the ip address.
>
> cheers,
>
> Florian
> --
> Microsoft MVP - Group Policy
> eMail: prename [at] frickelsoft [dot] net.
> blog: http://www.frickelsoft.net/blog.
> Maillist (german): http://frickelsoft.net/cms/index.php?page=mailingliste
Back to top
Login to vote
Display posts from previous:   
       Home -> Windows Other -> Active Directory All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
  Windows Other
 Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support