run
cd ~
touch winsu.ps1
notepad.exe winsu.ps1
paste:
#!/usr/bin/env -S powershell.exe -ExecutionPolicy Bypass
$program=$args[0]
Start-Process $program -Verb RunAs
make a alias
alias --save winsu=~/winsu.ps1
Now its G2G
winsu notepad
run
cd ~
New-Item winsu.ps1
notepad winsu.ps1
paste:
#!/usr/bin/env -S powershell.exe -ExecutionPolicy Bypass
$program=$args[0]
Start-Process $program -Verb RunAs
make a alias
notepad $profile
add this lines
$ps_script_dir = "~"
New-Alias winsu $ps_script_dir\winsu.ps1
Now its G2G
winsu notepad
change ~
to your script path in case you dont create in user home dir