Created
November 4, 2019 02:13
-
-
Save CodyMathis123/7ff76dc865b0cceb1be67188332a4c52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region detection | |
$SitePath = 'WSUS Administration/Content' | |
$getWebConfigurationPropertySplat = @{ | |
Filter = '/system.webServer/security/Access' | |
Name = 'sslFlags' | |
PSPath = 'MACHINE/WEBROOT/APPHOST' | |
Location = $SitePath | |
} | |
try { | |
Get-WebConfigurationProperty @getWebConfigurationPropertySplat | Select-Object -ExpandProperty Value -ErrorAction Stop | |
} | |
catch { | |
1 | |
} | |
#endregion detection | |
#region remediation | |
$SitePath = 'WSUS Administration/Content' | |
$setWebConfigurationPropertySplat = @{ | |
Filter = '/system.webServer/security/Access' | |
PSPath = 'MACHINE/WEBROOT/APPHOST' | |
Name = 'sslFlags' | |
Location = $SitePath | |
Value = 'None' | |
} | |
Set-WebConfigurationProperty @setWebConfigurationPropertySplat | |
#endregion remediation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment