10 Replies Latest reply on Nov 22, 2017 1:01 AM by Almero

    POWERCLI and Storage Polices ( SPBM ) Issues .

    Almero Enthusiast

      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

        • 1. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
          LucD Guru
          User ModeratorsvExpertCommunity Warriors

          Did you already try with PowerCLI 6.5.4?

          There were some tag issues that were fixed recently.

          1 person found this helpful
          • 2. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
            Almero Enthusiast

            Ok let me try that , just getting Windows Management Framework . I see PowerCLI is no longer just a downloadable exe

            • 3. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
              LucD Guru
              vExpertUser ModeratorsCommunity Warriors

              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.

              • 4. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
                BattleNerd Novice

                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...

                • 5. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
                  LucD Guru
                  vExpertUser ModeratorsCommunity Warriors

                  I would suggest to open a SR.
                  And yes, PowerCLI is supported, you can point the tech to PowerCLI Support Breakdown

                  • 6. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
                    BattleNerd Novice

                    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...

                    • 7. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
                      BattleNerd Novice

                      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!

                      • 8. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
                        LucD Guru
                        Community WarriorsUser ModeratorsvExpert

                        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.

                        • 9. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
                          BattleNerd Novice

                          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!

                          • 10. Re: POWERCLI and Storage Polices ( SPBM ) Issues .
                            Almero Enthusiast

                            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 ?