usecase

The concern is documenting the to remove the “Microsoft Edge Closed Unexpectedly” prompt in case I kill it from the shell with Stop-Process cmdlet.

when_killed_prompts_for_pages_restore

1. steps

  • instead of
kill -n msedge
  • kill with
gps msedge | % {$_.CloseMainWindow() | Out-Null} | kill -Force

2. sources

Powershell to close a running program gracefully without use’s interact