(0)
Artikel
bewerten
(100% positiv)
(7)
$ip="192.168.0.xx"
$dns="192.168.0.xx"
$gw="192.168.0.1"
$hostname="HOSTNAME"
$domain = "domain.local"
$username = "$domain\Administrator" 
$password = "?????" | ConvertTo-SecureString -asPlainText -Force

Get-netadapter | new-netipaddress -addressFamily IPv4 -ipaddress $ip -prefixlength 24 -DefaultGateway $gw
Get-netadapter | Set-DnsClientServerAddress -ServerAddresses $dns
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
Add-Computer -DomainName $domain -Credential $credential -NewName $hostname -restart
letzte Änderung dieses Artikels: 23.06.2017 18:20




Kommentare