11-27-2023 01:42 PM
Hi,
I want to see bad block for group of computers as below scenario:
I have host name that start with different strings i.e., KFMIT001 - KFMIT100, KFMIJR001 - KFMIJR100
I want to see bad block of computers group that contains KFMITxxx as mentioned above.
Is there any way, please guide.
Solved! Go to Solution.
11-28-2023 05:35 PM
So in that case:
Where (tblAssets.AssetName Like 'KFMIT%' OR tblAssets.AssetName Like 'KFMIJR%' OR tblAssets.AssetName Like 'KFMTEA%') And tblNtlogMessage.Message Like
'%bad block%' And tblNtlogSource.Sourcename = 'disk'
Order By tblNtlog.TimeGenerated Desc
11-29-2023 11:21 AM
All of you, thanks for your support.
11-27-2023 07:20 PM
I'm guessing you're looking to modify the "Assets: Windows PCs with Bad Block" report? If so, create a new report with the query below, which would give you all the computers that start with KFMIT with Bad Blocks:
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssetCustom.Serialnumber,
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tsysOS.OSname,
tblAssets.SP,
tblNtlog.Eventcode,
Case tblNtlog.Eventtype
When 1 Then 'Error'
When 2 Then 'Warning'
When 3 Then 'Information'
When 4 Then 'Success Audit'
When 5 Then 'Failure Audit'
End As Eventtype,
tblNtlogFile.Logfile,
tblNtlogMessage.Message,
tblNtlogSource.Sourcename,
tblNtlogUser.Loguser,
tblNtlog.TimeGenerated
From tblAssets
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblNtlog On tblAssets.AssetID = tblNtlog.AssetID
Inner Join tblNtlogFile On tblNtlogFile.LogfileID = tblNtlog.LogfileID
Inner Join tblNtlogMessage On tblNtlogMessage.MessageID = tblNtlog.MessageID
Inner Join tblNtlogSource On tblNtlogSource.SourcenameID =
tblNtlog.SourcenameID
Inner Join tblNtlogUser On tblNtlogUser.LoguserID = tblNtlog.LoguserID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where tblAssets.AssetName Like 'KFMIT%' And tblNtlogMessage.Message Like
'%bad block%' And tblNtlogSource.Sourcename = 'disk'
Order By tblNtlog.TimeGenerated Desc
11-28-2023 11:23 AM
Yes, you are correct but I want variable, not fixed value every time i.e., sometime KFMIT, sometime KFMIJR, sometime KFMTEA etc.
11-28-2023 05:35 PM
So in that case:
Where (tblAssets.AssetName Like 'KFMIT%' OR tblAssets.AssetName Like 'KFMIJR%' OR tblAssets.AssetName Like 'KFMTEA%') And tblNtlogMessage.Message Like
'%bad block%' And tblNtlogSource.Sourcename = 'disk'
Order By tblNtlog.TimeGenerated Desc
11-28-2023 12:08 PM - edited 11-29-2023 05:27 AM
You can edit report yourself and add all your prefixes
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now