VMware Cloud Community
jvm2016
Hot Shot
Hot Shot
Jump to solution

srm8.1 _powercli

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 .

pastedImage_1.png

pastedImage_0.png

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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()


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
7 Replies
LucD
Leadership
Leadership
Jump to solution

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()


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

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 .

Reply
0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

Hi Luc,

If you can have a look on the attached script.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

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

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

Thanks Luc ,

I am checking for the required access ..

Reply
0 Kudos