W dniu 21.04.2020 o 14:28, Grzegorz Niemirowski pisze:
Maniak <xyz@abc.com> napisał(a):
Ten skrypt trzeba chyba uruchomić pod Linuksem. W tej chwili nie mam
takiej możliwości.
Jesteśmy na grupie o Windowsie więc oczywiście nie jest to skrypt do
uruchamiania pod Linuksem. Skrypt jest napisany w PowerShellu więc
powinien być w pliku o rozszerzeniu .ps1
Ale nawet gdyby były, to nie wiem jak uzupełnić ten skrypt by
wiedział skąd ma czytać dane i gdzie zapisać wyniki.
Skrypt operuje na katalogu, w którym został umieszczony. Jeśli ma
operować na innym, trzeba podać odpowiednią ścieżkę w miejsce *.eml
Plik wlm.ps1 zawiera Twój skrypt zapisany przy pomocy Notatnika.
Po wpisaniu w Windows PowerShell (x86):
PS C:\> wlm.ps1
pojawiła się informacja na czerwono:
wlm.ps1 : The term 'wlm.ps1' is not recognized as the name of a cmdlet,
function, script file, or operable program. Che
ck the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
+ wlm.ps1
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (wlm.ps1:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
a pod nią informacja na biało:
Suggestion [3,General]: The command wlm.ps1 was not found, but does
exist in the current location. Windows PowerShell does not load commands
from the current location by default. If you trust this command, instead
type: ".\wlm.ps1". See "get-help about_Command_Precedence" for more details.
PS C:\>
Następnie po wpisaniu (z zaufaniem :-):
PS C:\> .\wlm.ps1
pokazała się informacja na czerwono:
.\wlm.ps1 : File C:\wlm.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:1
+ .\wlm.ps1
+ ~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Co oznacza "running scripts is disabled on this system" (chodzi o
informatykę, nie o angielski)?
Za mało o tym wiem, żeby uruchomić ten skrypt, nawet z pomocą podanej
powyżej strony. :-(
Pozdrawiam
|