How to reset Powershell to the default settings

powershell

I have changed many powershell policies, such as the Execution policy for running scripts. Is there a way to get everything back to the default settings when OS was installed?

Best Answer

There is a PowerShell profile file, usually at C:\Users\UserA\Documents\WindowsPowerShell that you can edit/remove some customization entries.

When it comes to "resetting services" that is probably something that can be done manually.

e.g. for Execution Policy

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Undefined

Additionally, check C:\Users\UserA\Documents\PowerShell\powershell.config.json you can actually changed execution policy from there

Related Question