Jump to content
  • 0

Powershell query problem

Suman Chhetri


Hello Citrix world, can someone help me to sort out this Powershell problem?

I tried many things but couldn't sort it out. Below command returns the VM names but the CreationDate column is empty.

Get-BrokerDesktop -MaxRecordCount 5000 | Where{($_.LastConnectionUser -eq $null) -and ($_.AssociatedUserNames -ne $null)} | Select MachineName,@{ Name = 'CreationDate';  Expression = {Get-ProvVM -MaxRecordCount 5000 -Filter 'VMName -eq $_.HostedMachineName' | Select CreationDate}} | ft -AutoSize

If I run the below command separately, I get the CreationDate for the supplied VM name.

Get-ProvVM -MaxRecordCount 5000 -Filter 'VMName -eq "ComputerName"' | Select CreationDate


Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...