A cross-platform PowerShell Module that uses the Tenable Security Center API.
This is a PowerShell Module that functions as an API wrapper around Tenable Security Center's API version 5.10. PSTenable works with Windows PowerShell 5.1 and PowerShell 6. PSTenable automatically handles token refresh for you, specified in Tenable's documentation here.
Please open a Pull Request if you desire any new features or create an Issue if you come across a bug.
Install-Module -Name PSTenable -Scope CurrentUser -Repository PSGallery
## Cache credentials, tenable server, web session, and token.
$Credential = Get-Credential
Connect-PSTenable -Credential $Credential -TenableServer "http(s)://server.domain.com/rest" -Register
## Get all devices affected by CVE-2019-0708
Get-PSTenableCVE -CVE "CVE-2019-0708"
## Get all devices affected by plugin ID 125877
Get-PSTenablePlugin -ID "125877"
## Get all vulnerabilities related to patch family Windows, Windows : Microsoft Bulletins, and Windows : User management
Get-PSTenablePluginFamilyWindows
## Retrieves all non-info vulnerabilities, Detailed data
Get-PSTenableSeverity -Severity "All" -Detailed
## Retrieves high and medium vulnerabilities, up to 200 records, Summary Data
Get-PSTenableSeverity -Severity "High","Medium" -Maxrecords 200