A script to remove a local user from the administrators group, ensuring it runs with administrator privileges.
This script is designed to remove a specified local user from the administrators group on a Windows machine. It ensures that the script runs with administrator privileges.
- Windows operating system
 - Administrator credentials
 
git clone https://github.com/YOUR_USERNAME/RemoveUserFromAdminGroup.git cd RemoveUserFromAdminGroup
- Open RemoveUserFromAdminGroup.au3 in a text editor.
 - Replace ADMIN USER NAME and ADMIN PASSWORD with the actual administrator username and password.
 
- Execute the script using an AutoIt interpreter or compile it to an executable.
 
The script performs the following steps:
If the script is not running as an administrator, it displays an error message and exits.
Prompts the user to enter the username of the account to be removed from the administrators group.
Uses the net localgroup command to remove the specified user from the local administrators group.
Displays a message indicating whether the user was successfully removed from the administrators group.
Prompts the user to restart the computer immediately or later.