Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
WildPh
Engaged Sweeper II
Is there a way to produce a report, based on registry keys, where value and valuename can have different "value", e.g.
#1: Valuename: TunnelAddress Value: x.x.x.x
#2: Valuename: TunnelDesc Value: VPN Default
#3: Valuename: TunnelDevice Value: WAN Miniport (L2TP)
#4: Valuename: TunnelDUN Value: VPN Quarantine Tunnel





1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Sure, should be something like this: not tested


Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, reg1.Value As Tunneladdress, reg2.Value As Tunneldesc
From tblComputers Left Join
(Select *
From tblregistry
Where tblregistry.Valuename = 'TunnelAddress') reg1 On reg1.Computername =
tblComputers.Computername Left Join
(Select *
From tblregistry
Where tblregistry.Valuename = 'TunnelDesc') reg2 On reg2.Computername =
tblComputers.Computername

where reg2.value is not null

View solution in original post

4 REPLIES 4
WildPh
Engaged Sweeper II
Works fine now.
Thanks a lot
Hemoco
Lansweeper Alumni
Sure, should be something like this: not tested


Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, reg1.Value As Tunneladdress, reg2.Value As Tunneldesc
From tblComputers Left Join
(Select *
From tblregistry
Where tblregistry.Valuename = 'TunnelAddress') reg1 On reg1.Computername =
tblComputers.Computername Left Join
(Select *
From tblregistry
Where tblregistry.Valuename = 'TunnelDesc') reg2 On reg2.Computername =
tblComputers.Computername

where reg2.value is not null
WildPh
Engaged Sweeper II
Thanks a lot.
Now I'm getting all computers, whether or not they have a VPN client installed.
Can we add a filter with a where clause? Something like where Tunneldesc is not empty?
Hemoco
Lansweeper Alumni
This is an example for 2 fields, you can add more:

Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, reg1.Value As Tunneladdress, reg2.Value As Tunneldesc
From tblComputers Left Join
(Select *
From tblregistry
Where tblregistry.Valuename = 'TunnelAddress') reg1 On reg1.Computername =
tblComputers.Computername Left Join
(Select *
From tblregistry
Where tblregistry.Valuename = 'TunnelDesc') reg2 On reg2.Computername =
tblComputers.Computername

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now