→ Celebrate SysAdmin Day 2024 with Lansweeper Enter our Giveaway here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ElChiefo
Engaged Sweeper
Hello, I am attempting to have each host name become their own rows and the values of certain registry keys become their own columns. So for example, I would like the the values in the 'Enabled' field of TLS registry keys to be their own column. The outcome I am trying to obtain is below:


AssetName | TLS 1.2 Client | TLS 1.2 Server | Lastseen
-------------------------------------------------------
Host1 | 4294967295 | 0 | 18/06/2020
Host2 | 0 | 4294967295 | 18/06/2020




I don't know how close or far my current search is, but it gives each registry key its own row, so I'll see the same hostname in multiple rows and I can't get the 'Enabled' field to be its own column for each search. Any assistance would be greatly appreciated.



Select Top 1000000 tblAssets.AssetName,
tblRegistry.Value As 'TLS 1.2 Client',
tblRegistry.Value As 'TLS 1.2 Server',
tblAssets.Lastseen
From tblRegistry
Inner Join tblAssets On tblRegistry.AssetID = tblAssets.AssetID
Where (tblRegistry.Regkey =
'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' And tblRegistry.Valuename = 'Enabled') Or
(tblRegistry.Regkey =
'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' And tblRegistry.Valuename = 'Enabled')
0 REPLIES 0