We are being asked to provide a report of Remote Desktop Services.
They want a SW report that shows how many Total Licenses and Available License on a handful of servers. SolarWinds says that they have the SAM capability but only up to 2003 Servers and all of ours are 2012 and newer.
We have run it through PowerShell Scripting without Success: PowerShell scripting in SAM component monitors
The Script runs correctly in the Server, but not in SW. Thoughts?
Script:
$fileName = (Invoke-WmiMethod Win32_TSLicenseReport -Name GenerateReportEx).FileName
$summaryEntries = (Get-WmiObject Win32_TSLicenseReport|Where-Object FileName -eq $fileName).FetchReportSummaryEntries(0,0).ReportSummaryEntries
$summaryEntries|ForEach {Write-Host $_.ProductVersion $_.TSCALType "Installed:" $_.InstalledLicenses "Issued:" $_.IssuedLicenses}
Server Pic:
