In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you about how to disable PowerShell in Windows10. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Windows 10 provides two command line interfaces: the command prompt and PowerShell. Windows PowerShell is a powerful tool for users to install and manage Windows, troubleshoot problems, and perform advanced configuration. PowerShell can also be used to automate tasks and perform tasks that typically take a long time to complete in a graphical user interface.
In some environments, it is recommended to disable PowerShell, especially if you think someone is not using PowerShell for daily tasks.
Here are two ways to disable Windows PowerShell on your computer to avoid misuse of Windows PowerShell.
Disable PowerShell in Windows 10 using Group Policy
1. Start the Group Policy Editor by typing gpedit.msc in the run dialog box.
two。 Navigate from the left pane to the following:
User configuration-> Administrative templates-> system
3. Look for "do not run the specified Windows application" in the right pane and double-click it.
4. In the pop-up window, select the enabled radio button, and then click the Show button under options.
5. In the new Show Catalog pop-up window, type powershell.exe under the value column. You can also type powershell_ise.exe and pwsh.exe to disable the integrated scripting environment (ISE) that hosts the PowerShell.
Click OK when you are finished.
6. Click apply and click OK to close the do not run the specified Windows application window.
7. Type gpupdate / force at the command prompt to enforce changes to group policy.
Now launch PowerShell from the start menu and it will not work properly because PowerShell Core (pwsh.exe) has been disabled and there will be an error when starting it from the run menu.
If you want to re-enable PowerShell at any time, simply return to the same location in the Group Policy Editor, double-click "do not run the specified Windows application" and select the "disabled" or "unconfigured" radio button.
Disable PowerShell in Windows 10 using local security policy
1. Start the local security policy editor by typing secpol.msc in the run dialog box.
two。 Right-click Software restriction Policy in the left pane, and then click create Software restriction Policy from the context menu.
3. Right-click other rules, and then click New Hash Rule from the context menu.
4. In the New Hash Rule window, click Browse.
5. In the browse window, enter the following path in the address bar:
% SystemRoot%\ system32\ WindowsPowerShell\ v1.0
6. Select powershell.exe from the current working directory.
At this point, you can also choose powershell_ise.exe to disable ISE. To disable both, repeat the above steps and select the other one.
7. Now go back to the New Hash Rule window, click apply, and then click OK.
8. Restart the computer for the changes to take effect.
Trying to run disabled content (PowerShell or PowerShellISE) will prompt you that the application has been locked by the administrator.
If you want to re-enable Windows PowerShell or ISE, simply reopen the Local Security Policy Editor, and then click other rules on the left pane. Now, right-click the hash rule you created in the right pane, and then click Delete from the context menu.
If a confirmation dialog box appears, click Yes, and then restart your computer to re-enable Windows PowerShell if needed.
Disable PowerShell 7 in Windows 10
If you install PowerShell 7 on a Windows 10 device, the method of removing it will be different from the above method. You can think of PowerShell 7 as an application, so you can delete it using the Settings application.
1. Navigate to the following location:
Start-> Settings-> Application-> Application and Featur
two。 Now scroll down and click PowerShell 7.
3. Click Uninstall.
Now, try starting PowerShell 7 again, indicating that you can't find it.
The above is the editor for you to share how to disable PowerShell in Windows10, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.