Sunday, March 12, 2017

Configure static IP address in Windows PE environment

Scenario

You've made backup image of your Windows OS and put it on the network share. 
At some point you need this backup image for system recovery purposes. You boot from Windows PE disk to recover system image backup in non-DHCP enabled network. You can't access to your backup image file via network. You must setup static IP on the network interface prior to network discovery and image recovery.

Quick notes

Enter to command prompt:

netsh interface ip show addresses
netcfg -winpe
wpeutil InitializeNetwork

or simply

wpeinit

NOTE: The default connection names are "Local Area Connection" or "Ethernet" for wired adapters and "Wireless Network Connection" for Wi-Fi adapters. You can check network connection name by entering "ipconfig" command.

The IP address order: client IP, subnet mask, and gateway IP.

netsh interface ipv4 set address "Local Area Connection" static 192.168.0.101 255.255.255.0 192.168.0.1
netsh interface ipv4 add dns "Local Area Connection" 192.168.0.10 index=1
netsh interface ipv4 add dns "Local Area Connection" 192.168.0.11 index=2

The service has not been started