Check if user is a Local Administrator

This script will check if the user is part of BUILTINAdministrators, directly named This script will check if the user is a member of BUILTINAdministrators, directly named_x000A_or inherited from other local or domain groups

Version: 1.5.5
Created: 2020-06-10T20:33:39.15
Modified: 2020-06-10T20:56:35.423
Creator: Marcel Calef
Downloads: 28
Tags:
The Script Copy Script Copied to clipboard

@echo off
:: NAME : Check if user is a Local Administrator
:: This script will check if the user is a member of BUILTINAdministrators, directly named
:: or inherited from other local or domain groups
:: CONTEXT: User Session
:: HISTORY: 2020-06-10 Marcel Calef – initial release

:checl_localAdmin

whoami /groups | findstr “BUILTINAdministrators”>NUL
if %errorLevel% == 0 (
echo User is a Local Administrator.
) else (
echo No local admin rights.
)
:: timeout 15>nul
:: pause >nul

START YOUR TRIAL

Get Your Download Link

Gain access to ControlUp from your PC. Register and get a link to start your Free Trial.