For provisioned Dynamics 365 Development environment in some case you will notice Event Viewer is missing Dynamics folder.
Execute this PowerShell script in your development environment. Make sure you open PowerShell ISE in Administrator mode, then paste the following script and execute:
$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”
}
Close are reopen the event viewer and we can see the Dynamics folder