Using Windows PE on a Server

Windows PE (WinPE) is a minimal Windows OS with limited services that launches from the server’s memory. It is primarily used for troubleshooting, restoring, and deploying Windows.

Learn more about booting to Windows PE.

Reset and Restore Your Password

The NTPWEdit utility built into the WinPE image is used for restoring the password:

  1. Boot the server to WinPE.

  2. Run the NTPWEdit utility by clicking on the corresponding icon at the top of the panel:

  3. Specify the path to the SAM file C:\Windows\System32\Config\SAM in the Path to SAM file field (as a rule, it is specified automatically when starting the program). Open it by clicking Open:

  4. Select the required user. If the account is blocked due to expiration, unlock it using Unlock.

  5. Click Change password, enter new password and confirm it. Click OK:

    Please note that the utility allows you to leave the password field empty, but we do not recommend doing this, because according to the Windows security policy settings, an empty password makes it impossible to connect remotely via RDP. Also, if there is an empty password, it cannot be changed using NTPWEdit — it will be impossible to change it if you don’t have access to the server through the KVM console.

  6. Click Save changes.

Now you can boot back into the OS and use the new password for authorization.

Editing the OS Registry

If the operating system couldn’t be loaded because the registry file contains errors, then you need to access the registry and fix them.

Follow these steps to edit the registry:

  1. Launch WinPE.
  2. Type the following in the command prompt:
**Registry Editor** will open and display the status of the WinPE boot environment registry.
  1. Select HKEY_LOCAL_MACHINE from the list on the left. On the File menu, click Load hive.
  2. In the dialog box, navigate to the directory where the system and registry files are located (in most cases this is C:\Windows\System32\config). Select the file named system or software.
  3. Enter the name that the loaded hive will be mounted to the HKEY_LOCAL_MACHINE section with and click Open. The registry hive will appear in the section.
  4. Find and edit the required parameter.
  5. Click File and select Unload hive.

The changes will be saved in the registry.

Restoring Network Settings

The network settings can be restored if in the network adapter settings you:

  • clicked to get the address via DHCP;
  • configured an incorrect IP address.

Restoring network settings for accessing Windows Server is performed through the registry. Before making changes, access the registry from WinPE and make a backup of the partition where the system and registry files are located, usually it is C:\Windows\System32\config\SYSTEM

To change the network settings:

  1. Boot the server to WinPE.
  2. Use the command line to get information about the network adapter settings:
ipconfig /all
  1. Select the desired adapter and save the description field.
  2. Open Registry Editor:
  1. Mount the system and registry files to HKEY_LOCAL_MACHINE:
    • select the HKEY_LOCAL_MACHINE section;
    • from the File menu, select Load hive;
    • in the dialog box, select the directory where the system and registry files are located, usually it is C:\Windows\system32\config\SYSTEM;
    • enter the name with which the downloaded hive will be mounted under HKEY_LOCAL_MACHINE and click Open.
  2. In the mounted hive, find the desired adapter:
    • expand the registry section:
    • the list will contain a list of network adapters from the address 0000 to 0013. Find the adapter with the description from step 3 in the Driver Desс parameter;
    • save the value of the NetCfgInstanceId field of the adapter.
  3. Change the values of the adapter parameters:
    • go to the registry section:
    • adjust the parameter values according to the server card (DefaultGateway; DhcpDefaultGateway; DhcpIPAddress; DhcpServer; DhcpSubnetMask; DhcpSubnetMaskOpt; EnableDHCP; IPAddress; NameServer; SubnetMask) and check that the EnableDHCP parameter is set to 0.
  4. Unload the hive. Highlight it and choose Unload hive from the File menu.
  5. From the server control panel, select the desired load option and reboot the server.