Using Windows PowerShell

Note:The API PowerShell example shown below requires Windows PowerShell version 4.0 or greater. Windows PowerShell 4.0 is bundled with Windows 8.1 or newer Windows operating systems or the Windows 7 operating system with the Windows Management Framework 4.0 installed.

The following PowerShell command can be used to determine which version of Windows PowerShell you are using:

$PSVersionTable.PSVersion

The following example was created using Windows PowerShell version 5.0:

$url = "https://api.app.secunia.com/api/advisories/"

$headers = @{}

$headers.Add("Authorization","Token REPLACE_WITH_YOUR_TOKEN")

$headers.Add("Content-Type","application/json")

Invoke-RestMethod -Method GET -Uri $url -Headers $headers -Verbose -Debug