# encoding: ascii
# api: powershell
# title: Enable/Disable FusionLog
# description: http://georgemauer.net/blog/enabledisable-fusionlog-powershell-script/
# version: 0.1
# type: function
# author: Inwza678
# license: CC0
# x-poshcode-id: 6367
# x-archived: 2016-06-04T19:06:38
# x-published: 2016-06-03T05:00:00
#
# Enabling/disabling your Fusion Log every time you need to figure out why assembly binding has gone wrong is a hassle. So here you go.
#
function global:Enable-FusionLog {  
    Remove-ItemProperty HKLM:Software\Microsoft\Fusion -name EnableLog -ErrorAction SilentlyContinue  
    [void](New-ItemProperty  HKLM:Software\Microsoft\Fusion -name EnableLog -propertyType dword -ErrorAction Stop)  
    Set-ItemProperty  HKLM:Software\Microsoft\Fusion -name EnableLog -value 1 -ErrorAction Stop  
    Write-Host "Fusion log enabled.  Do not forget to disable it when you are done"  
}  
function global:Disable-FusionLog {  
    Remove-ItemProperty HKLM:Software\Microsoft\Fusion -name EnableLog -ErrorAction SilentlyContinue  
    Write-Host "Fusion log disabled"  
}
