Afternoon Communities .
I am having problems with querying TAGS and Storage Polices and it appears I am not the only one on communities .
VCSA6.02
PowerCLI 6.5.1 and 6.03 and .6.31.
When I run the following from PowerCli 6.5.1 :
Get-SpbmStoragePolicy -Namespace "Bronze Datastore Policy"
Or Just Get-SpbmStoragePolicy
I get Object reference not set to an instance of an object
I tried community solutions like setting date format to US English and accepting invalid certs .
https://www.rudimartinsen.com/2017/07/14/issues-with-get-spbm-powercli-cmdlets-and-vcenter-6-5/
No luck . Then I found
VMware PowerCLI Forum - VMware {code}
I did Get-Tag | Where {$_.Category -eq $null}
It returned quite a few uncategorized SRM-CG and SRM-PG ones .
I am however pretty sure I cannot delete or edit those , from names , they were clearly created by system : EG
Name Category Description
---- -------- -----------
SRM-CG-341213cf07293d273f81... Site Recovery Manager Consistency Group Tag for Replica...
SRM-PG-939d00673c75ea9c7a47... Site Recovery Manager Protection Group Tag for Protecte...
So I tried two other Windows Management server with PowerCLI 6.03 and 6.3.1 as some communities suggest its a but in PowerCLI 6.5.1
Now I cannot even do get-tag :
Index was outside the bounds of the array
Where to now ?
Any help would be greatly appreciated .
Ultimate goal is to get Storage Policies set to ensure Storage Tier and SRM protection are automatically dealt with during VM provisioning
Did you already try with PowerCLI 6.5.4?
There were some tag issues that were fixed recently.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Did you already try with PowerCLI 6.5.4?
There were some tag issues that were fixed recently.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ok let me try that , just getting Windows Management Framework . I see PowerCLI is no longer just a downloadable exe
Correct, since 6.5.1 PowerCLI is distributed via the PowerShell Gallery.
Install-Module -Name VMware.PowerCLI
is all you need if you're on a PC with an Internet connection.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
So i've gone and installed 6.5.3 and when I run Get-PowerCLIVersion it comes back w/ :
PowerCLI Version
----------------
VMware PowerCLI 6.5.1 build 5377412
---------------
Component Versions
---------------
VMware Cis Core PowerCLI Component 6.5 build 6983166
VMware VimAutomation Core PowerCLI Component 6.5 build 6234650
So I tried running the following command:
PS U:\> Update-Module -name VMware.PowerCLI -RequiredVersion 6.5.4.7155375 -Verbose
VERBOSE: Checking for updates for module 'VMware.PowerCLI'.
VERBOSE: Repository details, Name = 'PSGallery', Location = 'https://www.powershellgallery.com/api/v2/'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'PSGallery'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='VMware.PowerCLI'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'VMware.PowerCLI'.
VERBOSE: Skipping installed module VMware.PowerCLI 6.5.4.7155375.
I'm having the same problem as Almero, I can't run TAG commands and I can't run any VMware.VIMAutomation.Storage module commands.
I did notice SOMETIMES when I run a tag command from a version of PowerCLI of 6.5 or 6.1 my tag commands error out with the following:
Tag's used to work when we were on vCSA 6.0 but as soon as I updated to 6.5U1 (was only trying this once we finished upgrade) it all stopped working...
I've tried this on multiple machines, w/ different versions of PowerCLI and it seems to be consistent in the fact that it just no longer works...
I would suggest to open a SR.
And yes, PowerCLI is supported, you can point the tech to PowerCLI Support Breakdown
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD, I followed your post Get-SpbmStoragepolicy and vCenter 6.5 but noticed in my situation i'm unable to get any results when using the get-tag command you all talked about in the other thread:
I'm wondering if its something to do with vCSA 6.5U1 or 6.5 in general? As I am only able to get this result when using a Windows 2008 R2 server with PowerCLI 6.3 R1 installed (Error is image above)
When I try to run these same commands on Win10 Pro 1709 the commands just say executing and never stop, i've left a window open for 2 hours and it never error'd out...
Does anyone have any suggestions as I've been searching and reading all morning and this was the CLOSEST thread i've found and it looks like others have the same issue.... Has anyone opened up a Service Request? If not I think I will...
Just wanted to give an update....
I'm on the phone w/ support we have a Enterprise Plus Support Agreement, and this person i'm talking to will NOT troubleshoot or support this request.. She says it requires a SDK Entitlement Agreement, which makes no sense... DO we have access to anyone in this community who can help us with this support problem, as it seems to be a general issue with vCenter 6.5 (from what I can tell..), thanks!
As Kyle wrote in that post I mentioned earlier, you could pass this to your account team.
In parallel I'll try to get this under the attention of one of the PowerCLI persons.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD, so had to talk to a Support Manager, who has to get clarification from the SDK team on what to do as he is saying internal documents regarding PowerCLI support are contradicting the blog post you kindly gave to me. I don't know why its difficult to have this supported literally took me 30min of arguing w/ the initial tech to even get them to escalate to the support manager, after asking for it multiple times. Hopefully will get help so I can pass it along.
Thanks for all your help and the article, if it wasn't for them literally reading that article themselves, and showing it to the support manager I would have still been arguing my point till now, much appreciated!
Hi Guys .
I have upgraded to Windows Management Framework 5.0 and PowerCLI 6.5.4 .
Get a new error >
From my humble point of view it does look like its related to SRM auto Tags not returning a category .
Funny thing is , in the web client there is a built in category not shown via PowerShell .
I am trying to find out if I can disable these SRM auto tags if I DO NOT intend to use Storage DRS ( without breaking my Protection groups and RPs )
Option 2 listed in this informal article .
Site Recovery Manager 6 and Storage DRS Tagging: Part II–FlashArray SRA | Cody Hosterman
Any Thoughts ?
Today I also encountered this issue when trying to replicate Storage policies between vCenters. When Importing I get "Object reference not set to an instance of an object"
I've done this from a machine where I'm using the workaround from (my mentioned blogpost in this first post) for the Tags bug. Still I see this error.
After updating to the latest version of PowerCLI (v 10) on a different machine without the mentioned workaround I see that the Tags cmdlet now seems to work as intended but the error from Import-Spbmstoragepolicy is still present
I'll try to open a SR, but from the last time I did that after finding the Tags bug I'm expecting them to go with the "not supported" thing again. Even if I reference to the post from Kyle
Did you get the error with PowerCLI 10?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hello,
I'm seeing the same error - did you figure this one out?
I've tried PowerCLI 6.5 and now 11:
PowerCLI Version
----------------
VMware PowerCLI 11.0.0 build 10380590
---------------
Component Versions
---------------
VMware Cis Core PowerCLI Component PowerCLI Component 11.0 build 10335701
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 11.0 build 10336080
VMware VimAutomation Storage PowerCLI Component PowerCLI Component 11.0 build 10380343
Thanks,
Jon