Skip to content

Commit 396322f

Browse files
committed
feat: windows desktop allow ssh to issue full admin token
Signed-off-by: Adrian Riobo <[email protected]>
1 parent 703a5b0 commit 396322f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/provider/azure/action/windows/rhqp-ci-setup.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ curl.exe -LO https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/P
112112
Start-Process C:\Windows\System32\msiexec.exe -ArgumentList '/qb /i PowerShell-7.4.2-win-x64.msi ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1 ADD_PATH=1' -wait
113113
# Set powershell as default shell on openssh
114114
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\PowerShell\7\pwsh.exe" -PropertyType String -Force
115+
# Allow SSH to issue a full admin token
116+
New-ItemProperty `
117+
-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" `
118+
-Name "LocalAccountTokenFilterPolicy" `
119+
-Value 1 `
120+
-PropertyType DWord `
121+
-Force
115122

116123
# Remove curl alias
117124
$profilePath="C:\Users\$user\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1"

0 commit comments

Comments
 (0)