→ The Lansweeper Customer Excellence Awards 2024 - Submit Your Project Now! Learn More & Enter Here
‎07-05-2022 06:01 PM
Solved! Go to Solution.
‎07-06-2022 12:57 PM
Select Top 1000000 tblassets.AssetName,
tblassets.IPAddress,
tsysOS.OSname,
tblassets.Version,
tblassets.AssetID
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join tblFileVersions On tblassets.AssetID = tblFileVersions.AssetID
Inner Join tsysOS On tblassets.OScode = tsysOS.OScode
Where tblFileVersions.FilePathfull = 'c:\tagfile.txt' And
tblFileVersions.Found = 'true' And tblassetcustom.State = 1
Group By tblassets.AssetName,
tblassets.IPAddress,
tsysOS.OSname,
tblassets.Version,
tblassets.AssetID,
tblFileVersions.FilePathfull,
tblFileVersions.Found
echo 'Scan File' > "c:\tagfile.txt"
Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tblassets.Username,
tsysassettypes.AssetTypename,
tsysassettypes.AssetTypeIcon10 As icon,
tblassets.IPAddress,
tblassets.Lastseen,
tblassets.Lasttried,
tsysOS.OSname,
tblassets.Version,
tblAssetComments.Comment,
tblADComputers.OU
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join lansweeperdb.dbo.tsysOS On tblassets.OScode = tsysOS.OScode
Left Join lansweeperdb.dbo.tblAssetComments On tblassets.AssetID =
tblAssetComments.AssetID
Inner Join tblADComputers On tblassets.AssetID = tblADComputers.AssetID
Where (tblassets.AssetName = 'PC1' Or tblassets.AssetName = 'PC2' Or
tblassets.AssetName = 'PC3' Or tblassets.AssetName = 'PC4' Or
tblassets.AssetName = 'PC5' Or tblassets.AssetName = 'PC6' Or
tblassets.AssetName = 'PC7') And tblassetcustom.State = 1
‎07-06-2022 04:39 PM
‎07-06-2022 04:19 PM
Where
tblassets.AssetName IN ('PC1', 'PC2','PC3', 'PC4', 'PC5', 'PC6', 'PC7')
And tblassetcustom.State = 1
‎07-06-2022 12:57 PM
Select Top 1000000 tblassets.AssetName,
tblassets.IPAddress,
tsysOS.OSname,
tblassets.Version,
tblassets.AssetID
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join tblFileVersions On tblassets.AssetID = tblFileVersions.AssetID
Inner Join tsysOS On tblassets.OScode = tsysOS.OScode
Where tblFileVersions.FilePathfull = 'c:\tagfile.txt' And
tblFileVersions.Found = 'true' And tblassetcustom.State = 1
Group By tblassets.AssetName,
tblassets.IPAddress,
tsysOS.OSname,
tblassets.Version,
tblassets.AssetID,
tblFileVersions.FilePathfull,
tblFileVersions.Found
echo 'Scan File' > "c:\tagfile.txt"
Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tblassets.Username,
tsysassettypes.AssetTypename,
tsysassettypes.AssetTypeIcon10 As icon,
tblassets.IPAddress,
tblassets.Lastseen,
tblassets.Lasttried,
tsysOS.OSname,
tblassets.Version,
tblAssetComments.Comment,
tblADComputers.OU
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Inner Join lansweeperdb.dbo.tsysOS On tblassets.OScode = tsysOS.OScode
Left Join lansweeperdb.dbo.tblAssetComments On tblassets.AssetID =
tblAssetComments.AssetID
Inner Join tblADComputers On tblassets.AssetID = tblADComputers.AssetID
Where (tblassets.AssetName = 'PC1' Or tblassets.AssetName = 'PC2' Or
tblassets.AssetName = 'PC3' Or tblassets.AssetName = 'PC4' Or
tblassets.AssetName = 'PC5' Or tblassets.AssetName = 'PC6' Or
tblassets.AssetName = 'PC7') And tblassetcustom.State = 1
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now