Quantcast
Channel: VMware Communities : Discussion List - Site Recovery Manager
Viewing all articles
Browse latest Browse all 3691

Create InventoryMapping using SRM API

$
0
0

I am using SRM 5.8, wanted to use new API feature to create folder, network mapping using powercli.

$web01 = New-WebServiceProxy("http://" + $srmServerAddr + ":9085/srm.wsdl") -Namespace SRM01

 

 

$srm01 = New-Object SRM01.Srmbinding

$srm01.url = "https://" + $srmServerAddr + ":9007"

$srm01.CookieContainer = New-Object System.Net.CookieContainer

 

 

$mof01 = New-Object SRM01.ManagedObjectReference

$mof01.type = "SrmServiceInstance"

$mof01.value = $mof01.type

 

 

$srmApi01 = ($srm01.RetrieveContent($mof01)).srmApi

$protection01 = ($srm01.RetrieveContent($mof01)).protection

$recovery01 = ($srm01.RetrieveContent($mof01)).recovery

$mapping = ($srm01.RetrieveContent($mof01)).InventoryMapping

 

 

 

PowerCLI C:\> $srm01.AddFolderMapping

 

 

OverloadDefinitions

-------------------

void AddFolderMapping(SRM01.ManagedObjectReference _this, SRM01.ManagedObjectReference primaryFolder, SRM01.ManagedObjectReference secondaryFolder)

 

 

I checked all the options to find primaryFolder MoRef but does not find any, can some point to how to map the folder using PowerCLI?

 

Regards,

Shyam Dhawale


Viewing all articles
Browse latest Browse all 3691

Trending Articles