Win10 right-click menu to add PowerShell script new item graphic steps

  
As we all know, PowerShell is a very useful tool in Win10, this tool can easily achieve a variety of Windows depth operations, won the favor of the great gods. However, some users have reported that it is better to be able to create a new PowerShell script file directly, but Windows 10 does not provide a ready-made one-click service, you need to do it yourself. Today, Xiaobian will bring you the Win10 right-click menu to add a PowerShell script to create a new item graphic step.

Win10
Generally speaking, users can create a script file with the extension .ps1 directly through PowerShell ISE, or write the code through a common tool such as Notepad, and then create 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, new string value NullFile The numerical data is left blank, indicating that the new project is an empty file, as shown in the following figure ——


Win10
5. Right click on the file explorer or directly on the desktop to create a new project. There should be "Windows PowerShell scripts"

Win10

Win10
Modifications take effect immediately, if the first time did not brush out, more than a few times should come 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.


Copyright © Windows knowledge All Rights Reserved