$NIC = Get-NetAdapter
$index = $NIC.ifIndex

New-NetIPAddress `
-ifIndex $NIC `
-IPAddress 192.168.1.100 `
-PrefixLength 24 `
-DefaultGateway 192.168.1.254

Set-DnsClientServerAddress `
-InterfaceIndex $NIC `
-ServerAddresses 192.168.1.200

Rename-Computer -NewName CORE1
Add-Computer -DomainName ecole.com
Restart-Computer