Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
programmierung:powershell [2012-04-19 09:16] stefan angelegt |
programmierung:powershell [2014-04-05 11:42] |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Some common tasks in Windows PowerShell ====== | + | |
- | * suppress error messages (even those that won't go away with ''-ea 0''): ''$ErrorActionPreference = "silentlycontinue"'' | + | |
- | * check if an error occured (e.g. after cmdlet with suppressed output): ''if (!$?)'' | + | |
- | * ''copy-item'' throws an ''UnauthorizedAccessException'': use parameter ''-force'' | + |