To obtain the LDAP path for OU and GROUP objects in ADUC Attribute Editor, follow these steps:
- Open the Attribute Editor for the object you are interested in.
- Locate the "distinguishedName" attribute and click on it.
- Copy the LDAP path for the OU or GROUP object.
###############
$OUpath = "OU=Administrators,DC=Domain,DC=Local"
$GROUPpath = "CN=vCenter_Admins,OU=Administrators,DC=Domain,DC=Local"
$OUusers = Get-ADUser -Filter * -SearchBase $OUpath
$GROUP = Get-ADGroup -Identity $GROUPpath
Add-ADGroupMember -Identity $group -Members $users
###############
Комментариев нет:
Отправить комментарий