< Back
Get-OSDWinPE
Post
NAME Get-OSDWinPE
SYNOPSIS
Common WinPE Commands using wpeutil and Microsoft DaRT RemoteRecovery
SYNTAX
Get-OSDWinPE [-AddModules] [[-ImportModule] <String[]>] [[-CallScript] <String>] [-InitializeNetwork]
[-InitializeNetworkNoWait] [-WaitForNetwork] [-WaitForRemovableStorage] [-DisableFirewall] [-UpdateBootInfo]
[-RemoteRecovery] [-Reboot] [-Shutdown] [<CommonParameters>]
DESCRIPTION
Common WinPE Commands using wpeutil and Microsoft DaRT RemoteRecovery
PARAMETERS
-AddModules [<SwitchParameter>]
PowerShell Module Parameter
Searches all Drives for <drive>:\\Modules directory
Copies Modules content to System32 $PSModulesPath
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ImportModule <String[]>
PowerShell Module Parameter
Imports a PowerShell Module by Name
PowerShell Module must exist in $PSModulePath
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CallScript <String>
PowerShell Script Parameter
Searches all Drives for <drive>:\\$ImportModule file
Calls <drive>:\\$ImportModule in the current PS Session
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-InitializeNetwork [<SwitchParameter>]
wpeutil InitializeNetwork
Initializes network components and drivers and sets the computer name to a randomly-chosen value
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-InitializeNetworkNoWait [<SwitchParameter>]
wpeutil InitializeNetwork /NoWait
Initializes network components and drivers and sets the computer name to a randomly-chosen value
The /NoWait option will skip the time where your PC would otherwise wait to acquire an IP address
If you don't use /NoWait, Windows PE will wait to acquire an address before it finishes loading your WinPE
session
/NoWait is helpful for environments that don't use DHCP
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WaitForNetwork [<SwitchParameter>]
wpeutil WaitForNetwork
Waits for the network card to be initialized
Use this command when creating scripts to make sure that the network card has been fully initialized before
continuing
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WaitForRemovableStorage [<SwitchParameter>]
wpeutil WaitForRemovableStorage
During the Windows PE startup sequence, this command will block startup until the removable storage devices,
such as USB hard drives, are initialized
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-DisableFirewall [<SwitchParameter>]
wpeutil DisableFirewall
Disables the Firewall
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-UpdateBootInfo [<SwitchParameter>]
wpeutil UpdateBootInfo
Populates the registry with information about how Windows PE boots
After you run this command, query the registry. For example:
reg query HKLM\\System\\CurrentControlSet\\Control /v PEBootType
The results of this operation might change after loading additional driver support.
To determine where Windows PE is booted from, examine the following:
PEBootType: Error, Flat, Remote, Ramdisk:SourceIdentified Ramdisk:SourceUnidentified, Ramdisk:OpticalDrive
PEBootTypeErrorCode: HRESULT code
PEBootServerName: Windows Deployment Services server name
PEBootServerAddr: Windows Deployment Services server IP address
PEBootRamdiskSourceDrive: Source drive letter, if available.
PEFirmwareType: Firmware boot mode: 0x1 for BIOS, 0x2 for UEFI.
If you are not booting Windows Deployment Services, the best way to determine where Windows PE booted from is
to first check for PEBootRamdiskSourceDrive registry key
If it is not present, scan the drives of the correct PEBootType and look for some kind of tag file that
identifies the boot drive
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-RemoteRecovery [<SwitchParameter>]
RemoteRecovery.exe -nomessage
Microsoft Diagnostic and Recovery Toolset Remote Recovery
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Reboot [<SwitchParameter>]
wpeutil Reboot
Reboots the computer
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Shutdown [<SwitchParameter>]
wpeutil Shutdown
Shutdown the computer
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
19.10.1 David Segura @SeguraOSD
RELATED LINKS
https://osd.osdeploy.com/module/functions/get-osdwinpe
SYNOPSIS
Common WinPE Commands using wpeutil and Microsoft DaRT RemoteRecovery
SYNTAX
Get-OSDWinPE [-AddModules] [[-ImportModule] <String[]>] [[-CallScript] <String>] [-InitializeNetwork]
[-InitializeNetworkNoWait] [-WaitForNetwork] [-WaitForRemovableStorage] [-DisableFirewall] [-UpdateBootInfo]
[-RemoteRecovery] [-Reboot] [-Shutdown] [<CommonParameters>]
DESCRIPTION
Common WinPE Commands using wpeutil and Microsoft DaRT RemoteRecovery
PARAMETERS
-AddModules [<SwitchParameter>]
PowerShell Module Parameter
Searches all Drives for <drive>:\\Modules directory
Copies Modules content to System32 $PSModulesPath
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ImportModule <String[]>
PowerShell Module Parameter
Imports a PowerShell Module by Name
PowerShell Module must exist in $PSModulePath
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-CallScript <String>
PowerShell Script Parameter
Searches all Drives for <drive>:\\$ImportModule file
Calls <drive>:\\$ImportModule in the current PS Session
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-InitializeNetwork [<SwitchParameter>]
wpeutil InitializeNetwork
Initializes network components and drivers and sets the computer name to a randomly-chosen value
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-InitializeNetworkNoWait [<SwitchParameter>]
wpeutil InitializeNetwork /NoWait
Initializes network components and drivers and sets the computer name to a randomly-chosen value
The /NoWait option will skip the time where your PC would otherwise wait to acquire an IP address
If you don't use /NoWait, Windows PE will wait to acquire an address before it finishes loading your WinPE
session
/NoWait is helpful for environments that don't use DHCP
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WaitForNetwork [<SwitchParameter>]
wpeutil WaitForNetwork
Waits for the network card to be initialized
Use this command when creating scripts to make sure that the network card has been fully initialized before
continuing
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WaitForRemovableStorage [<SwitchParameter>]
wpeutil WaitForRemovableStorage
During the Windows PE startup sequence, this command will block startup until the removable storage devices,
such as USB hard drives, are initialized
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-DisableFirewall [<SwitchParameter>]
wpeutil DisableFirewall
Disables the Firewall
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-UpdateBootInfo [<SwitchParameter>]
wpeutil UpdateBootInfo
Populates the registry with information about how Windows PE boots
After you run this command, query the registry. For example:
reg query HKLM\\System\\CurrentControlSet\\Control /v PEBootType
The results of this operation might change after loading additional driver support.
To determine where Windows PE is booted from, examine the following:
PEBootType: Error, Flat, Remote, Ramdisk:SourceIdentified Ramdisk:SourceUnidentified, Ramdisk:OpticalDrive
PEBootTypeErrorCode: HRESULT code
PEBootServerName: Windows Deployment Services server name
PEBootServerAddr: Windows Deployment Services server IP address
PEBootRamdiskSourceDrive: Source drive letter, if available.
PEFirmwareType: Firmware boot mode: 0x1 for BIOS, 0x2 for UEFI.
If you are not booting Windows Deployment Services, the best way to determine where Windows PE booted from is
to first check for PEBootRamdiskSourceDrive registry key
If it is not present, scan the drives of the correct PEBootType and look for some kind of tag file that
identifies the boot drive
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-RemoteRecovery [<SwitchParameter>]
RemoteRecovery.exe -nomessage
Microsoft Diagnostic and Recovery Toolset Remote Recovery
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Reboot [<SwitchParameter>]
wpeutil Reboot
Reboots the computer
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Shutdown [<SwitchParameter>]
wpeutil Shutdown
Shutdown the computer
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
19.10.1 David Segura @SeguraOSD
RELATED LINKS
https://osd.osdeploy.com/module/functions/get-osdwinpe