hosts/Get-CsHostInfo.psm1
function Get-CsHostInfo { <# .SYNOPSIS Get details on one or more hosts by providing agent IDs .PARAMETER ID The host agent IDs used to get details on #> [CmdletBinding()] [OutputType([psobject])] param( [Parameter(Mandatory = $true)] [array] $Id ) process{ $Param = @{ Uri = '/devices/entities/devices/v1?ids=' Method = 'get' Header = @{ accept = 'application/json' 'content-type' = 'application/json' } } switch ($PSBoundParameters.Keys) { 'Verbose' { $Param['Verbose'] = $true } 'Debug' { $Param['Debug'] = $true } } Split-CsArray -Activity $MyInvocation.MyCommand.Name -Param $Param -Id $Id } } |