PS Scripts
„Hallo Welt“-Script in Powershell erstellen
siehe auch Powershell 1×1 für Exchange
„Hallo Welt“ direkt in Powershell ausgeben
1 | ‚Hallo Welt‘ |
*** Powershellscript erstellen ***
1 2 | PS cd $home PS '"Hallo Welt"' | out-file test2.ps1 |
*** Script in Powershell ausführen ***
1 | PS .\test2.ps1 |
*** Policy abfragen und ausführen von nichtsignierten lokalen scripts erlauben ***
1 2 | PS Get-ExecutionPolicy PS Set-ExecutionPolicy RemoteSigned |
*** Script außerhalb der Powershell ausführen ***
1 | c:\Windows\System32\WindowsPowerShell\v1.0>powershell -noexit -command "& c:\batch\test2.ps1" |