Working on some scripts in the lab, I attempted to use PowerShell to import some computer information, literally copying and pasting the sample code from the Import-CMComputerInformation TechNet article and substituting a custom collection. I was greeted with the following error:
WARNING: The collection OSD Management does not exist or is not suitable for adding the new device.
Some quick research revealed that this was a known bug in the SP1 PowerShell cmdlets that was fixed with CU1:
OK, great. Easy fix. I knew I hadn’t updated my hydration build with CU1 yet and had just rebuilt the lab two weeks ago, so I grabbed the CU1 install and ran the update…
Wait…what do you mean, “This update has already been installed on this system.”? And where did KB2801987 come from…I thought I was installing KB2817245, not just the hotfix for the MicrosoftPolicyPlatformSetup.msi error? Now that I think about it, my hydration kit had been built with the “oops” release of the SP1 media, so I did install KB2801987 on the server to fix OSD issues. Anyway, I look in both the regular Programs and Features list and the View Installed Updates list…no sign of either KB. Let’s see what the log says…
Pull it up in regedit and sure enough, there it is:
Basically, we have two options at this point: uninstall KB2801987 and then install CU1 (KB2817245), or extract a what we need from the latter and apply it separately. I highly recommend the former.
Method 1 – Clean Install
Using the UninstallString from the registry information, I removed KB2801987 and then ran the CU1 update again. This time the prereq check passed and I was able to walk through the entire install. This ensured that the full update installation went through and all relevant issues to the CU were fixed.
Method 2 – Just give me my working cmdlets
Initially, I just wanted to get the cmdlets working, so I discovered through a little poking around that the AdminConsole update may need to be manually run (see post by Kaido1000) in some instances. So I extracted the CU1 executable, ran an administrative install of the configmgr2012-sp1-cu1-kb2817245-x64-enu.msi file, and grabbed the configmgr2012adminui-sp1-kb2817245-i386.msp file.
So, with either method accomplished, we’re ready to run our Import-CMComputerInformation cmdlet again and create our computer.
Yeah…not quite. We run the same command, and we definitely get a different result:
Import-CMComputerInformation : A parameter cannot be found that matches parameter name ‘SmsBiosGuid’.
Well, the patch definitely changed something. Did they change the parameters of the cmdlet?
Interesting…so with SP1 the parameter is -SmsBiosGuid and with CU1 it’s now -SmBiosGuid. Hopefully Microsoft will get the online reference updated at some point.
Run it again with the new parameter…
…and finally we have what we came for.