For the complete documentation index, see llms.txt. This page is also available as Markdown.

Block-WinPE

Blocks execution if the system is running WinPE

Property
Value

Module

OSD

Platform

WinPE (amd64 / arm64)

Description

Validates that the system is not running in WinPE (Windows PE) environment. If running in WinPE, writes a warning and breaks execution unless the -Warn parameter is specified.

Syntax

Block-WinPE [-Warn] [-Pause] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Parameters

Parameter
Type
Required
Description

-Warn

SwitchParameter

False

Shows a warning but continues execution instead of breaking

-Pause

SwitchParameter

False

Pauses and displays a message before continuing execution

Examples

Example

Block-WinPE
Halts execution if the system is running WinPE

Last updated

Was this helpful?