Thursday, December 4, 2008

Retrieving the Site Name for the Local Computer

Reports the site name for the local computer.

Set objADSysInfo = CreateObject("ADSystemInfo")
WScript.Echo "Current site name: " & objADSysInfo.SiteName

This is a VB Script, this can be used by saving the file in .vbs file