воскресенье, 10 марта 2019 г.

Как добавить в группу пользователей OU

To obtain the LDAP path for OU and GROUP objects in ADUC Attribute Editor, follow these steps:

  1. Open the Attribute Editor for the object you are interested in.
  2. Locate the "distinguishedName" attribute and click on it.
  3. 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
###############

Комментариев нет:

Отправить комментарий