ChrisTitusTech / ChrisTitusTech/powershell-profile
Profile Error under PowerShell 5,1
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 1k
- Forks
- 469
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Profile has an error when loading under PowerShell 5.1.
Steps to reproduce
- Open PowerShell
- Run
- Observe error
Expected behavior
No error.
Actual behavior
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Set-Alias : The AllScope option cannot be removed from the alias 'gp'.
At C:\Users\effadj\OneDrive - Abbott\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:781 char:1
- Set-Alias -Name gp -Value gpush -Force
-
+ CategoryInfo : WriteError: (gp:String) [Set-Alias], SessionStateUnauthorizedAccessException + FullyQualifiedErrorId : AliasAllScopeOptionCannotBeRemoved,Microsoft.PowerShell.Commands.SetAliasCommand
Use 'Show-Help' to display help
Loading personal and system profiles took 2969ms.
OS
Windows 11 Enterprise 25H2 (OS Build 26200.9278)
PowerShell version
5.1.26100.9278
Logs or screenshots
Set-Alias : The AllScope option cannot be removed from the alias 'gp'.
At C:\Users\effadj\OneDrive - Abbott\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:781 char:1
- Set-Alias -Name gp -Value gpush -Force
-
+ CategoryInfo : WriteError: (gp:String) [Set-Alias], SessionStateUnauthorizedAccessException + FullyQualifiedErrorId : AliasAllScopeOptionCannotBeRemoved,Microsoft.PowerShell.Commands.SetAliasCommand
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the profile code that defines the gp alias and compare its Set-Alias behavior with PowerShell 5.1. Reproduce the profile load under PowerShell 5.1 and verify that the profile loads without the AllScope error while preserving the intended gp alias.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100