Follow

Info: Enable Fusion Logs

Summary:

Occasionally enabling Fusion logs is required, the solution would generally be to add registry keys using the following method:

```

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
Add:
DWORD ForceLog set value to 1
DWORD LogFailures set value to 1
DWORD LogResourceBinds set value to 1
DWORD EnableLog set value to 1
String LogPath set value to folder for logs (e.g. C:\FusionLog\)

```

More Info

The following script will allow you to view, disable or enable the keys required. Best when run in ISE, to run outside of ISE remove the function block and the commands change from:

 

fusionLogs -status Show

 

To:

 

.\fusionLogs.ps1 -status Show

 

Here is the full script:

```

function fusionLogs(){
param(
[ValidateSet("on","off","show")]
[string]$Status="show",
[string[]]$Name=@('ForceLog','LogFailures','LogResourceBinds','LogPath'),
[string]$Path="HKLM:\Software\Microsoft\Fusion",
[string]$Directory="C:\FusionLogs"
)
$OldPath=pwd
if($Status -match "on"){
$nVal=1
} elseif($Status -match "off") {
$nVal=0
} else {
$nVal="Show"
}
$RegPath="HKLM:\Software\Microsoft\Fusion"
$Keys=@(
@{"Name"="ForceLog";"Value"=$nVal;"Type"="DWord"},
@{"Name"="LogFailures";"Value"=$nVal;"Type"="DWord"},
@{"Name"="LogResourceBinds";"Value"=$nVal;"Type"="DWord"},
@{"Name"="LogPath";"Value"="$Directory";"Type"="String"})
cd HKLM:\
$ShowObj=@()
foreach($H in $Keys){
$H.add("Path",$RegPath)
if($nVal -match "Show"){
$H.Remove("Value")
$H.Remove("Type")
Get-ItemProperty @H
} else {
Set-ItemProperty @H
}
}
if($Status -match "on|off"){
fusionLogs -Status show
}
cd $OldPath
}

```

To use, you can simply read the Registry values or you can turn them on or off. 

```

> fusionLogs -Status show


ForceLog : 0
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Fusion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft
PSChildName : Fusion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

LogFailures : 0
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Fusion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft
PSChildName : Fusion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

LogResourceBinds : 0
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Fusion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft
PSChildName : Fusion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

LogPath : C:\FusionLogs
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Fusion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft
PSChildName : Fusion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

```

Once the value is changed, it will show you the current value to verify.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk