D365 – Dev Enviornment – Missing event logs

We see that newer CHE are missing event viewer logs for the D365FO development machines. To Enable those logs run following commands in Power shell as Admin. (While wait for Microsoft to fix the machines)

AOS Event Logs

$AOSSetupETWManifestDir = "K:\AosService\WebRoot\Monitoring"
foreach ($manifestFile in Get-ChildItem -Path $AOSSetupETWManifestDir*.man | select-object -Property BaseName,Name)
{

$dllFile=""

if ((Test-Path "$AOSSetupETWManifestDir\$($manifestFile.BaseName).Instrumentation.dll"))

{

    $dllFile = "$AOSSetupETWManifestDir\$($manifestFile.BaseName).Instrumentation.dll"

}

elseif ((Test-Path "$AOSSetupETWManifestDir\$($manifestFile.BaseName)Resource.dll"))

{

    $dllFile = "$AOSSetupETWManifestDir\$($manifestFile.BaseName)Resource.dll"

}

elseif ((Test-Path "$AOSSetupETWManifestDir\$($manifestFile.BaseName).dll"))

{

    $dllFile = "$AOSSetupETWManifestDir\$($manifestFile.BaseName).dll"

}

else 

{

    Write-Host "Warn : Skipping $AOSSetupETWManifestDir\$($manifestFile.Name) as DLL not found"

    Continue    

}



Write-Host "Installing $AOSSetupETWManifestDir\$($manifestFile.Name) using $dllFile"

wevtutil.exe im "$AOSSetupETWManifestDir\$($manifestFile.Name)" /rf:"$dllFile" /mf:"$dllFile"

Write-Host "Finished installing $AOSSetupETWManifestDir\$($manifestFile.Name) `n`n"

}

Commerce Logs

$AOSSetupETWManifestDir = "K:\RetailServer\webroot\bin"
foreach ($manifestFile in Get-ChildItem -Path $AOSSetupETWManifestDir*.man | select-object -Property BaseName,Name)
{
$dllFile=""

if ((Test-Path "$AOSSetupETWManifestDir\$($manifestFile.BaseName).Instrumentation.dll"))

{

    $dllFile = "$AOSSetupETWManifestDir\$($manifestFile.BaseName).Instrumentation.dll"

}

elseif ((Test-Path "$AOSSetupETWManifestDir\$($manifestFile.BaseName)Resource.dll"))

{

    $dllFile = "$AOSSetupETWManifestDir\$($manifestFile.BaseName)Resource.dll"

}

elseif ((Test-Path "$AOSSetupETWManifestDir\$($manifestFile.BaseName).dll"))

{

    $dllFile = "$AOSSetupETWManifestDir\$($manifestFile.BaseName).dll"

}

else 

{

    Write-Host "Warn : Skipping $AOSSetupETWManifestDir\$($manifestFile.Name) as DLL not found"

    Continue    

}



Write-Host "Installing $AOSSetupETWManifestDir\$($manifestFile.Name) using $dllFile"

wevtutil.exe im "$AOSSetupETWManifestDir\$($manifestFile.Name)" /rf:"$dllFile" /mf:"$dllFile"

Write-Host "Finished installing $AOSSetupETWManifestDir\$($manifestFile.Name) `n`n"
}
After running scripts
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.