Timeline for run powershell command from cmd
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 14, 2023 at 13:27 | comment | added | Константин Ван |
You need to temporarily override the execution policy to run a Powershell script file.: powershell.exe -ExecutionPolicy RemoteSigned -File %~dp0\test.PS1 .
|
|
Apr 3, 2018 at 20:43 | comment | added | wisbucky |
@myobis Actually, doubling the quotes doesn't work (in Windows 10 cmd). But using backslash escaping did: powershell -command "dir \"c:\Program Files\" "
|
|
Mar 29, 2018 at 10:06 | comment | added | SimonS |
@myobis or you can just use single quotes powershell -command " dir 'C:\Program Files' "
|
|
Mar 29, 2018 at 9:28 | comment | added | Myobis | If the command to be executed has quotes, they must be doubled. Example : powershell -command "dir ""c:\Program Files""" | |
Jan 17, 2018 at 13:19 | history | edited | SimonS | CC BY-SA 3.0 |
deleted 5 characters in body
|
Jan 9, 2018 at 14:57 | history | edited | SimonS | CC BY-SA 3.0 |
added 67 characters in body
|
May 24, 2016 at 15:46 | vote | accept | Qassam Mahmoud | ||
May 24, 2016 at 15:46 | comment | added | Qassam Mahmoud | u are the best man <3 it's working | |
May 24, 2016 at 14:29 | history | edited | SimonS | CC BY-SA 3.0 |
edited body
|
May 24, 2016 at 14:24 | history | answered | SimonS | CC BY-SA 3.0 |