yesterday
I am looking for a way to scan the details of device wifi connections, lansweeper will only scan network Mac and IP details, however i would like to get a report of currently connected SSID's with settings ( WPA, WEP, etc) not necessarily the password, but the configuration items, so we can check on what network someone is connected to when they report issues - can help with remote users, also in office users to ensure they are connected to the correct networks without having to ask.
what would be even better is if this could be a WMI historical item, so scan's over time and shows current connected but can also log and record this. or something that will report "netsh wlan show networks" or "netsh wlan show interfaces" results
yesterday - last edited yesterday
Lansweeper can scan the Windows registry. You can write a script that gathers all the data you're looking for and store the results in the registry. Then you can tell Lansweeper to scan these registry values and you can then build reports on this dataset.
I have a ton of custom integrations done this way in my environment. I copy files/scripts to a custom directory in c:\programdata and setup task scheduler to run the scripts on a schedule. I always generate a "LastRan" timestamp value from the script runtime.
Then when Lansweeper scans the registry values, I know they're up to date as of the timestamp I set for the script runtime. You can create a "CurrentSSID" value with a single SSID name and then create a "HistoricalSSID" value that is a comma separated list that updates every time a new SSID is shown as connected.
For example, here's a very basic PowerShell script you can run to write the current network connection details to the registry.
# Set Registry Path
$regPath = "HKLM:\SOFTWARE\CustomRegistryKey\NetworkDetails"
#Get network details
$netDetails = Get-NetConnectionProfile
#Check to see if registry key exists and create it if it doesn't
if (!(Test-Path $regPath)){
New-Item -Path $regPath -Force
}
# Create registry values to hold data from current connection
New-ItemProperty -Path $regPath -Name 'TimeStamp' -Value (Get-Date) -PropertyType String -Force
New-ItemProperty -Path $regPath -Name 'Name' -Value $netDetails.Name -PropertyType String -Force
New-ItemProperty -Path $regPath -Name 'InterfaceAlias' -Value $netDetails.InterfaceAlias -PropertyType String -Force
New-ItemProperty -Path $regPath -Name 'InterfaceIndex' -Value $netDetails.InterfaceIndex -PropertyType String -Force
New-ItemProperty -Path $regPath -Name 'NetworkCategory' -Value $netDetails.NetworkCategory -PropertyType String -Force
New-ItemProperty -Path $regPath -Name 'DomainAuthenticationKind' -Value $netDetails.DomainAuthenticationKind -PropertyType String -Force
New-ItemProperty -Path $regPath -Name 'IPv4Connectivity' -Value $netDetails.IPv4Connectivity -PropertyType String -Force
New-ItemProperty -Path $regPath -Name 'IPv6Connectivity' -Value $netDetails.IPv6Connectivity -PropertyType String -Force
Then you just program Lansweeper to scan these values and you can generate a report like this
Select Distinct
asset.AssetID,
asset.AssetName,
a.Value as Timestamp,
b.Value as Name,
c.Value as InterfaceAlias,
d.Value as InterfaceIndex,
e.Value as NetworkCategory,
f.Value as DomainAuthenticationKind,
g.Value as IPv4Connectivity,
h.Value as IPv6Connectivity
From tblassets as asset
Inner Join tblAssetCustom cus on cus.AssetID = asset.AssetID
Inner Join (Select AssetID, Value from tblRegistry where Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\CustomRegistryKey\NetworkDetails' and Valuename = 'TimeStamp') as a on a.AssetID = asset.AssetID
Inner Join (Select AssetID, Value from tblRegistry where Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\CustomRegistryKey\NetworkDetails' and Valuename = 'Name') as b on b.AssetID = asset.AssetID
Inner Join (Select AssetID, Value from tblRegistry where Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\CustomRegistryKey\NetworkDetails' and Valuename = 'InterfaceAlias') as c on c.AssetID = asset.AssetID
Inner Join (Select AssetID, Value from tblRegistry where Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\CustomRegistryKey\NetworkDetails' and Valuename = 'InterfaceIndex') as d on d.AssetID = asset.AssetID
Inner Join (Select AssetID, Value from tblRegistry where Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\CustomRegistryKey\NetworkDetails' and Valuename = 'NetworkCategory') as e on e.AssetID = asset.AssetID
Inner Join (Select AssetID, Value from tblRegistry where Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\CustomRegistryKey\NetworkDetails' and Valuename = 'DomainAuthenticationKind') as f on f.AssetID = asset.AssetID
Inner Join (Select AssetID, Value from tblRegistry where Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\CustomRegistryKey\NetworkDetails' and Valuename = 'IPv4Connectivity') as g on g.AssetID = asset.AssetID
Inner Join (Select AssetID, Value from tblRegistry where Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\CustomRegistryKey\NetworkDetails' and Valuename = 'IPv6Connectivity') as h on h.AssetID = asset.AssetID
Where asset.AssetType = -1 and cus.State = 1
Do note this is just an example/POC for you to create your own logic. This code assumes your devices are only on one network connection. If they're on wired and wireless, you are going to have to program logic to split it out into different registry values or else you're going to be trying to store arrays as strings and it's going to get messy.
yesterday
Hi there,
The feature you're looking for is currently unavailable in Lansweeper. However, we would be happy to assist you in submitting a feature request to our product team. To do so, we kindly ask that you contact our tech support team: https://www.lansweeper.com/contact-support/
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now