Skip to content

Version 6 Cookbook Document References Get-WMIObject #2382

@doctordns

Description

@doctordns

Issue Details

If you navigate to: https://docs.microsoft.com/en-us/powershell/scripting/getting-started/cookbooks/collecting-information-about-computers?view=powershell-6, you see PowerShell V6's version of this document. It references Get-WMIObject which is not supported in PowerShell V6.

Version(s) of document impacted

  • Impacts 6.1 document
  • Impacts 6.0 document
  • Impacts 5.1 document
  • Impacts 5.0 document
  • Impacts 4.0 document
  • Impacts 3.0 document

Reason(s) for not selecting all version of documents

  • The documented feature was introduced in the selected version of PowerShell
  • This issue only shows up in selected versions of the document

One way to resolve this would be to re-draft the article to use Get-CIMInstance which works. I've just done a quick test and it looks like most of the code is trivial to change. By using the CIM cmdlets rather than then older WMI cmdlets, the system properties are not returned with Get-CimInstance, so that discussion can be dropped.

Additionally, the wrapper object for WMI data returned by Get-Ciminstance (Microsoft.Management.Infrastructure.CimInstance) has some interesting properties that could be documented in an update to this document.

I'll happily do the re-write - and it should be a replacement for this document in ever version (Get-CimInstance was introduced, IIRC, in V3).

Comments?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Priority - Low

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions