PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,219 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Please can you help. I am new to MgGraph in PowerShell
I have been playing around with different scopes. I now want to remove then, so that I get back to least privilege to deploy my powerhouse scipt.
I have restarted powershell
Issued
Disconnect-MgGraph (Which does diconnect, if there has been a connection)
Connect-MgGraph -Scopes "User.Read" (Which prompts me for a user and password)
Get-MgContext | Select Scopes
Here I am wanting to just see User.Read (along with other default scopes), but I am seeing all the scopes I have ever entered.
Is there an easy way of clearing this down.