Enable/Disable FusionLog by George Mauer 17 months ago
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/2107"></script>download | new post
http://georgemauer.net/blog/enabledisable-fusionlog-powershell-script/
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"
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
PowerShell Code Repository