VMware Cloud Community
chalans
Contributor
Contributor

VMware View Powercli Get-EventReport return no data

Hello here,

I try to make an error reported script from the event of a Horizon VMware VIew.

So, first i tried to retrieve the event log with this PowerCli command

Get-EventReport -ViewName user_events -StartDate ((Get-Date).Adddays(-1))

But this command return no output object.

It seems the command cannot retreive the event from database , how can i debug this please ?

I use Powercli for VMwareVIEW horizon 5.2.

The cmdlet was tested directely from the connection server.

Thank you.

0 Kudos
11 Replies
LucD
Leadership
Leadership

Are you using PowerShell v2 ?

Start the PowerShell session with

C:\> powershell -version 2

Load the View snapin and then try the Get-EventReport line again.


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

0 Kudos
chalans
Contributor
Contributor

Hello Lucd,

Yes i tried the session with Powershell V2 but it was not better.

Always no output Smiley Sad

0 Kudos
LucD
Leadership
Leadership

You did check that the view list you specified is available ?

Do a

Get-EventReportList

and check if user_events is in there.


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

0 Kudos
chalans
Contributor
Contributor

Yes i got the name from the result of this command :

report-name                                                 report-description
-----------                                                 ------------------
user_events                                                 User-initiated events. e.g.: login/log out of broker, la...
user_count_events                                           Report on the maximum number of concurrent users logged ...
config_changes                                              What changes were made to View Manager configuration set...

0 Kudos
LucD
Leadership
Leadership

Do any of the other PowerCLI View work ?

For example, does

Get-Pool

return anything ?

I assume you can see the events via the web interface ?


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

0 Kudos
chalans
Contributor
Contributor

Yes all the commands seem to work.

get-pool as exemple.

0 Kudos
LucD
Leadership
Leadership

And in the web interface you can see the events ?


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

0 Kudos
chalans
Contributor
Contributor

Yes i can see the events in the web interface of View.

0 Kudos
chalans
Contributor
Contributor

I not use the standard name for the view event database in the Sql Server.

Is the Cmdlet get-eventreport try to retrieve directly the event from the database ?

Maybe i should create a sql script to do this ?....

0 Kudos
LucD
Leadership
Leadership

Could be. Can't test that I'm afraid.

Worth a try with a SQL script


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

0 Kudos
aqwelea
Enthusiast
Enthusiast

Hello,

I'v been trying to get information on that issue for more than one day.

Did you finally solve your problem ?

I am facing the same and don't really understand what's going wrong 😕

0 Kudos