Run a Powershell script from Keybreeze

Is there a way to run a Powershell script from Keybreeze?

If I try this it doesn't work from Keybreeze but it does work from the Windows Run box.

powershell.exe C:\Powershell\AWS.ps1

 


9 comments.




ecarr   2 years ago

Use the full path where powershell.exe is located, then the path of the script.  

Brian Henke   2 years ago

I tried C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\Powershell\AWS.ps1 and that launched Powershell but it closed right away. The script has prompts and should wait for input from me. Pasting the comand into run still works with this.

Andrew Langford   2 years ago

Hi Brian,

Good to hear from you! I tried ecarr's suggestion with a test Powershell script, and the prompt appeared in my environment. The target of my keyword is:

C:\windows\system32\windowspowershell\v1.0\powershell.exe c:\test\test.ps1

The text of this Powershell script is:

$User = Read-Host -Prompt 'What is your name?'
Write-Host "You entered, '$User'"

When I run this from the Start > Run dialog box, I get the prompt, enter my name, and then it closes. When I run this from Keybreeze, I get the same behavior, which appears to be expected when running Powershell scripts from outside the console -- https://stackoverflow.com/questions/16739322/how-to-keep-the-shell-window-open-after-running-a-powershell-script.

I was able to keep the Powershell script window open by changing my target to the following.

C:\windows\system32\windowspowershell\v1.0\powershell.exe -NoExit "c:\test\test.ps1"

Let me know if the -NoExit switch works for your script.

Thanks,

Andrew

 

Brian Henke   2 years ago
Thanks Andrew, the noExit showed me that I needed to set the execution policy. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2 I set the current user to unrestricted and it is working now. Thanks for the help.
Gianna99   7 months ago

Once Keybreeze is open, select the "Commands" menu.
    Press the "Add New Command" button.
    Enter the path of PowerShell.exe (typically C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe) in the "Command" column.
    You should specify the location of your PowerShell script in the "Arguments" column.
    You may optionally designate a keyword trigger and give your command a name.
    Save the modifications you made.Gb whatsapp apk

jamesharny_1   4 months ago

If you're looking to enhance your messaging experience, you should check out Golden whatsapp! It offers a range of unique features and customization options that make communication more fun and efficient. From advanced privacy settings to personalized themes, Gold WhatsApp is a game-changer for anyone looking to take their messaging to the next level. Give it a try download whatsapp gold apk and discover why so many users are making the switch!

Goldwhastapp22   3 months ago

What is Gold WhatsApp? Gold WhatsApp is a customized version of the original WhatsApp, often referred to as a "modded" or modified app. It is designed to offer additional features and functionalities that are not available in the standard WhatsApp. download Golden Whatsapp

Harper99   6 months ago

Keybreeze is a powerful tool for automation and launching scripts. By configuring Keybreeze to run a PowerShell script, users can streamline tasks and enhance productivity. Below is a guide on how to set this up, with a brief comment on its benefits.Gb whatsapp

Mirza99   5 months ago

To run a PowerShell script from Keybreeze, you can create a shortcut or alias within Keybreeze that points to your PowerShell script file. Here's a comment example you could add to your script:Fm Whatsapp