-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with get-mggroup and other cmdlets in PowerShell 7.4.0 #2460
Comments
@Mirandur I wasn't able to reproduce the issue because I was able to execute the cmdlet without any errors. I'm suspecting that it could be an issue with module conflicts. Maybe you try uninstall the previous versions and manually delete those modules from the installation location. |
Good point. Remove all the modules. I had version 1.2.7 and 2.10.0 But no luck even with just one version the problem still occurs. |
Apologies, I forgot to include in the original post that I had already tried to remove previous versions of the module. I had the same thought, that it could be a module version mismatch, and made sure I had all versions removed before reinstalling version 2.10.0. I also tried reinstalling PowerShell 7.4.0 from Microsoft Store, though I have not tried the MSI. I can also note that I have the problem in VSCode as well. Also, when I first noticed the problem, I had only PowerShell 7.4.0 from Microsoft Store installed, in addition to Windows PowerShell 5, I installed PowerShell Core 7.3.10 from MSI after, to test. |
@Mirandur just found out that it's a bug with an experimental feature (WDAC) in PowerShell 7.4.0. I think the work around is to roll back to version 7.3.9 or just use PowerShell 5. This is the related issue PowerShell/PowerShell#20785 which has been classified as a bug. |
In that case, I guess this thread can be closed either now, or when that bug has been fixed? -I'm afraid I'm unfamiliar with due process, here...? |
Describe the bug
When running get-mggroup in a PowerShell 7.4.0 environment, the following error is returned:
I get similar errors when executing
Get-MgGraphMember
andGet-MgGraphOwner
. I have not tried any other cmdlets, but they may be affected.Versions affected: 2.9.0, 2.9.1, 2.10.0. I have not tried earlier versions. In versions prior to 2.10.0, Get-MgUser is affected by the same error, but it works in 2.10.0.
The issue is not present with a PowerShell 7.3.10 environment or earlier.
As this issue reports, the same error exist when module is installed directly in PowerShell Core and not via Windows PowerShell as I have: PowerShell/PowerShell#20707
To Reproduce
Steps to reproduce the behavior:
Connect-MgGraph
Get-MgGraph
with a valid group IDGet-MgGraphMember
with a valid group IDGet-MgGraphOwner
with a valid group IDExpected behavior
Debug Output
Module Version
Environment Data
Screenshots
Edit: A screenshot that shows Get-MgGroup being used in PowerShell 7.4.0 and 7.3.10 environments, with clarification that both environments use the same modules:
Additional context
The text was updated successfully, but these errors were encountered: