Public/Start-PowerGUI.ps1
Function Start-PowerGUI { <# .Synopsis Starts Quest PowerGUI .Description Starts PowerGUI .Example Start-PowerGUI Starts PowerGUI .LINK about_functions_advanced .LINK about_CommonParameters #> [CmdletBinding()] Param() $PowerGUI = "c:\Program Files (x86)\PowerGUI\ScriptEditor.exe" $FileExists = Test-Path $PowerGUI If ($FileExists -eq "True") { If (!(Get-Process ScriptEditor -ErrorAction SilentlyContinue)) { Write-Verbose "Starting PowerGUI..." Start-Process $PowerGUI } Else { Write-Warning "PowerGUI is allready running!" } } Else { Throw "PowerGUI not found, exiting..." } } |