Mit Powershell Benutzer und Gruppen in Active Directory anlegen Windows Server 2019

A

Aladin033

Aktives Mitglied
Thread Starter
Dabei seit
22.08.2015
Beiträge
1.706
Reaktionspunkte
184
Moin zusammen,

ich versuche einen Benutzer und eine Gruppe anzulegen und erhalte dabei folgende Fehlermeldung:

Kann mir jemand behilflich sein?

Danke
 

Anhänge

  • Fehler Powershell.PNG
    Fehler Powershell.PNG
    33,1 KB · Aufrufe: 54
Und durch was wird scope ersetzt?
in dsadd gab es den Befehl ja noch.
 
schau die beispiele an.

New-ADGroup -Name "RODC Admins" -SamAccountName RODCAdmins -GroupCategory Security -GroupScope Global -DisplayName "RODC Administrators" -Path "CN=Users,DC=Fabrikam,DC=Com" -Description "Members of this group are RODC Administrators"

This command creates a group named RODC Admins in the container CN=Users,DC=Fabrikam,DC=Com and set the GroupCategory, DisplayName, GroupScope, and Description properties on the new object.

in dem Fall eine Globale Security Gruppe.

noch relevant vermutlich:
-GroupScope
Specifies the group scope of the group. The acceptable values for this parameter are:
  • DomainLocal or 0
  • Global or 1
  • Universal or 2
-GroupCategory

Specifies the category of the group. The acceptable values for this parameter are:
  • Distribution or 0
  • Security or 1
 
New-ADGroup -Name "Einkauf" -SamAccountName "LG-H-Einkauf-VZ" -GroupCategory Security -GroupScope Global -DisplayName "Einkauf" -Path "CN=Peter Tasche,DC=Deutschland,DC=Cag" -Description "Mitglieder der Gruppe sind Einkäufer"

Name ist rein fiktiv da es nur eine VM ist..
 

Anhänge

  • Fehler Powershell 2.PNG
    Fehler Powershell 2.PNG
    25 KB · Aufrufe: 46
du bist sicher berechtigt - sprich domain admin und das ad powershell module ist auch geladen? Willst im CN wirklich ein Leerzeichen haben? Sowas vermeide ich. Kann sein, dass man das dann noch explizit escapen müsste. Wenn möglich mach halt Peter-Tasche oder so.

Bsp von mir hier:

Code:
PS C:\Users\xxx> New-ADGroup -Name "Test-Gruppe" -SamAccountName Test-Gruppe -GroupCategory Security -GroupScope Global -DisplayName "Test Gruppe" -Path "CN=Users,DC=xxx,DC=yyy,DC=com" -Description "Test Gruppe mit Powershell erstellt"

PS C:\Users\xxx> Get-ADGroup -Identity "Test-Gruppe"


DistinguishedName : CN=Test-Gruppe,CN=Users,DC=xxx,DC=yyy,DC=com
GroupCategory     : Security
GroupScope        : Global
Name              : Test-Gruppe
ObjectClass       : group
ObjectGUID        : c2334100-34bd-493d-871f-1b2d2f8a15b8
SamAccountName    : Test-Gruppe
SID               : S-1-5-21-329610119-1292265216-914644375-20037

PS C:\Users\xxx>
 
Zurück
Oben Unten