docs/powershell.md aktualisiert
This commit is contained in:
@@ -12,11 +12,16 @@ Get-LocalUser -Name 'Administrator' | Set-LocalUser -Password (ConvertTo-SecureS
|
|||||||
Rename-Computer -NewName 'DC01' -Restart -Force
|
Rename-Computer -NewName 'DC01' -Restart -Force
|
||||||
```
|
```
|
||||||
|
|
||||||
## Set-Networkcard-to-private
|
## IP-Config
|
||||||
Profil der Netzwerkkarte auf Privat umstellen (Firewall)
|
> Command: New-NetIPAddress -InterfaceIndex [Index des Interfaces] -AddressFamily [IPv4/IPv6] -IPAddress [IP-Adress] -PrefixLength [SNM / Prefix] -DefaultGateway [IP-Adresse des Default-Gateway]
|
||||||
> Comman: Set-NetConnectionProfile -InterfaceIndex [Index der Netzwerkkarte] -NetworkCategory "Private"
|
|
||||||
```ruby
|
```ruby
|
||||||
Set-NetConnectionProfile -InterfaceIndex '3' -NetworkCategory 'Private'
|
New-NetIPAddress -InterfaceIndex 3 -AddressFamily IPv4 -IPAddress '172.16.7.100' -PrefixLength '255.255.255.0' -DefaultGateway '172.16.7.254'
|
||||||
|
```
|
||||||
|
|
||||||
|
## DNS-Config
|
||||||
|
> Command: Set-DnsClientServerAddress -InterfaceIndex [Index des Interfaces] -ServerAddresses ("[IP-Adresse primärer DNS]","[IP-Adresse sekundärer DNS]")
|
||||||
|
```ruby
|
||||||
|
Set-DnsClientServerAddress -InterfaceIndex '3' -ServerAddresses ('172.16.7.11','172.16.7.12')
|
||||||
```
|
```
|
||||||
|
|
||||||
## IPv6-abschalten
|
## IPv6-abschalten
|
||||||
@@ -41,24 +46,19 @@ Set-NetIPInterface -InterfaceAlias 'Inside' -AddressFamily 'IPv6' -Dhcp Disabled
|
|||||||
Set-NetIPInterface -InterfaceIndex '3' -AddressFamily 'IPv6' -Dhcp Disabled
|
Set-NetIPInterface -InterfaceIndex '3' -AddressFamily 'IPv6' -Dhcp Disabled
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Set-Networkcard-to-private
|
||||||
|
Profil der Netzwerkkarte auf Privat umstellen (Firewall)
|
||||||
|
> Comman: Set-NetConnectionProfile -InterfaceIndex [Index der Netzwerkkarte] -NetworkCategory "Private"
|
||||||
|
```ruby
|
||||||
|
Set-NetConnectionProfile -InterfaceIndex '3' -NetworkCategory 'Private'
|
||||||
|
```
|
||||||
|
|
||||||
## Add-Route
|
## Add-Route
|
||||||
> Command: New-NetRoute -DestinationPrefix [Subnet] -InterfaceIndex [Index der Netzwerkkarte] -NextHop [IP-Adress] -RouteMetric [Metric]
|
> Command: New-NetRoute -DestinationPrefix [Subnet] -InterfaceIndex [Index der Netzwerkkarte] -NextHop [IP-Adress] -RouteMetric [Metric]
|
||||||
```ruby
|
```ruby
|
||||||
New-NetRoute -DestinationPrefix '172.16.0.0/20' -InterfaceIndex '7' -NextHop '172.16.X.254' -RouteMetric '1'
|
New-NetRoute -DestinationPrefix '172.16.0.0/20' -InterfaceIndex '7' -NextHop '172.16.X.254' -RouteMetric '1'
|
||||||
```
|
```
|
||||||
|
|
||||||
## IP-Config
|
|
||||||
> Command: New-NetIPAddress -InterfaceIndex [Index des Interfaces] -AddressFamily [IPv4/IPv6] -IPAddress [IP-Adress] -PrefixLength [SNM / Prefix] -DefaultGateway [IP-Adresse des Default-Gateway]
|
|
||||||
```ruby
|
|
||||||
New-NetIPAddress -InterfaceIndex 3 -AddressFamily IPv4 -IPAddress '172.16.7.100' -PrefixLength '255.255.255.0' -DefaultGateway '172.16.7.254'
|
|
||||||
```
|
|
||||||
|
|
||||||
## DNS-Config
|
|
||||||
> Command: Set-DnsClientServerAddress -InterfaceIndex [Index des Interfaces] -ServerAddresses ("[IP-Adresse primärer DNS]","[IP-Adresse sekundärer DNS]")
|
|
||||||
```ruby
|
|
||||||
Set-DnsClientServerAddress -InterfaceIndex '3' -ServerAddresses ('172.16.7.11','172.16.7.12')
|
|
||||||
```
|
|
||||||
|
|
||||||
## Remote-Access
|
## Remote-Access
|
||||||
Read TrustedHosts
|
Read TrustedHosts
|
||||||
```ps
|
```ps
|
||||||
|
|||||||
Reference in New Issue
Block a user