VMware Cloud Community
drivera01
Enthusiast
Enthusiast
Jump to solution

report VM's in SRM "protected"

So I am wondering if there is a way to pull data to gather a list of VM's that are "protected" by SRM?

This would be populated into a data gathering script for VM's

Thanks

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Then I would suggest to look at the SRM API method called GetProtectionStatus.

Through the WSDL file, available on the SRM server, you can call the SRM API methods from PowerShell.

There is an example file with some samples functions  in chapter 10 of the PowerCLI Reference book. The code is available on the book's download site.


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

View solution in original post

0 Kudos
8 Replies
LucD
Leadership
Leadership
Jump to solution

Would this work ?

Get-VM | 
where  { @($_.Harddisks | Select -ExpandProperty Name) -contains "Placeholder"} | 
Select
Name


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

drivera01
Enthusiast
Enthusiast
Jump to solution

The "hard disk" property appears to be deprecated

0 Kudos
LucD
Leadership
Leadership
Jump to solution

That is just a warning, for now you can ignore it.

But does the logic work, does it show the SRM protected VM ?


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

sparrowangelste
Virtuoso
Virtuoso
Jump to solution

will this only work at the destination site?

Or  can  it work against the source ?

--------------------- Sparrowangelstechnology : Vmware lover http://sparrowangelstechnology.blogspot.com
0 Kudos
LucD
Leadership
Leadership
Jump to solution

That would need to be run against the recovery site.


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

0 Kudos
drivera01
Enthusiast
Enthusiast
Jump to solution

Since the recovery site is the only place that uses the "placeholder"

It does not however work for me, it does not show the protected vm's

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Then I would suggest to look at the SRM API method called GetProtectionStatus.

Through the WSDL file, available on the SRM server, you can call the SRM API methods from PowerShell.

There is an example file with some samples functions  in chapter 10 of the PowerCLI Reference book. The code is available on the book's download site.


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

0 Kudos
drivera01
Enthusiast
Enthusiast
Jump to solution

It appears to be a SRM5 thing, we are unfortunately still @4.1...

well, ok thank you for the help.

0 Kudos