This shows you the differences between two versions of the page.
— |
powershellargs [2014/10/25 21:52] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | == Command line handling in powershell == | ||
+ | <code> | ||
+ | if ($args.length -gt 0) { | ||
+ | $args | foreach { | ||
+ | write-host "===" $_ "===" | ||
+ | $rows = get-content $_ | ||
+ | $rows | ||
+ | } | ||
+ | } else { | ||
+ | Write-host "Need argument" | ||
+ | } | ||
+ | </code> | ||
+ | ---- | ||
+ | * [[powershell|Back to Powershell]] |