Get the Users AD Site Name

This tiny VBS script will return the current users Active Directory site name, which is very useful in a login script for doing things like adding printers or mapping drives based on what site the user is at

Set objADSysInfo = CreateObject("ADSystemInfo")
 
msgbox objAdSysInfo.SiteName

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.