src/Get-HighWindsAccount.ps1
function Get-HighWindsAccount { Param( [Parameter(Mandatory)] [String] $Token, [Parameter(Mandatory)] [String] $AccountHash ) $Path = "/api/v1/accounts/$AccountHash" $URI = 'https://striketracker.highwinds.com' + $Path $Headers = @{ 'Content-Type' = 'application/json' 'Accept' = 'application/json' 'Authorization' = "Bearer $Token" } try { $Result = Invoke-RestMethod -Method GET -Uri $URI -Headers $Headers -Proxy $env:https_proxy return $Result } catch { throw $_ } } |