I created a Windows 11 24H2 VM using this autounattend.xml and it works pretty good except for one issue...
When I am logged in as a local user (who has administrator privileges) and open command prompt, PowerShell or PowerShell 7 it always launches it as "Administrator" and not current user. This happens when using both Windows Terminal and ConHost app.
What am I missing? Any help would be much appreciated.
I created a Windows 11 24H2 VM using this autounattend.xml and it works pretty good except for one issue...
When I am logged in as a local user (who has administrator privileges) and open command prompt, PowerShell or PowerShell 7 it always launches it as "Administrator" and not current user. This happens when using both Windows Terminal and ConHost app.
What am I missing? Any help would be much appreciated.
Share Improve this question asked 9 hours ago RanvirRanvir 234 bronze badges1 Answer
Reset to default 0It sounds like your VM is automatically launching Command Prompt and PowerShell with Administrator privileges. Start by checking your UAC settings in the Control Panel and make sure it's not set to "Never notify." Then, open the regedit and make sure the AutoAdminLogon key is set to 0, and remove any Autorun entries under Command Processor. Next, run gpedit.msc and check that "User Account Control: Behavior of the elevation prompt" is set to "Prompt for consent." and Finally, if you’re using Windows Terminal, check the settings to ensure "elevate": true is set to false. This should stop Command Prompt and PowerShell from opening as Administrator by default.
I hope this helps!