docs/powershell.md aktualisiert
This commit is contained in:
@@ -1,12 +1,18 @@
|
|||||||
# Powershell
|
# Powershell
|
||||||
|
|
||||||
## Set Password
|
## Set-Password
|
||||||
> Command: Get-LocalUser -Name [Username] | Set-LocalUser -Password (ConvertTo-SecureString -AsPlainText [Password] -Force)
|
> Command: Get-LocalUser -Name [Username] | Set-LocalUser -Password (ConvertTo-SecureString -AsPlainText [Password] -Force)
|
||||||
```ruby
|
```ruby
|
||||||
Get-LocalUser -Name 'Administrator' | Set-LocalUser -Password (ConvertTo-SecureString -AsPlainText 'Passw0rd' -Force)
|
Get-LocalUser -Name 'Administrator' | Set-LocalUser -Password (ConvertTo-SecureString -AsPlainText 'Passw0rd' -Force)
|
||||||
```
|
```
|
||||||
|
|
||||||
## IPv6 DHCP abschalten
|
## Set-Hostname
|
||||||
|
> Command: Rename-Computer -NewName [Name der Maschine] -Restart -Force
|
||||||
|
```ruby
|
||||||
|
Rename-Computer -NewName 'DC01' -Restart -Force
|
||||||
|
```
|
||||||
|
|
||||||
|
## IPv6-DHCP-abschalten
|
||||||
> Command: Get-NetIPInterface -AddressFamily [IPv6/IPv4]
|
> Command: Get-NetIPInterface -AddressFamily [IPv6/IPv4]
|
||||||
```ruby
|
```ruby
|
||||||
Get-NetIPInterface -AddressFamily 'IPv6'
|
Get-NetIPInterface -AddressFamily 'IPv6'
|
||||||
@@ -38,13 +44,7 @@ New-NetIPAddress -InterfaceIndex 3 -AddressFamily IPv4 -IPAddress '172.16.7.100'
|
|||||||
Set-DnsClientServerAddress -InterfaceIndex '3' -ServerAddresses ('172.16.7.11','172.16.7.12')
|
Set-DnsClientServerAddress -InterfaceIndex '3' -ServerAddresses ('172.16.7.11','172.16.7.12')
|
||||||
```
|
```
|
||||||
|
|
||||||
## Set-Hostname
|
## Remote-Access
|
||||||
> Command: Rename-Computer -NewName [Name der Maschine] -Restart -Force
|
|
||||||
```ruby
|
|
||||||
Rename-Computer -NewName 'DC01' -Restart -Force
|
|
||||||
```
|
|
||||||
|
|
||||||
## Remote Access
|
|
||||||
Read TrustedHosts
|
Read TrustedHosts
|
||||||
```ps
|
```ps
|
||||||
Get-Item WSMan:localhost\client\TrustedHosts
|
Get-Item WSMan:localhost\client\TrustedHosts
|
||||||
|
|||||||
Reference in New Issue
Block a user