Giter Site home page Giter Site logo

Switch to CIM cmdlets about pendingreboot HOT 8 OPEN

bcwilhite avatar bcwilhite commented on September 27, 2024 2
Switch to CIM cmdlets

from pendingreboot.

Comments (8)

dennisl68-castra avatar dennisl68-castra commented on September 27, 2024 5

Since PoSH 7.1 is 99% compatbile with PoSH 5.1, it's a shame that the WMI-dependency still exists in this module...
Why not just drop the WMI-support and move to a v2 release?

from pendingreboot.

DennisL68 avatar DennisL68 commented on September 27, 2024 1

It seems that CIM itself is supported in PowerShell since v3...

I.e. natively in Windows 8 and later.

So who is actually bound to using WMI if not using an unsupported Windows version?

https://devblogs.microsoft.com/scripting/what-is-cim-and-why-should-i-use-it-in-powershell/

https://devblogs.microsoft.com/powershell/introduction-to-cim-cmdlets/

from pendingreboot.

bcwilhite avatar bcwilhite commented on September 27, 2024

Actually this was on my to-do list at one point. I think it's a good idea to switch over given that v3 should be the least version widely used. I suppose a switch parameter could be used in order to leverage WMI, although I'd just prefer to go one way or the other and not have to support both.

from pendingreboot.

alayac avatar alayac commented on September 27, 2024

This is a great module and we use it extensively in our organization (along with it's predecessor from Technet Gallery).
I just tried this module in PowerShell 7 and it doesn't like the WMI cmdlets. Migrating to the CIM cmdlets should make this work in the latest version of PowerShell natively. No need to use a switch operator to support both. The CIM cmdlets are comparable and better optimized anyway.
Thanks!

from pendingreboot.

realslacker avatar realslacker commented on September 27, 2024

@bcwilhite if you merge this and someone needs WMI support they can just install the last release before switching to CIM. The current version has been working for people for years, so they should be able to just keep using it. Maybe just putting some explicit install instructions so people understand that to use WMI they use 0.9.0.6, anything after that uses CIM.

from pendingreboot.

realslacker avatar realslacker commented on September 27, 2024

@DennisL68 CIM uses WinRM (WSMAN) where WMI uses native WMI calls. I've come across a few scenarios where WMI is enabled, but WinRM is not, and vice-versa.

from pendingreboot.

DennisL68 avatar DennisL68 commented on September 27, 2024

@DennisL68 CIM uses WinRM (WSMAN) where WMI uses native WMI calls. I've come across a few scenarios where WMI is enabled, but WinRM is not, and vice-versa.

Yes, WMI uses RPC where as CIM uses a more controlled protocol as a carrier :)

from pendingreboot.

SamErde avatar SamErde commented on September 27, 2024

It shouldn't be hard to include an option to use WMI as a fallback method.

from pendingreboot.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.