Public/Account/Get-KB4Account.ps1
|
<# .SYNOPSIS Gets KnowBe4 account and subscription data. .DESCRIPTION Calls the KnowBe4 Reporting API account endpoint for the connected account. Run Connect-KB4Reporting before calling this command. .PARAMETER Raw Returns the full PSKB4Reporting response envelope, including status code, headers, request ID, URI, and response body. .EXAMPLE Get-KB4Account Returns account and subscription data for the connected KnowBe4 account. .EXAMPLE Get-KB4Account -Raw Returns the raw response envelope for diagnostics. .OUTPUTS PSCustomObject. #> function Get-KB4Account { [CmdletBinding()] param( [Parameter()] [switch] $Raw ) Get-KB4ResponseBody -Response (Invoke-KB4Request -Path '/v1/account') -Raw:$Raw } |