How to Run a PowerShell Script: Command, Errors, One Click
How to run a PowerShell script (.ps1), fix “running scripts is disabled on this system”, and start recurring scripts with one click.
To run a PowerShell script, type its full path in PowerShell:
C:\Scripts\Report.ps1
If the script is in the current folder, put .\ in front: .\Report.ps1. If the path contains spaces, put
it in quotation marks with an ampersand before it: & "C:\My Scripts\Report.ps1". From outside PowerShell,
such as from Command Prompt, use powershell.exe -File with the path.
If you get the message that “running scripts is disabled on this system” instead, your script is not the problem. On Windows PCs, Windows PowerShell ships with an execution policy that blocks scripts. How to change it is covered below. And if you need the same script every day, starting it with one click pays off, with the path and parameters saved.
Why a double-click isn’t enough
A double-click starts a program, but not a .ps1 file. The limits at a glance:
- Double-clicking runs nothing. According to Microsoft, PowerShell does not run scripts when you double-click the script icon in File Explorer. This is a security feature.
- The name alone isn’t enough either.
Report.ps1without a path won’t run, even if you are already in the right folder. That’s what the.\is for. - Run with PowerShell doesn’t take parameters. Microsoft says the right-click entry is intended for scripts that don’t have parameters, don’t return output to the console and don’t prompt for input. The window appears only briefly, if at all.
- The command has to be right every time. Path, parameters and the right folder: if you start a script daily, you type the same line over and over.
Run a PowerShell script step by step
- Open PowerShell: press Win+R, type
powershell, press Enter. - Change to the script’s folder, for example with
cd C:\Scripts. - Start the script with
.\Report.ps1. - If the script needs input values, add them after the name:
.\Report.ps1 -Month 11. Which parameters exist depends on the script.
You can skip changing folders if you type the full path. One catch: if the script uses relative paths such
as .\data.csv, it looks for them in the current folder, not where the script is stored. That is a common
reason why a script works from one folder and fails from another.
From Command Prompt or a shortcut
powershell.exe -NoProfile -File "C:\Scripts\Report.ps1" -Month 11
Four switches are useful here:
| Switch | What it does (according to Microsoft) |
|---|---|
-File | runs the script file; must be the last switch, everything after it goes to the script |
-NoExit | keeps the window open after the script |
-NoProfile | doesn’t load your PowerShell profile |
-ExecutionPolicy | sets the execution policy for this session only |
Order matters: -NoExit after -File is passed to the script rather than to PowerShell.
Start recurring scripts with one click: console tiles in Celerando
For a one-time run, the console is the direct way. For the script you need every morning, before each export or after each change, a tile is more convenient.
Celerando is a Windows app with a dashboard of tiles. You open it with Alt+Q at the mouse position, no matter which program you are in. Besides tiles for programs, files and web apps, there are console tiles for Windows PowerShell, PowerShell 7, Command Prompt, Bash, Git Bash and Python:
- The startup command is saved. The tile opens PowerShell and runs the command you enter once; for a script, that’s the call with its parameters. The window stays open afterwards, so you can read the output.
- The working directory is saved. PowerShell starts in this folder. Relative paths in the script such
as
.\data.csvrefer to it, no matter where you are working. - One tile per task. The same script with two sets of parameters, say for test and production, becomes two tiles, each with its own color and one of more than 13,000 icons.
- Easy to find. The built-in search finds the tile, and named groups keep scripts next to the programs they belong to.
Console tiles are included in Free, which costs nothing, needs no license and doesn’t expire. Free has up to 5 tiles, Free+ (free with email registration) 10, Pro (€36 one-time payment, no subscription) unlimited. See editions and prices for the overview.
To be fair: the tile launches PowerShell, it doesn’t replace it. The Windows execution policy still applies, and the tile is not a scheduler: it starts the script when you click. Anything that should run at night without you belongs in Windows Task Scheduler.
Set up the tile
- Download and install Celerando (Windows 10 build 19041 or later, or Windows 11). It installs into your user profile, with no admin rights and no account.
- Run the script by hand in PowerShell first. If it doesn’t run there, it won’t run from the tile.
- Open the dashboard with Alt+Q, search for “Windows PowerShell” (for PowerShell 7, “PowerShell”), right-click it and choose Pin to Celerando. Then right-click the new tile and choose Edit.
- Under Working directory, set the folder where the script is stored and expects its files, for
example
C:\Scripts. - Under Startup command, enter the call the way you would type it in PowerShell:
.\Report.ps1 -Month 11. The.\refers to the working directory. If the script is stored elsewhere or its path contains spaces, use the full path with&:& "C:\My Scripts\Report.ps1" -Month 11. - Click Close to keep the changes, then click the tile. PowerShell opens in the working directory, runs the script and stays open.
Troubleshooting: when the script won’t start
”Running scripts is disabled on this system”
This is the execution policy. According to Microsoft, the default for Windows PowerShell 5.1 on Windows
client computers is Restricted: individual commands work, script files don’t. The policy applies to the
PowerShell you set it in; PowerShell 7 has its own (see the FAQ). To see the current state:
Get-ExecutionPolicy -List
For your own scripts, RemoteSigned fits. Scripts you write yourself will run; scripts downloaded from the
internet need a signature from a trusted publisher or have to be unblocked explicitly. To set it for your
user account only:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
The change takes effect immediately and stays saved. To undo it, use Undefined instead of RemoteSigned.
If the list shows anything other than Undefined for MachinePolicy or UserPolicy, a Group Policy is in
charge. It takes precedence, and the right step is to ask your IT department rather than change it yourself.
You will often see the advice to use Bypass. With it, PowerShell no longer blocks or warns at all. You
don’t need that for your own scripts. Microsoft doesn’t describe the policy as a security boundary, but it
does help you avoid breaking rules unintentionally, such as by starting someone else’s script.
Other messages
| Problem | Cause | What helps |
|---|---|---|
| The script is not digitally signed | The file is marked as coming from the internet, or the policy requires signatures (AllSigned) | Open the script and read it. Only if you trust it and RemoteSigned applies: Unblock-File .\Report.ps1 |
| ”The term … is not recognized as the name of a cmdlet, function, script file, or operable program” | The path is missing or misspelled | Put .\ in front or type the full path |
| The path is cut off at a space | Quotation marks are missing | In PowerShell & "C:\My Scripts\Report.ps1", otherwise -File "…" |
| The window closes right away | The session ends with the script | Put -NoExit before -File, or start the script in an open PowerShell window |
| The script can’t find its files | The current folder isn’t the script’s folder | Change to it with cd, or set the working directory in the tile |
| Access denied | The script lacks permissions | Check whether it really needs admin rights; if so, open PowerShell as administrator and start it there |
Console or tile: the comparison
| PowerShell window | Celerando console tile | |
|---|---|---|
| Installation | built into Windows | app, no admin rights |
| Start | open a window, type the path | open the dashboard, click |
| Parameters | typed every time | saved |
| Working folder | change with cd | saved |
| Changing values | any time | one fixed set per tile |
| Also for | PowerShell commands | PowerShell 5.1 and 7, Command Prompt, Bash, Git Bash, Python |
| Execution policy | applies | applies just the same |
| Cost | comes with Windows | included in Free |
For one-offs and changing parameters, the console remains the right tool. Once you type a line for the tenth
time, the tile is faster. A desktop shortcut with powershell.exe -File … works too, but it sits among all
your other icons. How to keep those in order is covered in
How to organize desktop icons.
Frequently asked questions
How do I run a ps1 file?
Open PowerShell and type the full path, such as C:\Scripts\Report.ps1. Or right-click the file in File
Explorer and select Run with PowerShell, if the script needs no parameters and shows no output.
Can I run a PowerShell script by double-clicking it?
Not directly; Windows prevents that on purpose. You need something that calls powershell.exe -File with
the path: a shortcut, a batch file or a console tile.
How do I run a PowerShell script from a batch file?
With powershell.exe -File "%~dp0Report.ps1". %~dp0 stands for the folder of the batch file, so both
files sit side by side. According to Microsoft, you use %~dp0 instead of .\ in batch files, because
.\ depends on the current folder and the script often isn’t found.
Do I need administrator rights?
Not to run a script, as long as the script itself doesn’t need them. You can also change the policy for
CurrentUser without them. Only for the whole computer (LocalMachine) does PowerShell have to run as
administrator.
What is the difference between Windows PowerShell and PowerShell 7?
Windows PowerShell 5.1 (powershell.exe) is included in Windows. PowerShell 7 is installed separately and
is called pwsh.exe. For scripts that only run there, replace powershell.exe with pwsh.exe in the
Command Prompt examples.
The two store their execution policies separately: Windows PowerShell in the registry, PowerShell 7 in its
own configuration files. So set the policy in the PowerShell you use to start the script: Set-ExecutionPolicy
in pwsh applies to PowerShell 7, in powershell to Windows PowerShell.
Can I start several programs with one click?
Yes, Celerando has multistart tiles that open several programs and web apps together. They are included in Free as well. If you only want to check whether servers are reachable, you don’t need a script: see How to ping an IP address on Windows.
Sources
As of November 25, 2026.
- Microsoft Learn: about_Scripts (path and
.\, parameters, no start by double-click) - Microsoft Learn: about_Run_With_PowerShell (Run with PowerShell and its limits)
- Microsoft Learn: about_Execution_Policies (
Restricted,RemoteSigned,Bypass, scopes, Group Policy precedence) and the PowerShell 7.5 version (where the policy is stored, retrieved November 28, 2026) - Microsoft Learn: about_PowerShell_exe (
-File,-NoExit,-NoProfile,-ExecutionPolicy,%~dp0) - Microsoft Learn: Unblock-File (unblocking downloaded scripts)
- The message texts come from the English resources of Windows PowerShell 5.1 on Windows 11.
More guides
- How to Ping an IP Address on Windows: Ping Test and Continuous PingRun a ping test in Command Prompt, start a continuous ping with ping -t, and learn what Request timed out and Destination host unreachable mean.
- Recent Files in Windows 11 and 10: Find, Hide and Clear ThemWhere Windows shows your recently opened files: File Explorer, Start, Jump Lists and Office. Plus how to hide or clear the list and keep files pinned.
- How to get the old right-click menu back in Windows 11Restore the full Windows 10 context menu in Windows 11: once with a shortcut, permanently with a registry entry or with a switch in Celerando.