docs/powershell.md aktualisiert

This commit is contained in:
2024-10-24 12:14:47 +02:00
parent 5a2e0197d0
commit ce6d461c4e

View File

@@ -164,15 +164,16 @@ Move-ADDirectoryServerOperationMasterRole -Identity 'DC01' -OperationMasterRole
New-ADUser -Name "John Doe" -GivenName "John" -Surname "Doe" -SamAccountName "jdoe" -UserPrincipalName "jdoe@yourdomain.com" -Path "OU=Users,DC=yourdomain,DC=com" -AccountPassword (ConvertTo-SecureString "P@ssword1" -AsPlainText -Force) -Enabled $true New-ADUser -Name "John Doe" -GivenName "John" -Surname "Doe" -SamAccountName "jdoe" -UserPrincipalName "jdoe@yourdomain.com" -Path "OU=Users,DC=yourdomain,DC=com" -AccountPassword (ConvertTo-SecureString "P@ssword1" -AsPlainText -Force) -Enabled $true
``` ```
#### AddGroup #### New-Group
> New-ADGroup -Name [name] -GroupScope [DomainLocal/Global/Universal] -GroupCategory [Security/Distribution] -Path [OU=(Ordner),DC=(Subdomain),DC=(Domain),DC=(.tld)] > New-ADGroup -Name [name] -GroupScope [DomainLocal/Global/Universal] -GroupCategory [Security/Distribution] -Path [OU=(Ordner),DC=(Subdomain),DC=(Domain),DC=(.tld)]
```ruby ```ruby
New-ADGroup -Name "Trans_R" -GroupScope DomainLocal -GroupCategory Security -Path "OU=BTL-klein,OU=pod07,DC=pod07,DC=spielwiese,DC=intern" New-ADGroup -Name "Trans_R" -GroupScope DomainLocal -GroupCategory Security -Path "OU=BTL-klein,OU=pod07,DC=pod07,DC=spielwiese,DC=intern"
``` ```
</details> #### Add-Group/User to Group
> Add-ADGroupMember -Identity [Groupname(Add to this group)] -Members [Groupname], [Username]
> Command:
```ruby ```ruby
Add-ADGroupMember -Identity "2-Kp-Chef" -Members "2-Kp-KpFw", "2-Kp-KpEinsOffz"
```
``` </details>