Skip to main content
Version: 4.1.x

Test-ADTCallerIsAdmin

SYNOPSIS

Checks if the current user has administrative privileges.

SYNTAX

Test-ADTCallerIsAdmin

DESCRIPTION

This function checks if the current user is a member of the Administrators group. It returns a boolean value indicating whether the user has administrative privileges.

EXAMPLES

EXAMPLE 1

Test-ADTCallerIsAdmin

Checks if the current user has administrative privileges and returns true or false.

PARAMETERS

INPUTS

None

You cannot pipe objects to this function.

OUTPUTS

System.Boolean

Returns $true if the current user is an administrator, otherwise $false.

NOTES

An active ADT session is NOT required to use this function.

Tags: psadt
Website: https://psappdeploytoolkit.com
Copyright: (C) 2025 PSAppDeployToolkit Team (Sean Lillis, Dan Cunningham, Muhammad Mashwani, Mitch Richters, Dan Gough).
License: https://opensource.org/license/lgpl-3-0

https://psappdeploytoolkit.com/docs/reference/functions/Test-ADTCallerIsAdmin

Look for us at these events...

MMS: Music City Edition 2025
October 12th to 15th • Nashville, Tennessee, USA
Up Next
AppManage2025AppManage2025
October 10th • Utrecht, The Netherlands
MAEDS Fall Conference 2025MAEDS Fall Conference 2025
October 29th to 31st • Michigan, USA