Skip to content

Instantly share code, notes, and snippets.

@CodyMathis123
Created November 4, 2019 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodyMathis123/b6f33a1c4fc895839a706de8c611d106 to your computer and use it in GitHub Desktop.
Save CodyMathis123/b6f33a1c4fc895839a706de8c611d106 to your computer and use it in GitHub Desktop.
#region detection
$SitePath = 'WSUS Administration/ApiRemoting30'
$getWebConfigurationPropertySplat = @{
Filter = '/system.webServer/security/Access'
Name = 'sslFlags'
PSPath = 'MACHINE/WEBROOT/APPHOST'
Location = $SitePath
}
Get-WebConfigurationProperty @getWebConfigurationPropertySplat
#endregion detection
#region remediation
$SitePath = 'WSUS Administration/ApiRemoting30'
$setWebConfigurationPropertySplat = @{
Filter = '/system.webServer/security/Access'
PSPath = 'MACHINE/WEBROOT/APPHOST'
Name = 'sslFlags'
Location = $SitePath
Value = 'Ssl'
}
Set-WebConfigurationProperty @setWebConfigurationPropertySplat
#endregion remediation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment