The LicenseManager takes a daily snapshot of the license assignments.
That snapshot info is used to create the License Report over a time period.
Afaik, public access to these snapshots via an API is not available, so I'm afraid that a report over time is currently not possible.
You can report what the situation is when you run the script.
What properties, besides the timestamp, are you missing?
I update a few property names.
$LicenseManager= Get-view LicenseManager
$LicenseAssignmentManager= Get-View $LicenseManager.LicenseAssignmentManager
$LicenseAssignmentManager.GetType().GetMethod("QueryAssignedLicenses").Invoke($LicenseAssignmentManager,@($null)) |
Select EntityDisplayName,
@{N='License Key';E={$_.AssignedLicense.LicenseKey}},
@{N='Product Edition';E={$_.Properties | where{$_.Key -eq 'ProductName'} | select -ExpandProperty Value}},
@{N='Cost Unit';E={$_.AssignedLicense.CostUnit}},
@{N='Asset ID';E={$_.EntityID}},
@{N='Asset Build Version';E={$_.Properties | where{$_.Key -eq 'ProductName'} | select -ExpandProperty Value}},
@{N='Usage';E={$_.Properties | where{$_.Key -eq 'FileVersion'} | select -ExpandProperty Value}},
@{N='Used License';E={$_.Properties | where{$_.Key -eq 'EntityCost'} | select -ExpandProperty Value}},
@{N='Total';E={$_.AssignedLicense.Total}}