Automation

 View Only
  • 1.  Content Library Synchronization validation

    Posted Nov 19, 2020 05:30 PM

    So this is task that maybe cannot be done without access to the vCenter logs, but I am trying to see if there is a way using PowerCli to see if Content Libraries have synced with the master (local) library. The local library is in one vCenter and the subscriber content libraries are in another vCenter.

     

    Any hints, suggestions, or actual code would be appreciated. Please note I do not have SSH access to the hosts or the VCSA vm.

     

    Thamk you in advance.

     

    Steve

     

     



  • 2.  RE: Content Library Synchronization validation

    Posted Nov 19, 2020 07:28 PM

    If you are connected to the the 'another vCenter', you can use the REST API.

    Something like this for example

    Connect-CisServer -Server $global:DefaultVIServer.Name | Out-Null
    
    $sub = Get-CisService -Name 'com.vmware.content.subscribed_library'
    $sub.list() | ForEach-Object -Process {
        $sub.get($_.Value) | Select name,last_sync_time,
            @{N='AutoSync';E={$_.subscription_info.automatic_sync_enabled}}
    }
    
    Disconnect-CisServer -Confirm:$false


  • 3.  RE: Content Library Synchronization validation
    Best Answer

    Posted Nov 19, 2020 07:55 PM

    Luc, you are my hero!!! That will work