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

Re: Who Built the vm

$
0
0

I suspect something might have gone wrong with the copy/paste and some <CR><LF> were dropped.

Try with this

 

Get-VIEvent-Start (Get-Date).adddays(-10) |
where
{$_.gettype().Name-eq"VmCreatedEvent"-and$_.CreatedTime-lt (Get-Date).adddays(-30)} |select@{N="VMname";E={$_.Vm.Name}},
    @{N="CreatedTime";E={$_.CreatedTime}},
    @{N="Host";E={$_.Host.Name}},
    @{N="User";E={$_.UserName}} |
Export-Csv
"C:\VM-vmcreatedevent-audit.csv"-NoTypeInformation-UseCulture

 

But you only seem to go back 10 days for the events, while you look for events older than 30 days.

That doesn't sound right.


Viewing all articles
Browse latest Browse all 232869

Trending Articles