Public/Get-CTXAPI_Sessions.ps1
<#PSScriptInfo .VERSION 0.1.1 .GUID 02947c49-f670-4398-8fdb-3b522c22b593 .AUTHOR Pierre Smit .COMPANYNAME iOCO Tech .COPYRIGHT .TAGS ctx ps .LICENSEURI .PROJECTURI .ICONURI .EXTERNALMODULEDEPENDENCIES .REQUIREDSCRIPTS .EXTERNALSCRIPTDEPENDENCIES .RELEASENOTES Created [03/11/2021_19:34] Initial Script Creating Updated [06/11/2021_16:49] Using the new api .PRIVATEDATA #> <# .DESCRIPTION Return details about current sessions #> <# .SYNOPSIS Return details about current sessions .DESCRIPTION Return details about current sessions .PARAMETER APIHeader Use Connect-CTXAPI to create headers .EXAMPLE Get-CTXAPI_Session -APIHeader $APIHeader #> Function Get-CTXAPI_Sessions { [Cmdletbinding()] [OutputType([System.Object[]])] PARAM( [Parameter(Mandatory = $true)] [PSTypeName('CTXAPIHeaderObject')]$APIHeader ) (Invoke-RestMethod -Uri 'https://api.cloud.com/cvad/manage/Sessions/' -Method get -Headers $APIHeader.headers).items } #end Function |