0 Replies Latest reply on Jun 17, 2019 1:11 AM by SkNoor

    PowerCLI command to disover Replicated LUs using " Storage.DiscoverDevices() "

    SkNoor Lurker



      I am creating Automation scripts for our SRA. I am trying to do with Power CLI commands, using trying to manage SRM. Installed vCenter Power CLI 11.2.


      using powerCLI, i am able to connect SRM servers, create protection Groups and Recovery Plan. but discoverdevices() is failing. as per syntax arguments are not required. but the command failed expecting arguments.


      below are process steps followed.


      Appreciate your help to resolve




      PS C:\Users\Administrator> Connect-VIServer -server xxxx1202.sss.ccc.com -username Administrator@vsphere.local -password xxxxxxxx12#


      Name Port User

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

      xxxx1202.sss.ccc.com 443 VSPHERE.LOCAL\Administrator



      PS C:\Users\Administrator> $srmConn=Connect-SrmServer -user Administrator@vsphere.local -password xxxxxxxx12# -RemoteUser Administrator@vsphere.local -RemotePassword xxxxxxxx12# -IgnoreCertificateErrors


      PS C:\Users\Administrator> $srmapi=$srmConn.ExtensionData


      PS C:\Users\Administrator> $srmapi.Storage.DiscoverDevices()


      Exception calling "DiscoverDevices" with "0" argument(s): "The request refers to an unexpected or unknown type."

      At line:1 char:1

      + $srmapi.Storage.DiscoverDevices()

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      + CategoryInfo : NotSpecified: (:) [], MethodInvocationException

      + FullyQualifiedErrorId : VimException