A python script for removing users from Administrators
local group and adding them to Users
local group in Windows.
This is generally useful for organizations or individuals who want to remove admin privileges from their provided laptops to their employees.
-
Run the
Command prompt
as an administrator in your Windows machine. -
Clone the repository:
git clone https://github.com/manavarya999/windows-admin-remover.git
-
Head over to the directory:
cd windows-admin-remover
-
Run the python script:
python windows-admin-remover.py
-
To check that the user has been removed from
Administrators
group and added toUsers
group, execute the following command:net user <username>
-
Look under
Local Group Memberships
it should be equivalent to*Users
only.