Block-AdminUser
Last updated
Was this helpful?
Blocks execution if the current user has Administrator rights
Module
OSD
Platform
WinPE (amd64 / arm64)
Validates that the current user does not have Administrator rights. If admin rights are detected, writes a warning and breaks execution unless the -Warn parameter is specified.
Block-AdminUser [-Warn] [-Pause] [-ProgressAction <ActionPreference>] [<CommonParameters>]-Warn
SwitchParameter
False
Shows a warning but continues execution instead of breaking
-Pause
SwitchParameter
False
Pauses and displays a message before continuing execution
Block-AdminUser
Halts execution if the user is running as AdministratorLast updated
Was this helpful?
Was this helpful?
Block-AdminUser -Warn
Shows a warning but continues execution even if user is Administrator
