## Stop the process if it's currently running $Process = Get-Process -Name "DeltekVision" -ErrorAction SilentlyContinue If ( $Process -ine $null ) { Try { Stop-Process -Name $Process -Force } Catch { Write-Output $_.Exception.Message } } Else { Write-Output "Deltek Vision is not running or it's process could not be found." }