Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ___ ___ _____ ___
- #| _ \ _ \_ _/ __|
- #| _/ / | || (_ |
- #|_| |_|_\ |_| \___|
- # NETWORK MONITOR
- #-------------------
- # Description: The script will check if a process is running, it will alert you if not (Using Placeholders!)
- # Parameters:
- # - processname: The processname to the last possible char (e.g. instead of explorer, use explor)
- # ------------------
- # (c) 2016 Dariusz Gorka | Paessler AG
- param(
- [string]$processname = "explor"
- )
- $process = &tasklist | Select-String -Pattern "$processname*"
- if ($process)
- { Write-Host ":Process "$processname" found!"; }
- else
- { Write-Host ":Process "$processname" could not found!"; exit 2 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement