2

I recently installed Powershell 7.3.5, being "forced" to move away from 5.1 for PnP / SharepointPnP

As an admin, while running it as an admin, regardless of the scope returns :

Install-Package: 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).

There is a reason why it could not write in user Documents folder,

I ended up manually putting the module in P7's install module folder, but this is weird.

PS C:\Windows\System32> Save-Module -Name ExchangeOnlineManagement -Path C:\Temp -Repository PSGallery
PS C:\Windows\System32> Import-Module ExchangeOnlineManagement
PS C:\Windows\System32> Connect-ExchangeOnline

So it works, but I have no idea why he can't access it, at the very list a /alluser install should work.

Not saying I want to say goodbye to the ISE, but it seems to be the way forward in most ways.

Narzard
  • 3,840

1 Answers1

0

I have the same problem. The Windows Defender blocked the file-access to the powershell module path. I have to allow in the windows settings, pswd to access the module path.