Batch die einiges kann :o

  • Sonstige

Es gibt 23 Antworten in diesem Thema. Der letzte Beitrag () ist von C-Sharp.

    Du kannst den eingestellten Wert mit Get-ExecutionPolicy bzw. Get-ExecutionPolicy -list auslesen. Get-ExecutionPolicy -list zeigt die Einstellungen aller Nutzer an, ohne -list nur die Einstellung der LocalMachine. Als Standart ist bei Win 8.1 und den meisten anderen Windows Systemen die ExecutionPolicy auf Resisted gestellt. Hier noch ne Liste der möglichen Einstellungen: technet.microsoft.com/de-de/library/Ee176847.aspx
    ​Smartnotr - ein intelligentes Notizprogramm
    zum Thread

    ErfinderDesRades schrieb:

    welchen Vorteil hats eigentlich, die PS-Konsole aufzurufen statt der cmd?



    Du kannst mit der PowerShell-Konsole die CMDLETs der PowerShell aufrufen (z.B. Get-Process, Get-Service usw.) und alle Befehle der CMD.exe.
    Zudem hast du direkt Zugriff aufs .NET-Framework...

    Quellcode

    1. z.B.​
    2. if([System.IO.File]::Exists("Pfad...."))


    Executionpolicy

    Restricted
    Do not load configuration files or run scripts.
    This is the default.

    AllSigned
    Require that all scripts and configuration files be signed
    by a trusted publisher, including scripts that you write on the
    local computer.

    RemoteSigned
    Require that all scripts and configuration files downloaded
    from the Internet be signed by a trusted publisher.

    Unrestricted
    Load all configuration files and run all scripts.
    If you run an unsigned script that was downloaded from the
    internet, you are prompted for permission before it runs.

    Bypass
    Nothing is blocked and there are no warnings or prompts.

    Undefined
    Remove the currently assigned execution policy from the
    current scope. This parameter will not remove an execution
    policy that is set in a Group Policy scope.


    Quelle: ss64.com/ps/set-executionpolicy.html
    NETworkManager - A powerful tool for managing networks and troubleshoot network problems!