# Active Directory
## Konfiguration
Powershell
#### Local Password
````ruby
Get-LocalUser -Name "Administrator" | Set-LocalUser -Password (ConvertTo-SecureString -AsPlainText "Passw0rd" -Force)
````
#### Local Netconf
```ruby
New-NetIPAddress -InterfaceIndex 3 -AddressFamily IPv4 -IPAddress '172.16.7.100' -PrefixLength '255.255.255.0' -DefaultGateway '172.16.7.254'
```
```ruby
Set-DnsClientServerAddress -InterfaceIndex '3' -ServerAddresses ('172.16.7.11','172.16.7.12')
```
#### Set-Hostname
```ruby
Rename-Computer -NewName 'DC01' -Restart -Force
```
#### Netzwerkkarte auf Private setzen
````ruby
Get-NetConnectionProfile
````
````ruby
Set-NetConnectionProfile -InterfaceIndex [Index der Netzwerkkarte] -NetworkCategory "Private"
````
#### Firewall abschalten
````bash
netsh advfirewall set allprofiles state off
````
#### IPv6 de-/aktivieren
````ruby
Disable-NetAdapterBinding -Name [Name der Netzwerkkarte] -ComponentID ms_tcpip6
````
````ruby
Enable-NetAdapterBinding -Name [Name der Netzwerkkarte] -ComponentID ms_tcpip6
````
- [IPv6 DHCP abschalten](docs/powershell.md#ipv6-dhcp-abschalten)
- [Add-Route](docs/powershell.md#add-route)
- [IP-Config](docs/powershell.md#ip-config)
- [DNS-Config](docs/powershell.md#dns-config)
- [Remote Access](docs/powershell.md#remote-access)
- [Remote Execute](docs/powershell.md#remote-ps-execute)
## Aufnahme in die Domäne
Powershell
#### Domain-Join
````ruby
Add-Computer -Domain "podxx.spielwiese.intern" -Restart -Force
````