What's Wrong With My Windows PowerShell

Anonymous
2020-04-11T06:54:44+00:00

Today I Installed Anaconda 3 On My Windows 10 Pro. After that every time I opened PowerShell I got the following Error.

. : File C:\Users\BinoyGhosh\Documents\WindowsPowerShell\profile.ps1 cannot be loaded because running scripts is

disabled on this system. For more information, see about_Execution_Policies at

https:/go.microsoft.com/fwlink/?LinkID=135170.

At line:1 char:3

+ . 'C:\Users\BinoyGhosh\Documents\WindowsPowerShell\profile.ps1'

+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo          : SecurityError: (:) [], PSSecurityException

+ FullyQualifiedErrorId : UnauthorizedAccess

Any Help/Suggestions Appreciated. Thanks.

Windows for home | Windows 10 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. DaveM121 816.5K Reputation points Independent Advisor
    2020-04-11T06:59:19+00:00

    Hi BINOYGHOSH

    You must be logged into Windows as Administrator then do this

    Right click the Start Button, choose Powershell (admin)

    Paste this into Powershell and hit Enter

    set-executionpolicy remotesigned

    Close Powershell, then check if it is functioning correctly

    If not, open Powershell as Admin again and paste this command:

    Set-ExecutionPolicy unrestricted

    110 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2020-04-11T07:09:55+00:00

    Hello DaveM121,

                             Thanks for your quick reply. If I run this command using PowerShell (admin), Will this cause any problem with my working Anaconda 3? (Cause this is very important for me). And what is this file "profile.ps1" in "C:\Users\BinoyGhosh\Documents\WindowsPowerShell"? Can I delete this file?

    EDIT: 

    Inside it I found the following information.

    #region conda initialize# !! Contents within this block are managed by 'conda init' !!(& "C:\ProgramData\Anaconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression#endregion

    Please reply ASAP!

    5 people found this answer helpful.
    0 comments No comments
  3. DaveM121 816.5K Reputation points Independent Advisor
    2020-04-11T07:17:14+00:00

    Hi BINOYGHOSH

    Rest assured, the above commands will not cause any problems with your Anaconda 3

    4 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2020-04-11T07:38:17+00:00

    Which option should I choose?

    Yes. Yes to all. No (default)...

    6 people found this answer helpful.
    0 comments No comments
  5. DaveM121 816.5K Reputation points Independent Advisor
    2020-04-11T07:39:37+00:00

    Choose A - Yes to All

    8 people found this answer helpful.
    0 comments No comments