VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Get-VIApplianceService return VS service-control --status

Everything is in the title, why does the Get-VIApplianceService cmdlet not return the same information as "service-control --status" from vCSA?

In my opinion, the actual cmdlet Get-VIApplianceService don't seem to relevant.

  • Adil OSMAN
  • Jul 21 2022
  • Looking for Feedback
  • Attach files
  • Admin
    Kamen Nikolov commented
    22 Jul 10:34am

    I understand the question now. Let me check and get back to you.

  • Adil OSMAN commented
    22 Jul 08:55am

    My issue is, I don't have the same information between the 2 commands.

    So can you tell me the correspondence between the service name in service-control command (see below) VS service name in Get-VIApplianceService cmdlet ? Thanks !

    applmgmt => Get-VIApplianceService -Name ??

    lookupsvc => Get-VIApplianceService -Name ??

    lwsmd => Get-VIApplianceService -Name ??

    observability => Get-VIApplianceService -Name ??

    observability-vapi => Get-VIApplianceService -Name ??

    pschealth => Get-VIApplianceService -Name ??

    vlcm => Get-VIApplianceService -Name ??

    vmafdd => Get-VIApplianceService -Name ??

    vmcad => Get-VIApplianceService -Name ??

    vmdird => Get-VIApplianceService -Name ??

    vmonapi => Get-VIApplianceService -Name ??

    vmware-analytics => Get-VIApplianceService -Name ??

    vmware-certificateauthority => Get-VIApplianceService -Name ??

    vmware-certificatemanagement => Get-VIApplianceService -Name ??

    vmware-cis-license => Get-VIApplianceService -Name ??

    vmware-content-library => Get-VIApplianceService -Name ??

    vmware-eam => Get-VIApplianceService -Name ??

    vmware-envoy => Get-VIApplianceService -Name ??

    vmware-hvc => Get-VIApplianceService -Name ??

    vmware-infraprofile => Get-VIApplianceService -Name ??

    vmware-perfcharts => Get-VIApplianceService -Name ??

    vmware-pod => Get-VIApplianceService -Name ??

    vmware-postgres-archiver => Get-VIApplianceService -Name ??

    vmware-rhttpproxy => Get-VIApplianceService -Name ??

    vmware-sca => Get-VIApplianceService -Name ??

    vmware-sps => Get-VIApplianceService -Name ??

    vmware-statsmonitor => Get-VIApplianceService -Name ??

    vmware-stsd => Get-VIApplianceService -Name ??

    vmware-topologysvc => Get-VIApplianceService -Name ??

    vmware-trustmanagement => Get-VIApplianceService -Name ??

    vmware-updatemgr => Get-VIApplianceService -Name ??

    vmware-vapi-endpoint => Get-VIApplianceService -Name ??

    vmware-vdtc => Get-VIApplianceService -Name ??

    vmware-vmon => Get-VIApplianceService -Name ??

    vmware-vpostgres => Get-VIApplianceService -Name ??

    vmware-vpxd => Get-VIApplianceService -Name ??

    vmware-vpxd-svcs => Get-VIApplianceService -Name ??

    vmware-vsan-health => Get-VIApplianceService -Name ??

    vmware-vsm => Get-VIApplianceService -Name ??

    vsphere-ui => Get-VIApplianceService -Name ??

    vstats => Get-VIApplianceService -Name ??

    vtsdb => Get-VIApplianceService -Name ??

    wcp => Get-VIApplianceService -Name ??

  • Admin
    Kamen Nikolov commented
    22 Jul 08:39am

    I still don't understand the problem. You could do Get-VIApplianceService | select Name, State to only get the name and the state.

    If you want output similar to the one above you can achieve that as well like this:
    $running = Get-VIApplianceService -State Started | select Name
    $stopped = Get-VIApplianceService -State Stopped | select Name
    Write-Host "Running: `n" + $running.Name
    Write-Host "Stopped: `n" $stopped.Name

  • Adil OSMAN commented
    22 Jul 07:59am

    The idea is to get the information about vCSA service status (see below) in a formatted Powershell way, maybe a new cmdlet may be necessary (Get-VcsaServices?) :

    root@vcenter [ ~ ]# service-control --status


    applmgmt lookupsvc lwsmd observability observability-vapi pschealth vlcm vmafdd vmcad vmdird vmonapi vmware-analytics vmware-certificateauthority vmware-certificatemanagement vmware-cis-license vmware-content-library vmware-eam vmware-envoy vmware-hvc vmware-infraprofile vmware-perfcharts vmware-pod vmware-postgres-archiver vmware-rhttpproxy vmware-sca vmware-sps vmware-statsmonitor vmware-stsd vmware-topologysvc vmware-trustmanagement vmware-updatemgr vmware-vapi-endpoint vmware-vdtc vmware-vmon vmware-vpostgres vmware-vpxd vmware-vpxd-svcs vmware-vsan-health vmware-vsm vsphere-ui vstats vtsdb wcp


    vmcam vmware-imagebuilder vmware-netdumper vmware-rbd-watchdog vmware-vcha

    The actual cmdlet Get-VIApplianceService returns (see Link) which is not useful

  • Admin
    Kamen Nikolov commented
    22 Jul 07:20am

    Can you please elaborate a bit further on what additional information you would like to get. PowerCLI uses the public REST API, that returns the services (https://developer.vmware.com/apis/vsphere-automation/latest/appliance/api/appliance/services/get/) and currently this API only returns the service description and state. If you can say what else is required we may be able to forward this request to the API owners.