xxxxxxxxxx
PS C:\Windows\system32> Get-Process -Name dotnet -IncludeUserName | Where-Object UserName -like 'IIS APPPOOL\Datema ESC' | ForEach { & "dotnet-dump" @("collect", "--process-id", $_.Id) }
Writing full to C:\Windows\system32\dump_20210520_121145.dmp
Complete
Writing full to C:\Windows\system32\dump_20210520_121154.dmp
Complete