Throws an exception if the user doesn't have administrator privileges.
Assert-AdminPrivileges [<CommonParameters>]
Many scripts and functions require the user to be running as an administrator. This function checks if the user is running as an administrator or with administrator privileges and throws an exception if the user doesn't.
Assert-AdminPrivileges
Throws an exception if the user doesn't have administrator privileges.