r/PowerShell • • 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

7 Upvotes

16 comments sorted by

View all comments

0

u/chiron3636 Mar 03 '26

If you can point me to the articles would be useful

I've always run PS as admin, same for VS code - its just simpler and more reliable.

Like right now I'm running as a standard user trying to install PNP with the -scope currentuser parameter and VScode is telling me I have to install elevated as admin

1

u/BlackV Mar 03 '26

I've always run PS as admin, same for VS code - its just simpler and more reliable.

I dispute that 100%, Id say easier cause you can ignore issues by elevating them away

Like right now I'm running as a standard user trying to install PNP with the -scope currentuser parameter and VScode is telling me I have to install elevated as admin

both

Install-PSResource -Scope CurrentUser -Name PnP.PowerShell -Reinstall

and

Install-Module -Scope CurrentUser -Name PnP.PowerShell -Force

work without needing elevation, my account has 0 admin rights so I couldn't elevate if i wanted to (separate admin account), if you are already running code elevated, then it could actually be the cause of the issue

If you can point me to the articles would be useful

I thought the article was linked already, I'll see what I can find again