23 lines
597 B
PowerShell
23 lines
597 B
PowerShell
|
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
|
||
|
}
|