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:
-
Run the NTPWEdit utility by clicking on the corresponding icon at the top of the panel:
-
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: -
Select the required user. If the account is blocked due to expiration, unlock it using Unlock.
-
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.
-
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:
- Launch WinPE.
- Type the following in the command prompt:
regedit
**Registry Editor** will open and display the status of the WinPE boot environment registry.
- Select HKEY_LOCAL_MACHINE from the list on the left. On the File menu, click Load hive.
- 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.
- 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.
- Find and edit the required parameter.
- 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:
- Boot the server to WinPE.
- Use the command line to get information about the network adapter settings:
ipconfig /all
- Select the desired adapter and save the description field.
- Open Registry Editor:
regedit
- 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.
- In the mounted hive, find the desired adapter:
- expand the registry section:
HKEY_LOCAL_MACHINE\hive_name\ControlSet001\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}
- 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.
- Change the values of the adapter parameters:
- go to the registry section:
HKEY_LOCAL_MACHINE\hive_name\ControlSet001\Services\Tcpip\Parameters\Interfaces\NetCfgInstanceId_field_value
- adjust the parameter values according to the server card (
DefaultGateway
;DhcpDefaultGateway
;DhcpIPAddress
;DhcpServer
;DhcpSubnetMask
;DhcpSubnetMaskOpt
;EnableDHCP
;IPAddress
;NameServer
;SubnetMask
) and check that theEnableDHCP
parameter is set to 0.
- Unload the hive. Highlight it and choose Unload hive from the File menu.
- From the server control panel, select the desired load option and reboot the server.