So I am reading this post http://blogs.vmware.com/PowerCLI/2013/12/using-tags-with-powercli.html
because there are a few things I want to start using tags for.
We're running vCenter 6.0 and ESXi 6.0.
When I run get-tag I get an error
Get-Tag : 4/19/2016 9:01:23 AM Get-Tag Index was outside the bounds of the array. At line:1 char:1 + Get-Tag -Name "Operations" + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-Tag], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio n.ViCore.Cmdlets.Commands.Tagging.GetTag
When I run
get-vm -tag Operations
I get
get-vm : 4/19/2016 8:28:58 AM Get-VM Value cannot be null. Parameter name: collection
At line:1 char:1 + get-vm -Tag Operations + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-VM], VimException + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM
For OS I am running Windows 10, Powershell 5 and PowerCLI 6.3.8258
There is a tag called Operations and a category called Operations VMs in vCenter.
This issue occurs if I am running Powershell with the PowerCli modules added to it or if I launch PowerCLI itself.
I have tried googling the errors with both powershell and powercli in the query but end up getting back long functions or scripts that are building large arrays or resource issues which my machine isn't having an issue with.
If I run the same command on the Windows vCenter server I get the exact same error.
There is a VM that exists on the target vCenter with the "Operations" tag.
Any suggestions on how to troubleshoot or approach this?