PowerShell serves as a robust command-line tool for users to install and manage Windows 10. However, this tool can be misused for malicious purposes if it falls into the hands of strangers. Therefore, if you don't frequently use PowerShell, it's recommended to disable it for the safety of your computer.

Method 1: Disable PowerShell via Group Policy
Step 1: Press the Windows + R key combination to open the Run dialog. Then, type gpedit.msc and press Enter.

Step 2: In the Group Policy window that appears, navigate to User Configuration >> Administrative Templates >> System.

Step 3: Now, locate in the right-hand pane the entry Don’t run specified Windows applications and click on it.

Step 4: In the popup window, check the Enabled box. Then, click the small Show… button in the frame below.

Step 5:

Step 6: Return to the previous window, press Apply, and then OK to apply the changes.

Now, you won't be able to open PowerShell anymore. If you ever want to reactivate PowerShell, simply go back to the Don’t run specified Windows applications window and select Disabled.
Method 2: Disable PowerShell in Windows 10 using Local Security Policy Editor
The Local Security Policy Editor in Windows 10 enables users to manage security protocols.
Bước 1: Nhấn Windows + R để mở hộp thoại Run, sau đó nhập secpol.msc và Enter.

Bước 2: Ở cửa sổ Local Security Policy, hãy click chuột phải vào Software Restriction Policy và chọn New Software Restriction Policies.

Bước 3: Click chuột phải vào Additional Rules >> Chọn New Hash Rule…

Bước 4: Nhấp vào Browse...

Step 5: In the Browse… window, input the following path into the address bar:
%SystemRoot%system32WindowsPowerShell1.0

Step 6: Select powershell.exe from the list and click Open.

Step 7: Returning to the New Hash Rule window, click Apply to enforce the changes.

Now, restart your computer for the changes to take effect.
If you wish to re-enable Windows PowerShell, simply reopen the Local Security Policy Editor and click on Additional Rules. Now, right-click on the commands you created and choose Delete.

Conclusion
Windows PowerShell is a powerful tool not everyone should use. If you lack knowledge about this tool, it's advisable to disable it using the two methods mentioned above.