7 Replies Latest reply on Nov 15, 2019 3:21 AM by jvm2016

    srm8.1 _powercli

    jvm2016 Expert

      Hi Luc/powercli team ,

       

      if you could suggest something to get below functionality through rest apis ...

      i can see only two commands available for powercli 11.2 srm module .

       

       

       

       

       

        • 1. Re: srm8.1 _powercli
          LucD Guru
          Community WarriorsUser ModeratorsvExpert

          The PowerCLI implementation for SRM access is a bit different.

          There are indeed only 2 cmdlets in the module.

          But after you connect, the other methods are available via a global variable.

           

          $global:DefaultSrmServers.ExtensionData

           

          With the Get-Member cmdlet you can find out which methods, and properties, are available.

          You can do for example

           

          $global:DefaultSrmServers.ExtensionData.GetLocalSiteInfo()

           

          $global:DefaultSrmServers.ExtensionData.GetPairedSite()

          • 2. Re: srm8.1 _powercli
            jvm2016 Expert

            thanks Luc ,

            i think this should give extra information .

            i am working on one srm configuration check script as i discussed in last post .

            till now i have

            1:getting prod and dr site srm windows machines

            2:getting respective services using  cim sessions .

            3.other info using the metthods you suggested now .

             

            i will share the script shortly for you to check and if anything extra you can suggest .

            • 3. Re: srm8.1 _powercli
              jvm2016 Expert

              Hi Luc,

               

              If you can have a look on the attached script.

              • 4. Re: srm8.1 _powercli
                LucD Guru
                vExpertCommunity WarriorsUser Moderators

                I don't have a lot of experience with SRM servers, but a few comments/questions.

                 

                • On the Connect-SrmServer cmdlet you don't provide the SrmServerAddress parameter. This will not work when you have multiple SRM servers.
                • I'm not sure why you do the New-CimSession, while there are no CIM commands later on? The Invoke-Command does not need a CIM session afaik
                • 5. Re: srm8.1 _powercli
                  jvm2016 Expert

                  This is what i think of the following points.

                  • On the Connect-SrmServer cmdlet you don't provide the SrmServerAddress parameter. This will not work when you have multiple SRM servers.

                  this has been created considering the fact that we are not aware of the "SRM INFRASTRUCTURE ".so once i connect to prod vcenter and use

                  connect-srmserver without any switches it will disply what SRM server is configured on prod .same logic goes for DR site.

                  • I'm not sure why you do the New-CimSession, while there are no CIM commands later on? The Invoke-Command does not need a CIM session afaik

                  i just checked you are absolutely right i just greyed out new-cimsession commands as invoke-command is working.

                   

                   

                  just thought of asking if there are rest apis available for srm 8.1 ??

                  • 6. Re: srm8.1 _powercli
                    LucD Guru
                    Community WarriorsvExpertUser Moderators

                    The SRM API Reference is at https://code.vmware.com/web/sdk/8.1/site-recovery-manager

                    But you need to use an account that is permitted to access it.

                    • 7. Re: srm8.1 _powercli
                      jvm2016 Expert

                      Thanks Luc ,

                       

                      I am checking for the required access ..