How to incorporate Powershel commands

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
agags333
Posts: 13
Joined: 25 Apr 2017, 23:50

How to incorporate Powershel commands

27 Apr 2017, 23:18

Hi There.

how does one execure a powershell command within AHK
User avatar
jmeneses
Posts: 524
Joined: 28 Oct 2014, 11:09
Location: Catalan Republic

Re: How to incorporate Powershel commands

28 Apr 2017, 01:51

Hi agags333
You just have to look for "PowerShell" in the forum there are many examples Look this for example
Donec Perficiam
User avatar
jmeneses
Posts: 524
Joined: 28 Oct 2014, 11:09
Location: Catalan Republic

Re: How to incorporate Powershel commands

28 Apr 2017, 01:52

Code: Select all

psScript =
(
    # This is a comment
    Get-HotFix | Select HotFixID,InstalledOn,InstalledBy -First 1
)
 
; Use this call if you don't want to see PowerShell output
;RunWait PowerShell.exe -Command &{%psScript%} ,, hide
 
; Use this call if you want to see PowerShell output
Run powershell.exe -NoExit -Command &{%psScript%}

Donec Perficiam

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww and 325 guests