Powershell

How to Run PowerShell Scripts by Clicking Files

How to run PowerShell files, Windows command line scripts, by clicking on them.

Shou Arisaka
1 min read
Oct 9, 2025

How to run PowerShell files, Windows command line scripts, by clicking on them.

Either create a shortcut file like this:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned -File C:\startup\open_folders.ps1

Or create a batch file like this:

@echo off
start /d . powershell -NoProfile -ExecutionPolicy Unrestricted .\open_folders.ps1
exit

Share this article

Shou Arisaka Oct 9, 2025

๐Ÿ”— Copy Links