ps/Modules/Alkami.PowerShell.Services/Public/Get-FileBeatsServicePaths.ps1

23 lines
597 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
function Get-FileBeatsServicePaths {
<#
.SYNOPSIS
Returns list of installed Filebeat Service exe paths
.PARAMETER FileBeatService
The services for FileBeats. If not provided, will be looked up in the default location(s).
#>
[CmdletBinding()]
[OutputType([string[]])]
Param(
[Parameter(Mandatory = $false)]
[object[]]$FileBeatService
)
if (Test-IsCollectionNullOrEmpty $FileBeatService) {
[array]$FileBeatService = @(Get-FileBeatsService)
}
[array]$filebeatServicePaths = @($FileBeatService.ExePath)
return $filebeatServicePaths
}