Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $netAssembly = [Reflection.Assembly]::GetAssembly([System.Net.Configuration.SettingsSection])
- if($netAssembly)
- {
- $bindingFlags = [Reflection.BindingFlags] 'Static,GetProperty,NonPublic'
- $settingsType = $netAssembly.GetType('System.Net.Configuration.SettingsSectionInternal')
- $instance = $settingsType.InvokeMember('Section', $bindingFlags, $null, $null, @())
- if($instance)
- {
- $bindingFlags = 'NonPublic','Instance'
- $useUnsafeHeaderParsingField = $settingsType.GetField('useUnsafeHeaderParsing', $bindingFlags)
- if($useUnsafeHeaderParsingField)
- {
- $useUnsafeHeaderParsingField.SetValue($instance, $TRUE)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement