Hi
I got the following
$Results= (get-hvmachinesummary -PoolName " Poolname" | where-object{$_.base.basicstate -eq "Connected"}) |select-object desktopname
I am trying to get the users that is connected to the machine that result holds but is blank.
Thanks, guys
Go to IE in Virtual Box and access localhost via http://10.0.2.2 for localhost, or http://10.0.2.2:3000 for localhost:3000.
I kept Network settings as NAT, no need for bridge as suggested above in my case. There is no need to edit any config files.
--------------------------------------------------------------------
Did you already try like in Solved: PowerCLI - List All View Connected Users and VM Ho... - VMware Technology Network VMTN
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
yes, I was wondering if I can limit the result to a specific Poolname, using the already piping
Thanks
You could try adding a filter on the query.
$poolName = 'MyPool'
$query = New-Object "Vmware.Hv.QueryDefinition"
$query.queryEntityType = 'SessionLocalSummaryView'
$query.Filter = New-Object VMware.Hv.QueryFilterEquals -Property @{'memberName' = 'desktopSummaryData.name'; 'value' = $poolName}
$qSrv = New-Object "Vmware.Hv.QueryServiceService"
$qSRv.QueryService_Query($global:DefaultHVServers[0].ExtensionData,$query) |
Select -ExpandProperty Results |
Select -ExpandProperty NamesData |
Select-Object -Property UserName,DesktopType,DesktopName,MachineOrRDSServerDNS
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
I get the following error, familiar?
Exception calling "QueryService_Query" with "2" argument(s): "ExceptionType : VMware.Hv.InvalidArgument
ErrorMessage : Invalid member name.
ParameterName : DesktopSummaryData.name"
At line:1 char:1
+ $qSRv.QueryService_Query($global:DefaultHVServers[0].ExtensionData,$q ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException