CodyMathis123 / PSCCMClient

PowerShell Module for managing the MEMCM client
GNU General Public License v3.0
29 stars 8 forks source link

macos support & fix invoke-ccmsoftwareupdate using pssession #55

Closed theaquamarine closed 2 years ago

theaquamarine commented 2 years ago

CimInstance and cim cmdlets are Windows-only, so anything using them elsewhere errors. Fortunately, most of the usage here isn't strictly required- most of the usage is casting the output from Get-CimInstance to [CimInstance[]], which is not usually required.

The only situation (I think) where a [CimInstance[]] specifically is required is CCM_SoftwareUpdatesManager's InstallUpdates() method, which is solved by doing the cast to [CimInstance[]] on the target machine via Invoke-Command, which will always have the type available if Invoke-CimMethod is going to work.

CodyMathis123 commented 2 years ago

I like it!

Thank you very much for digging into this module :)