File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 9
9
Invoke-webrequest -uri 'https://raw.githubusercontent.com/DarwinJS/Undo-WinRMConfig/blob/master/Undo-WinRMConfig/Undo-WinRMConfig.ps1' -outfile $env:public\Undo-WinRMConfig.ps1 ; & $env:public\Undo-WinRMConfig.ps1 -immediately
10
10
Contributing New Undo Profiles: https://github.com/DarwinJS/Undo-WinRMConfig/blob/master/readme.md
11
11
12
- Disclaimer - this code was engineered and tested on Server 2012 R2.
12
+ Disclaimer - this code was engineered and tested on Server 2012 R2 and Server 2016 .
13
13
14
14
Many windows remote orchestration tools (e.g. Packer) instruct you to completely open up winrm permissions in a way that is not safe for production.
15
15
Usually there is no built in method nor instruction on how to re-secure it or shut it back down.
@@ -93,7 +93,8 @@ Function Setup-Undo {
93
93
Write-Host "Undoing changes for Enable-PSRemoting, Enable-WSManCredSSP and winrm configuration commands"
94
94
95
95
Write-Host "Remove LocalAccountTokenFilterPolicy added by winrm configuration"
96
- $regkeypath ='HKLM:SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\system'
96
+ #This key is symlinked into "Wow6432Node" - both locations are handled by one delete
97
+ $regkeypath ='HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system'
97
98
If (!((Get-ItemProperty $regkeypath).LocalAccountTokenFilterPolicy -eq $null))
98
99
{Remove-ItemProperty -path $regkeypath -name LocalAccountTokenFilterPolicy}
99
100
Original file line number Diff line number Diff line change 3
3
<package xmlns =" http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd" >
4
4
<metadata >
5
5
<id >undo-winrmconfig-during-shutdown</id >
6
- <version >1.1.6 </version >
6
+ <version >1.1.8 </version >
7
7
<packageSourceUrl >https://github.com/DarwinJS/CloudyWindowsAutomationCode/tree/master/Undo-WinRMConfig</packageSourceUrl >
8
8
<owners >DarwinJS</owners >
9
9
<title >undo-winrmconfig-during-shutdown (Install)</title >
You can’t perform that action at this time.
0 commit comments