This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Do{ | |
| If (-NOT (Get-Process -ProcessName "Plex Media Server" -ErrorAction SilentlyContinue)) { | |
| Write-Host "Launch application" | |
| $application = "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe" | |
| Start-Process -FilePath $application | |
| } | |
| Else{ | |
| Write-Host "Process is running" | |
| } | |
| Start-Sleep -Seconds 5 |