Powershell script or AHK
Posted: 21 Feb 2022, 14:15
Sorry i still very new to script and Autohotkey. I searching a long period but i still can't get multi command to execute in admin power shell. Can anyone advice me is there any short cut ways to key these fixed command into powershell. As i need to keep repeating the command in quite a number of PC, is there any shortcut i can use in AHK? I try use Send command, but dont' work in powershell. I also use clipboard :- "", but dont' really work well in powershell.
First i use AHK to lauch my admin powershell
Run, powershell Start-Process powershell -Verb runAs
Then, i want to run several command in order and can key them all in the powershell with just press of shortcut key
- cd\
- cd users\ABC\123
- Test-NetConnection (example only, cause there is my company using other software to link)
Then i need to go another directory to run another command
- cd\
- cd users\XYZ\321
- Test firewall(example too)
Thanks
First i use AHK to lauch my admin powershell
Run, powershell Start-Process powershell -Verb runAs
Then, i want to run several command in order and can key them all in the powershell with just press of shortcut key
- cd\
- cd users\ABC\123
- Test-NetConnection (example only, cause there is my company using other software to link)
Then i need to go another directory to run another command
- cd\
- cd users\XYZ\321
- Test firewall(example too)
Thanks