I was trying to get a list of servers from an application via qfarm /app ‘ApplicationName’ however the output it gave me was text rather then an array.
Below is how to get an array into powershell using the Citrix Powershell Snapin Instead
Add-PSSnapin Citrix*
$servers = Get-XAServer -BrowserName 'Application Name'| select ServerName
foreach ($server in $servers) {
#do Something per server
Write-Host $server.ServerName
}