Workstations Missing Chocolatey
SoftwareDiscover which workstations do not have Chocolatey installed. This can be used to discover workstations you want to deploy on but do not yet meet the requirement of having Chocolatey installed on it to support automatic version retrieval using Lansweeper deployment. You can find more info about this in Pro Tips 52.
Before running the audit, add the following registry keys to your custom file scanning.
- C:\ProgramData\chocolatey\bin\choco.exe
Workstations Missing Chocolatey Lansweeper On-Prem Query
Select Top (1000000) tblAssets.AssetID, tblAssets.AssetName, tblAssets.Domain, tblAssets.Username, tblAssets.Userdomain, Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon, tblAssets.IPAddress, tsysIPLocations.IPLocation, tblAssetCustom.Manufacturer, tblAssetCustom.Model, tsysOS.OSname As OS, tblAssets.SP, tblAssets.Lastseen As [Last successful scan], tblAssets.Lasttried As [Last scan attempt], TsysLastscan.Lasttime As LastFileScan, Case When TsysLastscan.Lasttime < GetDate() - 1 Then 'Last file scan more than 24 hours ago. Scanned data may not be accurate.' End As Comment, tblFileVersions.FilePathfull As PathSearched, Case tblFileVersions.Found When 1 Then 'Yes' Else 'No' End As FileFound, tblFileVersions.FileVersion, tblFileVersions.CompanyName, Convert(decimal(9,2),tblFileVersions.Filesize / 1024 / 1024) As SizeMB, tblFileVersions.CreationDate, tblFileVersions.LastAccessed, tblFileVersions.LastModified, tblFileVersions.Lastchanged From tblAssets Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID Left Outer Join tblFileVersions On tblFileVersions.AssetID = tblAssets.AssetID Left Outer Join tsysOS On tsysOS.OScode = tblAssets.OScode Inner Join tblState On tblState.State = tblAssetCustom.State Inner Join TsysLastscan On tblAssets.AssetID = TsysLastscan.AssetID Inner Join TsysWaittime On TsysWaittime.CFGCode = TsysLastscan.CFGcode Where tblFileVersions.FilePathfull = 'c:\programdata\chocolatey\bin\choco.exe' And tblState.Statename = 'Active' And TsysWaittime.CFGname = 'files' And tblFileVersions.Found = 0 And tblComputersystem.Domainrole < 2 Order By tblAssets.Domain, tblAssets.AssetName, PathSearched