header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Query AD Sites and Services
Last Post 07 Feb 2012 12:03 PM by Geoff Guynn. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
AdoytUser is Offline
New Member
New Member
Posts:21
Avatar

--
07 Feb 2012 11:07 AM
    Hi,

    I have a request to log the site that users log into.  I figure the easiest way to do this is through a logon script.  Since I don't want to install the AD ps cmdlets or Quest tools on every machine, will it be easier to just call .NET?
    Geoff GuynnUser is Offline
    Basic Member
    Basic Member
    Posts:139
    Avatar

    --
    07 Feb 2012 12:03 PM
    You might not even have to do that. If the computer is also in the site that the user is logging in to. You can use this one line to get the site name.
    (It is using .Net, but not doing any real heavy lifting in Active Directory.)

    [System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetComputerSite().Name
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer