• Windows Powershell

    Home » Forums » AskWoody support » Windows » Windows 7 » Questions: Windows 7 » Windows Powershell

    Author
    Topic
    #475381

    I am running the following command:

    %SystemRoot%system32WindowsPowerShellv1.0powershell.exe -NoExit -ImportSystemModules

    and receive the following message:

    WARNING: File C:Windowssystem32WindowsPowerShellv1.0ModulesPSDiagnosticsPSDiagnostics.psm1 cannot be loaded
    because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.

    I have done a search for “get-help about_signing” and enable scripts with no related results.

    What scripts must be enabled? I did run the command as administrator as well and the error message is the same.

    By the way, my userid is an administrator yet I must still select run as administrator for some functions to work correctly. What is with that?

    Viewing 3 reply threads
    Author
    Replies
    • #1271408
      • #1271459

        Actually, the message indicated exactly what to do, which is acces the quoted phrase. I search Help on my computer and at microsoft.com and GOT NO RESULTS. Thus, as is often the case, Microsoft messages are of little help.

    • #1271461

      Checking out the moderator link proved helpful, but further reinforced the fact that the actual message referring to get help about signing, is misleading. Certain scripts were disabled, and entering the command, Set-ExecutionPolicy Unrestricted, provided the necessary change to avoid the message. Thanks for the post.

    • #1271509

      When the error message says:

      >>Please see “get-help about_signing” for more details.

      It means to enter that command at a PowerShell command line. There is a separate PowerShell window, and entering the “get-help about_signing” command into it tell you probably more than you need to know about this. You want to pay attention to the text under “RUNNING UNSIGNED SCRIPTS (REMOTESIGNED EXECUTION POLICY)”. Essentially, PowerShell is set up by default to not run scripts unless they are signed. This is a security measure. The help text even gives the command that you can use to allow unsigned local scripts to run.

      To get to the PowerShell command line, type “PowerShell” into the Start search box, and click on “Windows PowerShell”.

    • #1271513

      I read the help text a little more carefully. You also want to read the text under “TO PERMIT SIGNED SCRIPTS TO RUN”. That section gives two command, the second one enables running of local unsigned scripts:

      set-executionpolicy remotesigned

      Make sure you run that command from a PowerShell command line.

      • #1271544

        Okay, the “aha” moment finally sank in. If the original error message had said “enter the following command…” at the PowerShell prompt, this thread would never have happened. Thank you all for your patience and feedback.

        The PowerShell looks interesting, somewhat akin to UNIX/LINUX secure shell sessions. Just off hand, the following UNIX commands respond nicely: ls, ps, pwd, man, alias and kill.

        • #1271555

          Just off hand, the following UNIX commands respond nicely: ls, ps, pwd, man, alias and kill.

          That is because those command, and various dos commands, are aliased to built-in powershell command. To see all of them, and which command they are mapped to, type “get-alias” as a PowerShell prompt.

    Viewing 3 reply threads
    Reply To: Windows Powershell

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: