Skip to content
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

Replace Get-WMIObject with Get-CimInstance to ensure compatibility with PowerShell 7.X #405

Closed
TuemmlerKelch opened this issue Sep 28, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@TuemmlerKelch
Copy link
Collaborator

TuemmlerKelch commented Sep 28, 2023

In order to ensure compatibility with PowerShell Version 7, change Get-WMIObject to Get-CimInstance. Reason:
Powershell 7 is based on .Net Core and .Net Core does not support WMI.

https://forums.powershell.org/t/powershell-7-is-missing-get-wmiobject/14011

@TuemmlerKelch TuemmlerKelch added the bug Something isn't working label Sep 28, 2023
@TuemmlerKelch TuemmlerKelch added this to the 5.6.1 milestone Sep 28, 2023
@TuemmlerKelch TuemmlerKelch added the critical This needs to be fixed asap label Sep 28, 2023
@TuemmlerKelch TuemmlerKelch changed the title Windows 11 Report fails in multiple occasions PowerShell from ms store fails when calling Get-Windowsoptionalfeature Sep 29, 2023
@TuemmlerKelch TuemmlerKelch added enhancement New feature or request and removed bug Something isn't working critical This needs to be fixed asap labels Sep 29, 2023
@SteffenWinternheimer SteffenWinternheimer changed the title PowerShell from ms store fails when calling Get-Windowsoptionalfeature Replace Get-WMIObject with Get-CimInstance to ensure compatibility with PowerShell 7.X Oct 4, 2023
@qngngyn qngngyn closed this as completed Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants