VMware Cloud Community
gbeke
Enthusiast
Enthusiast

Resetting Highest Count using PowerCLI

Hi,

I have a simple script to report usage of View. I get the usage by using this command: $global:DefaultHVServers.ExtensionData.ConnectionServerHealth.ConnectionServerHealth_List().ConnectionData.

After collecting this I need to reset the Highest Count. Is it possible to reset the Highest Count using PowerCLI?

Thanks in advance.

GB

0 Kudos
6 Replies
cpcnet
Contributor
Contributor

any one know this?

0 Kudos
scott28tt
VMware Employee
VMware Employee

Moderator: Thread moved to the PowerCLI area.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
cpcnet
Contributor
Contributor

OK, i have find the answer, thanks a lot.

0 Kudos
ibeerens1
Contributor
Contributor

What PowerCLI script did you use for resetting the highest count?

0 Kudos
Armin_B
Contributor
Contributor

Could you shair the solution to the problem?

0 Kudos
Armin_B
Contributor
Contributor

Ok I have found a solution to the Problem.
Thanks to: PowerCLI/Horizon-Highest-users.ps1 at master · ibeerens/PowerCLI · GitHub

$ExtnData = $Global:DefaultHVServers.ExtensionData.UsageStatistics

$TotCon = $ExtnData.UsageStatistics_GetLicensingCounters().HighestUsage.TotalConcurrentConnections
$TotSes = $ExtnData.UsageStatistics_GetLicensingCounters().HighestUsage.TotalConcurrentSessions

write("Totalconnections: " + $TotCon)
write("TotalSessions: " + $TotSes)

Add-Content -Path $path -Value ("Totalconnections: " + $TotCon)
Add-Content -Path $path -Value ("TotalSessions: " + $TotSes)

$ExtnData.UsageStatistics_ResetHighestUsageCount()
$ExtnData.UsageStatistics_ResetNamedUsersCount()

0 Kudos