Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 213099

Re: Get VM Reconfigure Details from PowerCLI

$
0
0

You can also change the Task filter.
This should be a bit faster and place less stress on your vCenter, since only Task objects fitting the filter will be returned.

 

Lines 10-15 need to be changed to something like this

 

$tFilter=New-Object VMware.Vim.TaskFilterSpec

$tFilter.Time=New-Object VMware.Vim.TaskFilterSpecByTime

$tFilter.Time.beginTime=(Get-Date).AddHours(-$hours)

$tFilter.Time.timeType="startedTime"

$tFilter.Entity=New-Object VMware.Vim.TaskFilterSpecByEntity

$tFilter.Entity.Entity=(Get-VM-Name <your-VM>).ExtensionData.MoRef

 

$tCollector=Get-View($taskMgr.CreateCollectorForTasks($tFilter))


Viewing all articles
Browse latest Browse all 213099

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>