Public/Install-ZappixAgent.ps1
function Install-ZappixAgent { param( [Parameter( Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Position = 0 )] [string]$MainWindowTitle ) $url = "https://www.zabbix.com/downloads/5.0.2/zabbix_agent-5.0.2-windows-amd64-openssl.msi" Invoke-Command -ComputerName $device -Credential $cred -ScriptBlock Write-Debug "MainWindowTitle is $MainWindowTitle" return Get-Process | Where-Object { $_.MainWindowTitle -eq $MainWindowTitle } } |