You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
Due to a bug in Windows Server 2022, sometimes the IP address cannot be set using SConfig. Use the following commands at the command prompt as a workaround:
Find the ifIndex (InterfaceIndex) of the net adapter.
Get-NetAdapter
or
Get-NetIPConfiguration
Remove all IP address.
Get-NetIPAddress|Remove-NetIPAddress
You might get some error message, which you can safely ignore. Some IP addresses, e.g., APIPA addresses cannot be removed.
Set the IP address and default gateway.
$ipAddress='10.1.200.168'# Replace with the desired IP address$defaultGateway='10.1.200.1'# Replace with the desired default gateway$prefixLength=24# Replace as appropriate$interfaceIndex=4# Replace with the ifIndex from step 1New-NetIPAddress`-InterfaceIndex $interfaceIndex`-IPAddress $ipAddress`-DefaultGateway $defaultGateway`-AddressFamiliy IPv4 `-PrefixLength $prefixLength
Set the DNS server.
Set-DnsClientServerAddress-InterfaceIndex $interfaceIndex-ServerAddresses 10.1.1.8# Replace as appropriate