VMware Cloud Community
lukeglazebrook
Enthusiast
Enthusiast
Jump to solution

Is there a means of identifying all the users that have logged into the vCenter over the past x days (preferably 30). Our organisation is having a cleanup in AD and what the reassurance that certain accounts can be deleted with concern.

Hi All,

Is there a means of identifying all the users that have logged into the vCenter over the past x days (preferably 30).  Our organisation is having a cleanup in AD and what the reassurance that certain accounts can be deleted with concern.

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Something like this ?

Get-VIEvent -Start (Get-Date).AddDays(-30) -MaxSamples ([int]::MaxValue) |

where{$_ -is [VMware.Vim.UserLoginSessionEvent]} |

Select UserName,IpAddress,CreatedTime

or if you only need the users

Get-VIEvent -Start (Get-Date).AddDays(-30) -MaxSamples ([int]::MaxValue) |

where{$_ -is [VMware.Vim.UserLoginSessionEvent]} |

Group-Object -Property UserName | Select Name


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Something like this ?

Get-VIEvent -Start (Get-Date).AddDays(-30) -MaxSamples ([int]::MaxValue) |

where{$_ -is [VMware.Vim.UserLoginSessionEvent]} |

Select UserName,IpAddress,CreatedTime

or if you only need the users

Get-VIEvent -Start (Get-Date).AddDays(-30) -MaxSamples ([int]::MaxValue) |

where{$_ -is [VMware.Vim.UserLoginSessionEvent]} |

Group-Object -Property UserName | Select Name


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
lukeglazebrook
Enthusiast
Enthusiast
Jump to solution

I sincerely hope you don't get run over by a bus one day mate, I think we would all be screwed.

Much appreciated as always

Reply
0 Kudos