Import-SpbmStoragePolicy error - Object reference not set to an instance of an object
In a previous post I've talked about issues in the StoragePolicy and Tag cmdlets in PowerCLI. I found a workaround by ignoring certificate warnings and setting my date format to en-US.
Today I tried to replicate some Storage Policies from one vCenter to another and I found that I got new errors...
I can export the policies without issues, but when I try to Import the policy to the new vCenter I get the following error: "Object reference not set to an instance of an object". Update 2018-04-06: VMware has confirmed the issue and stated it will be fixed in PowerCLI 10.1
I double-checked my workaround found in the mentioned blog post, but that was in place. I tried the same command on a machine without the workaround and I got the same error.
There has been released a new version of PowerCLI so I tried to update PowerCLI (which by the way is really easy with the move to PSGallery).
Even with the latest version (VMware.VimAutomation.Storage 10.0.0.7894167) I get the same error
I did try the Tag cmdlet as the screenshot shows which didn't work on this machine earlier, and that bug seems to be fixed in this release!
I've filed a Support Request with VMware, but I guess I might need to argue a bit to have them look in to it. Last time I were told that PowerCLI wasn't supported, even though this post from the PowerCLI PM, Kyle Ruddy, clearly states that it should be.
To be continued...