Get-ICUsers.ps1
<#
# AUTHOR : Pierrick Lozach #> function Get-ICUsers() # {{{2 { # Documentation {{{3 <# .SYNOPSIS Gets a list of all users .DESCRIPTION Gets a list of all users .PARAMETER ICSession The Interaction Center Session #> # }}}3 [CmdletBinding()] Param( [Parameter(Mandatory=$true)] [Alias("Session", "Id")] [ININ.ICSession] $ICSession ) $headers = @{ "Accept-Language" = $ICSession.language; "ININ-ICWS-CSRF-Token" = $ICSession.token; } $response = Invoke-RestMethod -Uri "$($ICsession.baseURL)/$($ICSession.id)/configuration/users" -Method Get -Headers $headers -WebSession $ICSession.webSession -ErrorAction Stop Write-Output $response | Format-Table [PSCustomObject] $response } # }}}2 |