Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Add a User to a Group but Only if that User is a Member of the IT DepartmentContent of Add a User to a Group but Only if that User is a Member of the IT Department.vbsMD5 Hash: 5B912B260AF551DBBEE6F17CE3AB5EEA |
||
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 :: |