VMware Cloud Community
SteveG1836
Contributor
Contributor
Jump to solution

Content Library Synchronization validation

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

 

 

Reply
0 Kudos
1 Solution

Accepted Solutions
SteveG1836
Contributor
Contributor
Jump to solution

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

 

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

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


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

SteveG1836
Contributor
Contributor
Jump to solution

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

 

Reply
0 Kudos