Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
January 8, 2006
NOTE: See How can I retrieve Active Directory attributes of the logged on user, using standard commands?
See the following sample:
On Error Resume NextDim objSysInfo, objUserSet objSysInfo = CreateObject("ADSystemInfo")Set objComp = GetObject("LDAP://" & objSysInfo.ComputerName)Wscript.Echo objComp.whenCreatedWscript.Echo objComp.whenChangedWscript.Echo objComp.nameWscript.Echo objComp.userAccountControlWscript.Echo objComp.primaryGroupIDWscript.Echo objComp.sAMAccountNameWscript.Echo objComp.locationWscript.Echo objComp.operatingSystemWscript.Echo objComp.operatingSystemServicePackWscript.Echo objComp.dNSHostName
You May Also Like