AspNetCore.Docs/aspnetcore/test/troubleshoot-azure-iis/scripts/DisableDumps.ps1

14 lines
296 B
PowerShell

param(
[Parameter(Position=0,mandatory=$true)]
$application
)
$werHive = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting";
$ldHive = "$werHive\LocalDumps";
$applicationHive = "$ldHive\$application";
if (Test-Path $applicationHive)
{
Remove-Item $applicationHive -Force;
}