equal
deleted
inserted
replaced
189 # Configure UAC to allow privilege elevation in remote shells |
189 # Configure UAC to allow privilege elevation in remote shells |
190 $Key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' |
190 $Key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' |
191 $Setting = 'LocalAccountTokenFilterPolicy' |
191 $Setting = 'LocalAccountTokenFilterPolicy' |
192 Set-ItemProperty -Path $Key -Name $Setting -Value 1 -Force |
192 Set-ItemProperty -Path $Key -Name $Setting -Value 1 -Force |
193 |
193 |
|
194 # Avoid long usernames in the temp directory path because the '~' causes extra quoting in ssh output |
|
195 [System.Environment]::SetEnvironmentVariable('TMP', 'C:\Temp', [System.EnvironmentVariableTarget]::User) |
|
196 [System.Environment]::SetEnvironmentVariable('TEMP', 'C:\Temp', [System.EnvironmentVariableTarget]::User) |
|
197 |
194 # Configure and restart the WinRM Service; Enable the required firewall exception |
198 # Configure and restart the WinRM Service; Enable the required firewall exception |
195 Stop-Service -Name WinRM |
199 Stop-Service -Name WinRM |
196 Set-Service -Name WinRM -StartupType Automatic |
200 Set-Service -Name WinRM -StartupType Automatic |
197 netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new action=allow localip=any remoteip=any |
201 netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new action=allow localip=any remoteip=any |
198 Start-Service -Name WinRM |
202 Start-Service -Name WinRM |