PowerShell/Scripts/close-file-explorer.ps1
2021-11-23 12:10:59 +01:00

16 lines
348 B
PowerShell
Executable File

<#
.SYNOPSIS
Closes the File Explorer
.DESCRIPTION
This script closes the Microsoft File Explorer application gracefully.
.EXAMPLE
PS> ./close-file-explorer
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
(New-Object -ComObject Shell.Application).Windows() | %{$_.quit()}
exit 0 # success