public/Get-NexposeVulnerabilityItem.ps1

Function Get-NexposeVulnerabilityItem {
<#
    .SYNOPSIS
        Returns the details for a vulnerability, or all vulnerabilities that can be assessed during a scan.
 
    .DESCRIPTION
        Returns the details for a vulnerability, or all vulnerabilities that can be assessed during a scan.
 
    .PARAMETER Id
        The identifier of the vulnerability
 
    .EXAMPLE
        Get-NexposeVulnerabilityItem -Id '7-zip-cve-2008-6536'
 
    .NOTES
        For additional information please see my GitHub wiki page
 
    .FUNCTIONALITY
        GET: vulnerabilities
        GET: vulnerabilities/{id}
 
    .LINK
        https://github.com/My-Random-Thoughts/Rapid7Nexpose
#>


    [CmdletBinding()]
    Param (
        [string]$Id = ''
    )

    If ($Id -ne '') {
        Write-Output @(Invoke-NexposeQuery -UrlFunction "vulnerabilities/$id" -RestMethod Get)

    }
    Else {
        Write-Verbose '** Please wait, this will take a while **'
        Write-Output @(Invoke-NexposeQuery -UrlFunction "vulnerabilities" -RestMethod Get)    # Return All
    }
}