I am administrator on my Windows10, and trying to install Azure PS module as per the documentation in here.
PS C:\Program Files\PowerShell\7> Install-Module -Name Az -Scope CurrentUser -Force -Allowclobber
However, I get the error message as below..
Install-Package: C:\program files\powershell\7\Modules\PowerShellGet\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).
It does not make sense why it throws this error even though I am already in admin privilege mode. Few other SO answers asked to set to use TLS 1.2, I have done that as well. Like so:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
What else could be the issue ?