Public/Get-SlackWebPeople.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function Get-SlackWebPeople {
    Param (
        [switch]$IncludeDeactivated
    )

    [int]$HideDeactivatedUsers = -not $IncludeDeactivated

    $FormData = @{
        module                 = 'people'
        hide_deactivated_users = $HideDeactivatedUsers
        custom_fields          = '{{}}' # This is '{}' masked to not confuse the formatting operator ("-f")
    }

    Invoke-SearchRequest -FormData $FormData
}