Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Refresh-Explorer {
- [CmdletBinding()]
- $open_folders = @()
- $shell = New-Object -ComObject Shell.Application
- $shell.Windows() | Foreach {
- $open_folders += $_.LocationURL
- }
- taskkill /f /fi "status eq not responding" >$null
- Stop-Process -Name explorer -Force
- explorer.exe
- $open_folders | foreach {
- explorer $_
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement