Hi,
Never used powercli to check vcsa services, but I found this post from @LucD with a script that dose the trick. (You'll need to install and import the Posh-SSH module.)
You can either run the script directly or wrap it in a function:
function Get-VCSAServiceStatus {
param (
[string]$vmName,
[string]$user,
[string]$pswd
)
$cmd = @'
service-control --status
'@
$cred = [PSCredential]::new($user, (ConvertTo-SecureString -String $pswd -AsPlainText -Force))
$session = New-SSHSession -ComputerName $vmName -Credential $cred -AcceptKey
Invoke-SSHCommand -SSHSession $session -Command $cmd | Select-Object -ExpandProperty Output
Remove-SSHSession -SSHSession $session | Out-Null
}
And then run it like this:
Get-VCSAServiceStatus -vmName 'vcsa.my.domain' -user 'root' -pswd 'VMware1!'
Original Message:
Sent: Jun 17, 2025 11:51 AM
From: Fborges555
Subject: Vcenter services
H.
Thanks for jumping in chief, I have the same issue, status does not show/bring anything. - anyone else that has used this approach can pitch in?
we need help gurus
thanks a bunch
Original Message:
Sent: Jun 16, 2025 07:32 AM
From: hgdeloitte
Subject: Vcenter services
Hi Fborges555.
I am working on something similar. However, I cannot get the status to be returned. Parts of this may help.
# Reconnect to the vCenter
Write-Host "Reconnecting to $vcenter" -ForegroundColor Green
Connect-VIServer -Server $vcenter -Credential $VMWareCredentials -Force
# Wait for the vCenter vmware-content-library service to start
Write-Host "Waiting for vmware-content-library service to start on $vcenter" -ForegroundColor Green
$vcenterServiceManager = Get-View -Id (Get-View ServiceInstance).Content.ServiceManager
$vmwareContentLibraryService = $vcenterServiceManager.QueryServiceList() | Where-Object { $_.ServiceName -eq "com.vmware.content.library" }
$serviceStatus = $vmwareContentLibraryService.ServiceStatus
I haven't tried this but this should start the service:
Start-Service -Name vpxd
Original Message:
Sent: Jun 13, 2025 03:40 PM
From: Fborges555
Subject: Vcenter services
HI.
I am looking to see if it is possible to check status of vcenter services using powercli, looking to check status of services that "service-control" have eyes on it like what is the status of vmware-vpxd and other , also if status is not running who di I restart the service .
Thanks a bunch