2 Replies Latest reply on Oct 15, 2019 5:58 AM by vespavbb

    Limit Output of createdTime

    vespavbb Novice

      $report = $vms.values | select-object Name, Powerstate, NumCpu, MemoryGB, Notes,


      @{N="Last PowerOff";E={Get-VIEvent -Entity $_ -MaxSamples ([int]::MaxValue) | where {$_ -is [VMware.Vim.VmPoweredOffEvent]} | select createdTime}},

      @{ n="Space on Datastore"; e={[math]::round( $_.ProvisionedSpaceGB, 2 )}} | convertto-html -Head $strHtmlHead



      the Poweroff command bring out to much

      it looks like this

      @{CreatedTime=10/14/2019 10:47:14 AM}


      How can I limit it to the Date only?

      like-> 10/14/2019 10:47:14 AM



      ps the imput $vmsvalues is a arry of VM´s