Block-StandardUser
Blocks execution if the current user does not have Administrator rights
Property
Value
Module
OSD
Platform
WinPE (amd64 / arm64)
Description
Validates that the current user has Administrator rights. If standard user rights are detected, writes a warning and breaks execution unless the -Warn parameter is specified.
Syntax
Block-StandardUser [-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-StandardUser
Halts execution if the user is not running as AdministratorExample
Related
Last updated
Was this helpful?

