Share via

Admin issue win 11 devices

TechUST 696 Reputation points
2024-06-04T23:29:18.68+00:00

Hi Team,,

Currently, my credentials as an admin are not working on some machines, even though my username is set as a global admin. My username works as an admin on all machines except a few. All machines are autopilot machines. Is there any policy we can deploy to fix this? Please suggest.

Microsoft Security | Intune | Other
0 comments No comments

Answer accepted by question author

  1. ZhoumingDuan-MSFT 17,365 Reputation points Microsoft External Staff
    2024-06-05T05:48:43.4633333+00:00

    @TechUST, Thanks for posting in Q&A.

    We can deploy a PowerShell script to add the account to administrator groups.

    Create a .ps1 file and with the below script, then upload the script into Intune and deploy it to device.

    net localgroup administrators /add "AzureAD\UserUpn"

    https://learn.microsoft.com/en-us/mem/intune/apps/intune-management-extension

    Or create a custom policy using ConfigureGroupMembership setting to add the account to Administrator groups, then the account will own admin rights.

    https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-restrictedgroups#configuregroupmembership

    https://www.jeffgilb.com/managing-local-administrators-with-azure-ad-and-intune/

    Non-official, just for reference.

    Hope above information can helpful.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.