![]() Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Add a User to a Group but Only if that User is a Member of the IT Department
|
||
Set objUser = GetObject("LDAP://cn=Jack Richins,ou=canada,dc=fabrikam,dc=com")
If objUser.Department = "IT" Then Set objGroup = GetObject _ ("LDAP://cn=IT Staff,ou=support,dc=fabrikam,dc=com") objGroup.Add(objUser.ADsPath) End If | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |