Hello.
You can do this by using a combination of Group Policy and a feature called Elevated Privileges. However, instead of a one-time password, the method grants users temporary elevated privileges for a specific task or time frame through Group Policy preferences.
Use Group Policy and Task Scheduler to create temporary local Administrators group memberships. You can use Group Policy preferences to temporarily add users or groups to the local Administrators group. Set the action to apply only once, specify when it should be performed (for example, at sign-in), and set an expiration date to automatically remove it from the group:
- Navigate to Computer Configuration > Preferences > Control Panel Settings >Local Users and Groups.
- Create a new Update action for the local Administrators group.
- Specify user accounts and set up project-level targeting (targeting specific computers/users) as needed.
- Use the General tab to configure the duration (start date and end date).
Best Regards,
Hania Lian
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.