Skip to content

Commit 5f178b7

Browse files
committed
v1.1.8 ready
1 parent 6fc4026 commit 5f178b7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Undo-WinRMConfig.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
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
1010
Contributing New Undo Profiles: https://github.com/DarwinJS/Undo-WinRMConfig/blob/master/readme.md
1111
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.
1313
1414
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.
1515
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 {
9393
Write-Host "Undoing changes for Enable-PSRemoting, Enable-WSManCredSSP and winrm configuration commands"
9494
9595
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'
9798
If (!((Get-ItemProperty $regkeypath).LocalAccountTokenFilterPolicy -eq $null))
9899
{Remove-ItemProperty -path $regkeypath -name LocalAccountTokenFilterPolicy}
99100

chocolateypackaging/undo-winrmconfig-during-shutdown.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
44
<metadata>
55
<id>undo-winrmconfig-during-shutdown</id>
6-
<version>1.1.6</version>
6+
<version>1.1.8</version>
77
<packageSourceUrl>https://github.com/DarwinJS/CloudyWindowsAutomationCode/tree/master/Undo-WinRMConfig</packageSourceUrl>
88
<owners>DarwinJS</owners>
99
<title>undo-winrmconfig-during-shutdown (Install)</title>

0 commit comments

Comments
 (0)