Hi all,
I'm trying to generate a report of all workstations in a domain, the version of MS Office installed, and the product key that was used. For some reason I can't get the product key part in there.
I have made the following query:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Userdomain,
tblAssets.Username,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblSoftware.softwareVersion,
tblSoftwareUni.softwareName,
tblSoftwareUni.SoftwarePublisher
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSoftware On tblAssets.AssetID = tblSoftware.AssetID
Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblSoftware.softID
Where (tblSoftwareUni.softwareName Like '%Microsoft Office Standard 2010%' And
tblSoftwareUni.SoftwarePublisher Like 'Microsoft%' And tblAssetCustom.State =
1) Or
(tblSoftwareUni.softwareName Like
'%Microsoft Office Professional Editie 2003%') Or
(tblSoftwareUni.softwareName Like '%Microsoft Office Professional Plus 2010%')
Or
(tblSoftwareUni.softwareName Like '%Microsoft Office Standard 2007%') Or
(tblSoftwareUni.softwareName Like
'%Microsoft Office Visio Professional 2003%') Or
(tblSoftwareUni.softwareName Like
'%Microsoft Office Visio Professional 2007%') Or
(tblSoftwareUni.softwareName Like '%Microsoft Office Project Standard 2007%')
This seems to work, it lists all the workstations and the office version installed. But I don't know how to get the product key to show up in there.
Alternatively, if I use the preset
License: Software license key overview it does show all the keys, but now it shows too many! One workstation can contain up to 4 or 5 product keys. I don't know where those come from, I suspect they may be remnants from older installations. So how can I get only the current product key to be shown?