ps/Modules/Alkami.PowerShell.ServerManagement/Public/Get-RemoteFileBeatsPath.ps1

26 lines
575 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
function Get-RemoteFileBeatsPath {
<#
.SYNOPSIS
Get the installed folder path of filebeat for a given server.
.PARAMETER ComputerName
Server to get the path from
#>
[CmdletBinding()]
Param(
[Alias("Server")]
[string]$ComputerName
)
if (!$ComputerName) {
Write-Error "No remote computer name was provided. Did you mean to call Get-FileBeatsPath?"
} else {
$scriptBlock = {
Get-FileBeatsPath
}
return Invoke-Command -ScriptBlock $scriptBlock -ComputerName $ComputerName
}
}