How to Add Windows PowerShell Script to New Context Menu in Windows 10

A .ps1 script file is a text file that contains one or more Windows PowerShell commands or expressions. A .ps1 file will open with Notepad by default. To run a .ps1 file with PowerShell, you would right click or press and hold on the .ps1 file and click tap on "Run with PowerShell".

The New context menu allows users to quickly create new files, folders, and shortcuts. You can right click or press and hold on your desktop or in any folder window, and click/tap on New to open the New context menu.

By default, Windows PowerShell Script is not in the New click context menu. Adding "Windows PowerShell Script" to the New context menu will make it easy for users to be able to quickly create a new .ps1 file on demand ready to be edited afterwards.

This tutorial will show you how to add or remove Windows PowerShell Script to the New context menu for all users in Windows 10.

You must be signed in as an administrator to be able to add or remove "Windows PowerShell Script" from the New context menu.

The Windows PowerShell execution policy determines whether you can run scripts and load Windows PowerShell profiles and configuration files. The default execution policy, Restricted, prevents all scripts from running, and prevents loading profiles. To change the execution policy to allow profiles to load and be used, see:

How to Set PowerShell Script Execution Policy in Windows 10

EXAMPLE: Windows PowerShell Script added to New context menu
PowerShell Script - Add to New Context Menu in Windows 10-new_powershell_script.jpg

Here's How:

1 Do step 2 (add) or step 3 (remove) below for what you would like to do.

2 To Add "Windows PowerShell Script" to New Context Menu

A) Click/tap on the Download button below to download the file below, and go to step 4 below.



3 To Remove "Windows PowerShell Script" from New Context Menu

This is the default setting.

A) Click/tap on the Download button below to download the file below, and go to step 4 below.



4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 Sometimes it may take a moment before this New context menu item is actually added or removed. If not, then restart the computer to apply.

8 You can now delete the downloaded .reg file if you like.

That's it,