Update KISHorizon.psm1
This commit is contained in:
1 parent
551287a628
commit
3fdc643eb6
1 file changed
+22
-15
@@ -563,28 +563,35 @@ Function Get-HorizonADUser {
|
||||
}
|
||||
}
|
||||
|
||||
if ($Id -ne "") {
|
||||
$extension = "/$($Id)?group_only=false"
|
||||
}
|
||||
|
||||
if ($Name -ne "") {
|
||||
$extension = "?group_only=false&filter={`"type`":`"Equals`",`"name`":`"login_name`",`"value`":`"$UserName`"}"
|
||||
}
|
||||
|
||||
if ($UPN -ne "") {
|
||||
$extension = "?group_only=false&filter={`"type`":`"Equals`",`"name`":`"user_principal_name`",`"value`":`"$UserUPN`"}"
|
||||
}
|
||||
|
||||
$userlookupURI += $extension
|
||||
|
||||
if ($global:kishorizondebug) {
|
||||
Write-Host $MyInvocation.MyCommand.Name Starting
|
||||
}
|
||||
|
||||
|
||||
if ($Id -ne "") {
|
||||
$extension = "/$($Id)?group_only=false"
|
||||
}
|
||||
|
||||
if ($UserName -ne "") {
|
||||
$extension = "?group_only=false&filter={`"type`":`"Equals`",`"name`":`"login_name`",`"value`":`"$UserName`"}"
|
||||
if ($global:kishorizondebug) {
|
||||
Write-Host UserName: $UserName
|
||||
}
|
||||
}
|
||||
|
||||
if ($UserUPN -ne "") {
|
||||
$extension = "?group_only=false&filter={`"type`":`"Equals`",`"name`":`"user_principal_name`",`"value`":`"$UserUPN`"}"
|
||||
if ($global:kishorizondebug) {
|
||||
Write-Host UserUPN: $UserUPN
|
||||
}
|
||||
}
|
||||
|
||||
$userlookupURI += $extension
|
||||
|
||||
|
||||
try {
|
||||
if ($global:kishorizondebug) {
|
||||
Write-Host URI: $userlookupURI
|
||||
Write-Host body: $body
|
||||
}
|
||||
$users = Invoke-RestMethod -Method Get -Uri $userlookupURI -Headers $request_header -SkipCertificateCheck
|
||||
if ($global:kishorizondebug) {
|
||||
|
||||
Reference in new issue
Block a user