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

SurveyDDA.ps1 fix for Powershell 6.0 and later #1986

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

froggx
Copy link

@froggx froggx commented May 23, 2024

The alias "gwmi" which called cmdlet "Get-WmiObject," no longer exists in Powershell 6.0 and later, breaking the script. Update to call "Get-WmiObject" cmdlet by its full name rather than the removed alias.

The cmdlet "Get-WmiObject" with, used in "SurveyDDA.ps1" as the alias "gwmi," was superseded by "Get-CimInstance" in Powershell 3.0 and later.  This causes calls the calls to "gwmi" the occur in the script to fail starting with Powershell 3.0. This update replaces "gwmi" with "Get-CimInstance" for compatibility with these later Powershell versions.
Copy link
Contributor

Learn Build status updates of commit ecceb59:

✅ Validation status: passed

File Status Preview URL Details
hyperv-tools/DiscreteDeviceAssignment/SurveyDDA.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@froggx froggx changed the title Update SurveyDDA.ps1 SurveyDDA.ps1 fix for Powershell 3.0 and later May 23, 2024
@froggx froggx changed the title SurveyDDA.ps1 fix for Powershell 3.0 and later SurveyDDA.ps1 fix for Powershell 6.0 and later May 23, 2024
Copy link
Contributor

Learn Build status updates of commit 94dba1e:

✅ Validation status: passed

File Status Preview URL Details
hyperv-tools/DiscreteDeviceAssignment/SurveyDDA.ps1 ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant