Update KISHorizon.psm1

This commit is contained in:
ackitsme committed 2026-09-11 16:22:48 -07:00
1 parent 7e942d9819
commit d4800a02df
1 file changed
+3 -2
+3 -2
View File
@@ -697,10 +697,11 @@ function Grant-HorizonDesktop {
if ($MachineID -eq $null) {
return [PSCustomObject]@{
Success = $false
Message = "Machine $MachneName does not exist in any desktop pool."
Message = "Machine $MachineName does not exist in any desktop pool."
}
}
$UserID = (Get-HorizonAdUser -Horizon $Horizon -Name $UserUPN).id
$nameparts = $UserUPN.split("\")
$UserID = (Get-HorizonAdUser -Horizon $Horizon -Name $nameparts[0] -domain $nameparts[1]).id
if ($global:kishorizondebug) {
Write-Host UserID: $UserID
}