Last active
September 13, 2023 09:50
-
-
Save negokaz/ecd9e6ae86aa13c871aa900b75f26c7d to your computer and use it in GitHub Desktop.
Execute PowerShell script which has same name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
powershell -NoProfile -ExecutionPolicy RemoteSigned ^ | |
"Start-Process powershell.exe -ArgumentList %~dp0\%~n0.ps1 -WindowStyle Hidden" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem run as Administrator | |
powershell -NoProfile -ExecutionPolicy RemoteSigned ^ | |
"Start-Process powershell.exe -Verb runas -ArgumentList %~dp0\%~n0.ps1 -WindowStyle Hidden" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment