PowerCLI: Report every VM added to vCenter in the last 30 days: Difference between revisions

From VI-Toolkit
Jump to navigation Jump to search
(New page: At seemingly random intervals I get requests from management to report every Virtual Machine that was added/removed in the last x days. This has traditionally been a manual process, and on...)
 
No edit summary
Line 1: Line 1:
At seemingly random intervals I get requests from management to report every Virtual Machine that was added/removed in the last x days. This has traditionally been a manual process, and one that I loath.
While deploying a VM this morning I set up my normal tell me when your done one-liner…
Get-Task|?{$_.Name -eq "CloneVM_Task"}|Wait-Task; `a`a`a
As I was typing I wondered how long a task’s history was kept, and if I could query it via the SDK? Low and behold not only can I but it’s too easy!
http://get-admin.com/blog/?p=725
http://get-admin.com/blog/?p=725


[[Category: Powershell]] [[Category:PowerCLI]]
[[Category: Powershell]] [[Category:PowerCLI]]

Revision as of 20:13, 22 July 2009