r/PowerShell • • Mar 03 '21

Powershell scripts for beginners

121 Upvotes

21 comments sorted by

View all comments

-5

u/robomikel Mar 03 '21 edited Mar 03 '21

Note for the beginners. Get-CIMinstance is for PS7. use Get-WMIobject for PS5. If I am not mistaken.

10

u/Swarfega Mar 03 '21

You are mistaken. Although I think the CIM cmdlets came about in v3. Before then it was only WMI.

2

u/robomikel Mar 03 '21

Was doing on it my phone. Fixed the spelling. I use PS7. Remember trying to CIM and it failing server 2016. Guess would have to check the default versions for windows server.

6

u/Swarfega Mar 03 '21

2008 R2 came with V2 which didn't have CIM. 2012 R2 came with v4. Version 3 was the release that introduced the CIM cmdlets