Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[string]$UserNameFilter="*"
[bool]$UsernameCaseSensitive=$false
[string]$firstNameFilter="*"
[bool]$firstNameCaseSensitive=$false
[string]$lastNameFilter="*"
[bool]$lastNameCaseSensitive=$false
[string]$emailFilter="*"
[bool]$emailCaseSensitive=$false
[string]$userGroupFilter="*"
[bool]$userGroupCaseSensitive=$false
[string]$phoneFilter="*"
$modeFilter = New-Object ($ns + ".Mode3")
[bool]$modeSpecified1=$false
$pinModeFilter = New-Object ($ns + ".PinMode2")
[bool]$pinModeSpecified1=$false
$smsDirectionFilter = New-Object ($ns + ".SmsDirection")
[bool]$smsDirectionSpecified1=$false
$smsModeFilter = New-Object ($ns + ".SmsMode")
[bool]$smsModeSpecified1=$false
$phoneAppModeFilter = New-Object ($ns + ".PhoneAppMode")
[bool]$phoneAppModeSpecified1=$false
$tagMatchType = New-Object ($ns + ".TagMatchType")
[string[]]$tagIds=""
[bool]$enabledFilter=$false
[bool]$enabledSpecified1=$false
$resultsComplete = $null
$userResults = New-Object ($ns + ".UserRow")
$callResult = New-Object ($ns + ".CallResult")
$errorcode = New-Object ($ns + ".Error")
# Find All Users
# Update the first parameter '*' to change search criteria or the case sensitive parameters etc
$result = $proxy.FindUsers_4('*',[bool]$usernameCaseSensitive, [string]$firstNameFilter, [bool]$firstNameCaseSensitive, [string]$lastNameFilter, [bool]$lastNameCaseSensitive, [string]$emailFilter, [bool]$emailCaseSensitive, [string]$userGroupFilter, [bool]$userGroupCaseSensitive, [string]$phoneFilter, ([object]$modeFilter), [bool]$modeSpecified1, ([object]$pinModeFilter), [bool]$pinModeSpecified1, ([object]$smsDirectionFilter), [bool]$smsDirectionSpecified1, [object]$smsModeFilter, [bool]$smsModeSpecified1, ([object]$phoneAppModeFilter), [bool]$phoneAppModeSpecified1, ([object]$tagMatchType),[string[]]$tagIds,[bool]$enabledFilter, [bool]$enabledSpecified1, [int32]$resultLimit, ([ref] $userResults), ([ref] $resultsComplete), ([ref]$errorcode))
$userResults.count
$userResults | out-gridview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.