I am having trouble setting the execution policy. This is the cmdlet that I am using:
I am using powershell 5.0 and windows 10. I am an advanced home user, but do not work in my field. My research says that once the execution policy is set then it will put a key into the registry and will save it so that you do not have to use the cmdlet every time you start powershell.
I want powershell to run automatically every time i start or reboot the machine so a shortcut to it is now in the startup folder. but when it runs i get an error:
. : File C:\Users\Ryan\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because running
scripts is disabled on this system. For more information, see about_Execution_Policies at
At line:1 char:3
- . 'C:\Users\Ryan\Documents\WindowsPowerShell\Microsoft.PowerShell_pro …
+ CategoryInfo : SecurityError: (:) , PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
I think I want to run PS as an administrator from the time it starts when I start the computer or restart it, but I don’t know how.
I tried this:
but it didn’t work. I’ve been trying to solve this problem for about 3 hrs. plz help, ty.