-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
Description
Steps to reproduce
PS C:\Users\rfull> $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
PS C:\Users\rfull> $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
True
PS C:\Users\rfull> PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
Install-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9709
Line |
9709 | … 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).Separately but maybe something is busted on my machine:
PS C:\Users\rfull> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
Confirm
Are you sure you want to perform this action?
Performing the operation "Set-ExecutionPolicy" on target "RemoteSigned".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
Set-ExecutionPolicy: Could not find file 'C:\Users\rfull\OneDrive\Documents\PowerShell'.Expected behavior
posh-git is installed and execution policy is updated.
Actual behavior
Install-Package: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:9709
Line |
9709 | … 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.0.1
PSEdition Core
GitCommitId 7.0.1
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
cyungmann, ajayverse404, sezf-opscentral, david-jarman and ohadschn
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a