Get-CitrixService
Citrix: Gets Citrix services
param(
[Parameter(Mandatory = $false)]
[string]$ServiceName
)
try {
Import-Module Citrix.Configuration.Admin.V2 -ErrorAction Stop
[hashtable]$cmdArgs = @{ 'ErrorAction' = 'Stop' }
if ($ServiceName) { $cmdArgs.Add('ServiceType', $ServiceName) }
$services = Get-ConfigService @cmdArgs
Write-Output $services
} catch {
Write-Error $_
exit 1
}The name of the service (optional).