Skip to content

This tool provides users to elevate themselves as admins for 5 minutes

Notifications You must be signed in to change notification settings

yannara/AddTempAdminRights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

AddTempAdminRights

This tool provides users to elevate themselves as admins for 5 minutes through Intune's Company Portal for Windows Devices. You can specify the time in lenght yourself in the script, if you find 5 minutes being too short.

⚠️ THIS FREE PRODUCT IS PROVIDED “AS IS”, WITHOUT ANY WARRANTIES, GUARANTEES, OR RIGHTS TO CLAIM OR COMPENSATION. PLEASE UNDERSTAND THAT FREE SECURITY TOOLS ARE FAR FROM THE BEST SOLUTIONS. ⚠️

DateChange Discription
02.11.2025Published final first version of the script.
03.12.2025Updated the script to use SID admin group instead of local admin group. This will make use possible for any Windows language.

Features

  • Uses Intune Win32 app package detection method to flag the status of admin rights been added. Detection file is also removed in 5 minutes together with previleges.

  • Logs activity in Event Viewer Application - node. Two log event will hapen - rights added and rights removed.

    image
  • Scheduled Task is hidden inside the node hierarcy that advanced user will not find the task to make his/her rights permanent

Instructions

Detection file is

C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AddTempAdminRights.flag

Command line for installation is

%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "AddTempAdminRights_v1.1.ps1"

Additional considerations

Add Account Protection Policy or Remediation Script in Intune to remove any local admin rights. Because with this tool, user will be capable to add side-by-side permanent local admin account.

Known issues

  • User will not be additionally prompted when rights are added. Only Company Portal installation status will appear. Make sure you write good instruction to application notes how it supposed to be used.
  • Some times Company Portal still shows "installed" status after rights are removed. This is due to Intune mdm policies not being updated yet. Users should still be capable of re-installing the app from CP.
  • If user shuts down or reboots computer during 5 min time frame, the admin rights will stay peremanently until next reboot.
image

About

This tool provides users to elevate themselves as admins for 5 minutes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published