Forum Discussion

maggie_129843's avatar
maggie_129843
Icon for Nimbostratus rankNimbostratus
Mar 21, 2014

Retrieve SyncStatus of device using iControl

Hi,

 

I want to retrieve the sync status of a particular device using Icontrol.dll. I found the following functions and ran it in powershell and get the following error, 1. $interface.ManagementDeviceGroup.get_device_sync_status("grpname","devicename") Exception calling "get_device_sync_status" with "2" argument(s): "Unknown method "{urn:iControl:Management/DeviceGroup}:get_device_sync_status""... 2. $interface.ManagementDeviceGroup.get_sync_status("grpName") Exception calling "get_sync_status" with "1" argument(s): "Unknown method "{urn:iControl:Management/DeviceGroup}:get_sync_status""

 

Can anyone please help me resolve this error. Thank you.

 

6 Replies

  • Hi! Have you upgraded the pssnapin module?

     

    The method you refer to came in v11.4.0 and the snapin module was updated 1 month ago.

     

    /Patrik

     

  • I tried it with my current version and it failed. Then I updated to the latest one and it worked, so that seems to be your problem as well.

     

    /Patrik

     

  • Hi Patrick,

     

    Thanks for your response. I verified that it was with the version we use. - Dll version is 11.4 while the bigip is 11.3. Is there any other way to get the sync status or any other work around? Thanks!

     

  • That explains a lot. :)

     

    Sorry, but I don't know any other way to programmatically do it via iControl.

     

    I guess you could login to the web interface with powershell and parse it from the code if you login with System.Net.WebClient and extract the string between:

     

    "[a href="/tmui/Control/jspmap/tmui/devmgmt/overview.jsp"]" and "[/a]"

     

    Had to replace the tags with brackets. The forum does not like them.

     

    /Patrik

     

  • Thanks! We had tried that as well and found the request URL for sync but somehow not able to login using the user id and pwd using powershells': Invoke-WebRequest, System.Net.WebClient

     

    Thanks,

     

  • So you've tried something like this?

     

    http://www.powershellcookbook.com/recipe/vODQ/script-a-web-application-session

     

    /Patrik