Hi,
Is there a simple way using powercli to query vCenter for how many VMs that has been deployed the last month?
Would like to see the name and creation date property
Regards
Johan
If you are using vSphere 6.7 or later, you can indeed use that property.
And as long as none of those VMs have been removed in the meantime.
To limit to last month, you could do
where{$_.CreateDate -ge (Get-Date).AddMonths(-1)} |
Sort-Object -Property CreateDate |
select name,createdate
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can look for the events with Get-VIEvent.
Something like this Solved: Report: The creator of VM, who created ... |VMware Communities
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks for the swift response LucD!
I came up with this : Get-Cluster 'clu' | Get-VM | select name,createdate | sort createdate
Would be nice if I could filter this with get-date somehow....
See VMs created for example the last 14 days/30days
Regards
Johan
If you are using vSphere 6.7 or later, you can indeed use that property.
And as long as none of those VMs have been removed in the meantime.
To limit to last month, you could do
where{$_.CreateDate -ge (Get-Date).AddMonths(-1)} |
Sort-Object -Property CreateDate |
select name,createdate
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Perfekt!! many thanks