I am trying create a process of the windows reliability monitor and kill it after I take a screenshot.
I am having trouble to get the process and automatically close it before I take the screenshot because there is no process ID that identifies that window.
there is any way to close the reliability monitor via PowerShell?
$psi = New-object System.Diagnostics.ProcessStartInfo
$psi.CreateNoWindow = $false
$psi.UseShellExecute = $true
$psi.RedirectStandardOutput = $false
$psi.RedirectStandardError = $false
$psi.FileName = "Perfmon"
$psi.Arguments ="/rel"
$process = New-Object System.Diagnostics.Process
$process.StartInfo = $psi
[void]$process.Start()
#$output = $process.StandardOutput.ReadToEnd()
$process.id
Start-Sleep 5
perfmon /rel
startsperfmon
but ends up opening the Reliability Monitor in the Explorer Process so there is no Process you can kill. As per your own comments the Reliability Monitor has no command line reporting you can make use of, all that I can think of is toin code