Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2013-03-02 00:27:40

n872yt3r
Member
Registered: 2013-01-21
Posts: 392

Set-Executionpolicy

I've just started PowerShell.
I've been testing out all my programs, but they didn't work.
We knew it must be the function

Set-Executionpolicy

so before we pasted one of my scripts from ISE,
we put

Set-Executionpolicy Unrestricted
Get-Executionpolicy

and it returned

Restricted

And I can't get into setting myself as the administrator.
Help!


- n872yt3r
Math Is Fun Rocks! smile
By the power of the exponent, I square and cube you! cool

Offline

#2 2013-03-02 00:37:31

n872yt3r
Member
Registered: 2013-01-21
Posts: 392

Re: Set-Executionpolicy

Okay, so I tried

Get-Help Set-Executionpolicy

and it returned the following information:

NAME
    Set-ExecutionPolicy

SYNOPSIS
    Changes the user preference for the Windows PowerShell execution policy.


SYNTAX
    Set-ExecutionPolicy [-ExecutionPolicy] {Unrestricted | RemoteSigned | AllSigned | Restricted | Default | Bypass | Undefined} [[-Scope] {Process | CurrentUs
    er | LocalMachine | UserPolicy | MachinePolicy}] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]


DESCRIPTION
    The Set-ExecutionPolicy changes the user preference for the Windows PowerShell execution policy.

    To run this command on Windows Vista, Windows Server 2008, and later versions of Windows, you must start Windows PowerShell with the "Run as administrator"
     option, even if you are a member of the Administrators group on the computer.

    The execution policy is part of the security strategy of Windows PowerShell. It determines whether you can load configuration files (including your Windows
     PowerShell profile) and run scripts, and it determines which scripts, if any, must be digitally signed before they will run.

    For more information, see about_Execution_Policies.


RELATED LINKS
    Online version: http://go.microsoft.com/fwlink/?LinkID=113394
    Get-ExecutionPolicy
    Set-AuthenticodeSignature
    Get-AuthenticodeSignature
    about_Execution_Policies
    about_Signing

REMARKS
    To see the examples, type: "get-help Set-ExecutionPolicy -examples".
    For more information, type: "get-help Set-ExecutionPolicy -detailed".
    For technical information, type: "get-help Set-ExecutionPolicy -full".

So I knew for sure you had to set yourself as administrator, but of course

n872yt3r wrote:

And I can't get into setting myself as the administrator. Help!

So I tried the following code,

Get-Help Get-Executionpolicy

and it returned:

NAME
    Get-ExecutionPolicy

SYNOPSIS
    Gets the execution policies for the current session.


SYNTAX
    Get-ExecutionPolicy [[-Scope] {Process | CurrentUser | LocalMachine | UserPolicy | MachinePolicy}] [-List] [<CommonParameters>]


DESCRIPTION
    The Get-ExecutionPolicy cmdlet gets the execution policies for the current session.

    The execution policy is determined by execution policies that you set by using Set-ExecutionPolicy and the Group Policy settings for the Windows PowerShell
     execution policy. The default value is "Restricted."

    Without parameters, Get-ExecutionPolicy gets the execution policy that is effective in the session. You can use the List parameter to get all execution pol
    icies that affect the session or the Scope parameter to get the execution policy for a particular scope.

    For more information, see about_Execution_Policies.


RELATED LINKS
    Online version: http://go.microsoft.com/fwlink/?LinkID=113315
    Set-ExecutionPolicy
    Get-AuthenticodeSignature
    Set-AuthenticodeSignature
    about_Execution_Policies
    about_Signing

REMARKS
    To see the examples, type: "get-help Get-ExecutionPolicy -examples".
    For more information, type: "get-help Get-ExecutionPolicy -detailed".
    For technical information, type: "get-help Get-ExecutionPolicy -full".

And that didn't contain any useful information.


- n872yt3r
Math Is Fun Rocks! smile
By the power of the exponent, I square and cube you! cool

Offline

Board footer

Powered by FluxBB