Add self-hosted RustDesk bootstrap management
This commit is contained in:
@@ -10,6 +10,7 @@ $testScript = Join-Path $enrollmentRoot 'Test-SguClientEnrollment.ps1'
|
||||
$installScript = Join-Path $enrollmentRoot 'Install-CredentialProvider.ps1'
|
||||
$remoteAccessScript = Join-Path $enrollmentRoot 'Enable-LabRemoteAccess.ps1'
|
||||
$monitoringScript = Join-Path $enrollmentRoot 'Enable-SguClientMonitoring.ps1'
|
||||
$rustDeskScript = Join-Path $enrollmentRoot 'Install-SguRustDeskClient.ps1'
|
||||
|
||||
$before = & $testScript
|
||||
if (-not $before.IsValid) {
|
||||
@@ -36,12 +37,21 @@ if ($computer.PartOfDomain) {
|
||||
& $monitoringScript | Out-Null
|
||||
}
|
||||
|
||||
if ($configuration.RustDeskServerAddress -and $configuration.RustDeskServerPublicKey) {
|
||||
& $rustDeskScript -ServerAddress ([string]$configuration.RustDeskServerAddress) `
|
||||
-ServerPublicKey ([string]$configuration.RustDeskServerPublicKey) | Out-Null
|
||||
}
|
||||
|
||||
$verificationParams = @{}
|
||||
if ($computer.PartOfDomain) {
|
||||
$verificationParams.RequireDomainJoined = $true
|
||||
$verificationParams.RequireRemoteAccess = $true
|
||||
$verificationParams.RemoteDesktopPrincipal = [string]$configuration.RemoteDesktopPrincipal
|
||||
}
|
||||
if ($configuration.RustDeskServerAddress) {
|
||||
$verificationParams.RequireRustDesk = $true
|
||||
$verificationParams.RustDeskServerAddress = [string]$configuration.RustDeskServerAddress
|
||||
}
|
||||
$after = & $testScript @verificationParams
|
||||
$after
|
||||
if (-not $after.IsValid) {
|
||||
|
||||
Reference in New Issue
Block a user