I found this code:
Get-Process Outlook | Foreach-Object { $_.CloseMainWindow() | Out-Null }
I ran this and it closed Outlook. My question is this: is $_.CloseMainWindow() truly the graceful way to close an application? Meaning is it the same as clicking File-Close from within the app?
I'm dealing with Outlook and PST files (again) and it has been pointed out if you use stop-process -force it can cause .PST file corruption.
Thank you.