Re: monad (MSH), skrypty

Autor: Adam_Błaszczyk <b.adam_at_gazeta.pl>
Data: Wed 22 Feb 2006 - 11:00:07 MET
Message-ID: <dthcnd$lo5$1@inews.gazeta.pl>
Content-Type: text/plain; format=flowed; charset="iso-8859-2"; reply-type=response

Użytkownik "ris" <ris22@gazeta.pl> napisał w wiadomości
news:dtfruh$pa7$1@atlantis.news.tpi.pl...
> Witam,
> Mam prosty skrypt zresztą z dokumentacji:
>
> function add2numbers
>
> ([int]$x, [int]$y )
>
> {
>
> $x + $y
> }
>
> Teraz chce go uruchomić więc pisze ./add2numbers.msh i dostaje:
>
> The file E:\Temp\Monad\add2numbers.msh cannot be loaded. The execution of
> scrip
> ts is disabled on this system. Please see "get-help about_signing" for
> more det
> ails.
> At line:1 char:17
> + ./add2numbers.msh <<<<
>
> Więc próbuje:
> $cert = get-childitem cert: -recurse -codesigning
>
> Jednak w $cert mam nulla, jak inczej zarejestrować skrypt ?
>
> pozdrawiam

W rejestrze Windows, w kluczu:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSH\1\ShellIds\Microsoft.Management.Automation.msh
ustaw wartość: ExecutionPolicy na RemoteSigned

pozdrawiam

-- 
Adam Błaszczyk
blaszczyk.adam(at)gmail.com 
Received on Wed Feb 22 11:05:11 2006

To archiwum zostało wygenerowane przez hypermail 2.1.8 : Wed 22 Feb 2006 - 11:42:03 MET