![]() Loading |
| VBScript |
| JavaScript |
| Powershell |
Search Options: List the Managed By Information for an OU
|
||
|
' Description: Returns information about the account assigned as manager of the Sales OU in Active Directory.
On Error Resume Next Set objContainer = GetObject _ ("LDAP://ou=Sales,dc=NA,dc=fabrikam,dc=com") strManagedBy = objContainer.Get("managedBy") If IsEmpty(strManagedBy) = TRUE Then WScript.Echo "No user account is assigned to manage " & _ "this OU." Else Set objUser = GetObject("LDAP://" & strManagedBy) WScript.Echo "Manager: " & objUser.streetAddress WScript.Echo "Office: " & _ objUser.physicalDeliveryOfficeName WScript.Echo "Street Address: " & strStreetAddress WScript.Echo "Locality: " & objUser.l WScript.Echo "State/province: " & objUser.st WScript.Echo "Country: " & objUser.c WScript.Echo "Telephone Number: " & objUser.telephoneNumber WScript.Echo "Fax Number: " & _ objUser.facsimileTelephoneNumber End If | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: | ||