Update KISHorizon.psm1
This commit is contained in:
1 parent
d4800a02df
commit
85db0f75bb
1 file changed
+6
@@ -574,6 +574,8 @@ Function Get-HorizonADUser {
|
|||||||
|
|
||||||
if ($global:kishorizondebug) {
|
if ($global:kishorizondebug) {
|
||||||
Write-Host $MyInvocation.MyCommand.Name Starting
|
Write-Host $MyInvocation.MyCommand.Name Starting
|
||||||
|
Write-Host User: $Name
|
||||||
|
Write-Host Domain: $Domain
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -701,7 +703,11 @@ function Grant-HorizonDesktop {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$nameparts = $UserUPN.split("\")
|
$nameparts = $UserUPN.split("\")
|
||||||
|
if ($nameparts.Count -gt 1) {
|
||||||
$UserID = (Get-HorizonAdUser -Horizon $Horizon -Name $nameparts[0] -domain $nameparts[1]).id
|
$UserID = (Get-HorizonAdUser -Horizon $Horizon -Name $nameparts[0] -domain $nameparts[1]).id
|
||||||
|
} else {
|
||||||
|
$UserID = (Get-HorizonAdUser -Horizon $Horizon -Name $UseUPN).id
|
||||||
|
}
|
||||||
if ($global:kishorizondebug) {
|
if ($global:kishorizondebug) {
|
||||||
Write-Host UserID: $UserID
|
Write-Host UserID: $UserID
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user