- Autounattend files moved to Autounattend folder - WDAC files moved to WDAC folder - Added WDAC check to setupScript - Moved RDP to setupRDP - Moved Activate to setupActivate - Added online setup of Office with offline fallback - Changed setupUsers to be more standard and allow customisation - Added rastop setup
24 lines
674 B
PowerShell
24 lines
674 B
PowerShell
function EnableRDP {
|
|
Write-Host "Enabling RDP..."
|
|
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0
|
|
Enable-NetFirewallRule -Group "@FirewallAPI.dll,-28752"
|
|
Write-Host "RDP enabled."
|
|
}
|
|
|
|
function DisableRDP {
|
|
Write-Host "Disabling RDP..."
|
|
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 1
|
|
Disable-NetFirewallRule -Group "@FirewallAPI.dll,-28752"
|
|
Write-Host "RDP disabled."
|
|
}
|
|
|
|
function SetupRDP {
|
|
param (
|
|
[bool] enable
|
|
)
|
|
if ($enable) {
|
|
EnableRDP
|
|
} else {
|
|
DisableRDP
|
|
}
|
|
} |