r/PowerShell • u/chiron3636 • Feb 26 '26
Question PS/Code unable to login via Powershell
When connecting to Connect-AzAccount or any other O365 services I'm getting
"Microsoft Edge is unable to launch child processes due to a Group Policy. If Microsoft Edge is running as administrator* please try running edge delevated"
*I am launching Code or PS as admin with my split admin account as your supposed to.
When it launches edge to authenticate my account
Not sure if its something machine specific or an issue with wider environment - nobody else seems able to replicate and it was all working a week or so ago.
Dr google hasn't been particularly helpful but I'm leaning towards a defender issue.
Just want to confirm if anyone else has seen this at all or can suggest a work around
Getting a funky error when using VScode and Powershell (ISE and standard)
Not sure if its something machine specific or an issue with wider environment - nobody else seems able to replicate
View all comments
Show parent comment
1
u/LogMonkey0 Feb 27 '26
So many moving parts, you just expose your system to unnecessary risk. You basically giving access to anything in code to modify your system with elevated rights (chat, extensions, any files you open might trigger tools and tasks in vscode…)
One other option, if what you are trying to do would support it, would be to pass a credential object with the account needed to do the work as parameter to your script (if the script itself doesn’t need elevation, but just supplying credentials for an alternate account does it)
I still prefer “working” with my code outside the authoring tool.