Win10 right-click menu to add PowerShell script new item method

  

PowerShell is a very easy to use tool in Win10, this tool can easily realize a variety of Windows
depth operation, won the favor of the great gods . However, some users have reported that it is better if they can directly create a new PowerShell script file. However, Windows
10 does not provide a one-click service that is ready-made. You need to do it yourself. Download it, Xiaobian will bring you the Win10 right-click menu to add a PowerShell script to create a new item graphic step.
Win10

In general, users can create script files with a .ps1 extension directly through PowerShell ISE. They can also create code by writing common code tools such as Notepad and then changing the extension. But these methods are a bit of a hassle, it is better to create them directly. Want to add a new item to the right-click menu PowerShell script, just add a registry value, the operation is relatively easy, the specific steps are as follows:

1, enter regedit in the Cortana search bar, press Enter to enter the registry editor

2, positioning (this time is short? Short and short benefits ~)

HKEY_CLASSES_ROOT\\\\.ps1

3, new item ShellNew
Win10

4, create a new string value NullFile, leave the value data blank, indicating that the new project is an empty file, as shown below — —
Win10
Win10
5, in the file resource management Or right click on the desktop, there should be "Windows PowerShell script" in the new project,

Win10
Win10
The modification will take effect immediately. If it is not brushed out for the first time, it should be more than a few times. It’s coming out. Double-click the newly created script file and open it with Notepad by default. Of course you can also use PowerShell ISE to edit, it might be better to use some, but the startup is a bit slow.
Win10

Copyright © Windows knowledge All Rights Reserved