447 Aufrufe
Gefragt in Windows 7 von

Hallo Leute, wer kann bitte helfen?

Hab die Powershell 5.1 sauber installiert aber wenn ich .ps1 scripte ausführen will bekomme ich diese Meldung

d:_runTest.ps1 : File D:\_runTest.ps1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ d:_runTest.ps1
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Windows 7 - Powershell im Admin-Modus, bekomme dann die obige Meldung angezeigt. In diesem Zustand kann ich auch keine neuen Module updaten..

2 Antworten

0 Punkte
Beantwortet von computerschrat Profi (32.2k Punkte)
ausgewählt von halfstone
 
Beste Antwort

Hallo,

standardmäßig ist die Ausführung von Scripts unter Powershell gesperrt. Du musst das zuerst freischalten. Wie die Freischaltung funktioniert, findet du bei Google unter "Powershell script erlauben" https://www.google.de/search?source=hp&ei=GJGbXYKsDcjCkwWEvY6IAg&q=powershell+script+erlauben&oq=powershell+script&gs_l=psy-ab.1.8.0l10.1526.4381..10041...0.0..0.129.888.16j1....3..0....1..gws-wiz.......0i131.g_gEiqKn8aI

Gruß computerschrat

0 Punkte
Beantwortet von
Bearbeitet

Powershell-Script ausführen – Gruppenrechte bearbeiten

Danke hat geklappt, schönen nAbend noch :-)

Auch Powershell Module installieren hab ich hin bekommen, mußte da in der Powershell

Set the installation policy for a repository

bzw. Set the source and publish locations for a repository ..noch setzen

**************************************************************************************

Da hab ich alles gefunden -> https://docs.microsoft.com/en-us/powershell/module/powershellget/set-psrepository?view=powershell-6

Hab das Modul -> SpeculationControl gebraucht damit das Ashampoo - SpectreMeltdownCheck funktioniert -> Super hat auch geklappt !!

Mit dem Befehl Save Module ....... issis angekommen im \Modul Ordner 

...