JSI Tip 10039. How can you retrieve Active Directory attributes of the computer you are logged onto, using standard commands?JSI Tip 10039. How can you retrieve Active Directory attributes of the computer you are logged onto, using standard commands?

Jerold Schulman

January 8, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

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



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.

You May Also Like