vendredi 2 novembre 2012

Lync 2013 - List CAL Usage


Hi,
This script returns information about client license usage in your organization since the first user connection. Your topology has to include a monitoring server.

#Get Monitoring Instance
$SQLSERVICE=get-csservice | ? {$_.Role -eq "MonitoringDatabase" }
if ($SQLSERVICE -eq $null) { exit }
$SQLINSTANCE = $SQLSERVICE.poolfqdn + "\" + $SQLSERVICE.SqlInstanceName

#Get CALs Usage
$plus=Get-CsClientAccessLicense -MonitoringDatabase $SQLINSTANCE -LicenseName plus -LicenseBasedType Userbased -StartDate 01/01/2012 | ? {$_.IpAddress -match ".+"}
$standard=Get-CsClientAccessLicense -MonitoringDatabase $SQLINSTANCE -LicenseName standard -LicenseBasedType Userbased -StartDate 01/01/2012 | ? {$_.IpAddress -match ".+"}
$enterprise=Get-CsClientAccessLicense -MonitoringDatabase $SQLINSTANCE -LicenseName enterprise -LicenseBasedType Userbased -StartDate 01/01/2012 | ? {$_.IpAddress -match ".+"}

#List Usage
write-host Your organization uses $standard.count Standard Lync CALs"," $enterprise.count Enterprise Lync CALs and $plus.count Plus Lync CALs

Aucun commentaire:

Enregistrer un commentaire