You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
# Check if I am running in elevated command prompt:
[bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match"S-1-5-32-544")
True
Install-Module AzureAd -Scope CurrentUser -Force
Expected behavior
Expect the module to be updated in the current user scope
The same issue has been reported in issue #12777 but that issue was closed as some users reported the problem had to do with Controlled Folder Access.
In my case controlled folder access is off but I still have the issue.
Actual behavior
Get this error. The error message is not correct as I am running from an elevated command prompt. So either the message is wrong or there is a bug.
Install-Module AzureAd -Scope CurrentUser -Force
Install-Package: C:\Users\yooak\OneDrive\Documents\PowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:9711
Line |9711| … talledPackages =PackageManagement\Install-Package@PSBoundParameters| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Administrator rights are required to install or update. Log on to the computer with an account that
| has Administrator rights, and then try again, or install by adding "-Scope CurrentUser" to your
| command. You can also try running the Windows PowerShell session with elevated rights (Run as
| Administrator).
Environment data
Name Value
---------
PSVersion 7.1.3
PSEdition Core
GitCommitId 7.1.3
OS Microsoft Windows 10.0.19042
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0