I have a feeling I had the same problem and the farm name only gets set after you connect for the first time. However you also don't use the farm name but the alias there for doing subsequent commands for example the start of one of my monitoring scripts is:
lwhitelock
11 Posts
733
0
Posted September 8th, 2015 03:00
Have you run
Connect-QVWFarm -Farm "vWorkspace Database"
I have a feeling I had the same problem and the farm name only gets set after you connect for the first time. However you also don't use the farm name but the alias there for doing subsequent commands for example the start of one of my monitoring scripts is:
import-module vWorkspace
Connect-QVWFarm -Farm "vWorkspace Database"
$problem_computers = Get-QVWComputer -Farm "vWorkspace Database" -Filter{$QVWComputer.Status.LogonState -ne "LoggedOn" -and $QVWComputer.Status.LogonState -ne "Disconnected" -and $QVWComputer.Status.LogonState -ne "LoggedOff"}