Zum Hauptinhalt springen

WinPe implementations

Du bist hier:
< Alle Themen

1.) Implement Shutdown

To implement a shutdown during a WinPE boot, use the Wpeutil command-line tool

Available Commands

  • Immediate Shutdown:
    wpeutil shutdown
  • Immediate Reboot:
    wpeutil reboot
  • Exit the Session (Returns to previous boot state):
    Type exit in the Command Prompt window

1. Inside a Script (.bat or .cmd)

You can automate the shutdown process by appending the command to a deployment or recovery script (such as startnet.cmd or your custom setup scripts): [1, 2, 3]

cmd

:: Example: Performing your tasks and then shutting down
echo "Imaging or recovery process complete. Shutting down system..."
wpeutil shutdown

2. Using PowerShell

If your WinPE image includes the PowerShell module, you can execute the exact same utility using:

powershell

Start-Process -FilePath "wpeutil.exe" -ArgumentList "shutdown" -NoNewWindow -Wait

Inhaltsverzeichnis