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

Suggestion: update get-wmiobject to get-ciminstance #58

Open
samcharles93 opened this issue Mar 22, 2018 · 5 comments
Open

Suggestion: update get-wmiobject to get-ciminstance #58

samcharles93 opened this issue Mar 22, 2018 · 5 comments

Comments

@samcharles93
Copy link

samcharles93 commented Mar 22, 2018

I have noticed in a few of the commands run from clictr they run as get-wmiobject.

for example, Installed Programs runs sms_installedprograms as gwmi and returns "InstallDate" as an unreadable format, however if you just change to Get-CimInstance, the format is readable.

Get-CimInstance -ClassName SMS_InstalledSoftware -Namespace "ROOT\CIMV2\SMS

hope this makes some sort of sense.

@rzander
Copy link
Owner

rzander commented Mar 22, 2018

Thx, will check that...
Note that these Kind of changes will become part of the project: https://github.com/rzander/sccmclictrlib

@rzander
Copy link
Owner

rzander commented Apr 18, 2018

I've published an new sccmclictr.automation.dll (https://github.com/rzander/sccmclictrlib/releases) whic is using Get-CimInstance ... For testing, you can replace the existing version with the new one ...

@mhomoky
Copy link

mhomoky commented Jul 31, 2018

Can I suggest:

  • check if PS 3.0 (minimum required for CIM) is installed on local client executing tool

  • check if remote client will accept WinRM calls, and fallback to DCOM variant if not? (e.g. base Win7 installs with SP1)

This hardens the library and makes it more versatile. Otherwise remote clients report "blank" in s/w inventory for example. Happy to try to help with code / testing if required.

@rzander
Copy link
Owner

rzander commented Jul 31, 2018

PowerShell 4 is a requirement for the Host and the remote Client(https://github.com/rzander/sccmclictr#requirements) … Just update your Clients to >=PoSh 4 !

WinRM is also a requirement. It much easier to just enable WinRM on the OLD Win7 clients than rewriting the tool for an OS which is EOL soon...

@mhomoky
Copy link

mhomoky commented Aug 21, 2018

Get-CIM cmdlets were introduced in PoSH 3.0 IIRC. I can’t see any sane reason anyone upgrading PowerShell on a Win 7 client would install anything other than 5.1.

For the host I agree 5.1 is best (or >= 4.0), for WinRM support 2.0 works fine on the client as long as WinRM is running. This often requires psexec first to kick that off.

Our environment of around 3000+ PCs is all Win 7 and the customer refuses to install PoSH 5.1 in the imaging build, so all 5.1 installs are manual 😖

And on the support side there’s still > 18 months to run before EOL for Win 7, I think?

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

No branches or pull requests

3 participants