Skip to content

Use CIM cmdlets instead of WMI cmdlets in tests - #11423

Merged
Aditya Patwardhan (adityapatwardhan) merged 6 commits into
PowerShell:masterfrom
xtqqczze:AvoidUsingWMICmdlet
Jan 3, 2020
Merged

Aditya Patwardhan (adityapatwardhan) merged 6 commits into
PowerShell:masterfrom
xtqqczze:AvoidUsingWMICmdlet

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Dec 23, 2019 •

Copy link
Copy Markdown
Contributor

PR Summary

PR Context

  • WMI cmdlets were removed in PSVersion 6
  • Fixes PSScriptAnalyzer rule violation AvoidUsingWMICmdlet

PR Checklist

@xtqqczze

Copy link
Copy Markdown
Contributor Author

2019-12-23T04:44:38.1811873Z New-CimInstance: D:\a\1\s\test\powershell\Language\Scripting\OrderedAttributeForHashTables.Tests.ps1:52
2019-12-23T04:44:38.1815776Z Line |
2019-12-23T04:44:38.1822496Z 52 | … $script:a = New-CimInstance -ClassName Win32_Environment -Property ([ …
2019-12-23T04:44:38.1823774Z
2019-12-23T04:44:38.1827509Z | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-12-23T04:44:38.1832703Z | Access denied

@xtqqczze

Copy link
Copy Markdown
Contributor Author

2019-12-27T00:53:00.2202932Z [-] https://gitter.im/PowerShell/PowerShell?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge should work 269.56s
2019-12-27T00:53:00.2787888Z RuntimeException: retry of URL failed with error: Response status code does not indicate success: 504 (GATEWAY_TIMEOUT).
2019-12-27T00:53:00.2790901Z at , /home/vsts/work/1/s/test/common/markdown/markdown-link.tests.ps1: line 117

@xtqqczze

xtqqczze commented Dec 27, 2019 •

Copy link
Copy Markdown
Contributor Author

PowerShell-CI-static-analysis was broken by a Gitter outage.

Issue opened: #11437

@xtqqczze xtqqczze changed the title [WIP]Use CIM cmdlets instead of WMI cmdlets in tests Use CIM cmdlets instead of WMI cmdlets in tests Dec 27, 2019
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit ee71081 into PowerShell:master Jan 3, 2020
@adityapatwardhan

Copy link
Copy Markdown
Member

xtqqczze Thank you for your contribution!

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Jan 3, 2020
@xtqqczze
xtqqczze deleted the AvoidUsingWMICmdlet branch January 22, 2020 16:23
@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants