There is a new Powershell command that you can use to get a kernel dump of a VM in Server 2012 R2. The cmdlet injects a non-maskableinterrupt into the VM. (This is an old method of getting a kernel dump, paper clip jammed in the ISA bus, anyone?) Since the NMI is sent from a remotemachine, this is perfect for getting a dump when you aren’t logged in, while debugging a credential provider perhaps.
By default Windows is setup to crash when it receives an NMI, the only thing you would have to change is the type of dump you wantwritten.
The command is:
PS C:\Windows\system32> Debug-VM -Name "VM Name" -InjectNonMaskableInterrupt -ComputerName Hostname