2017-12-15から1日間の記事一覧

Windows PowerShellのFunction入門 (出力編)

この記事はWindows PowerShellのFunctionの出力に関する基本的な話です PowerShellではReturnがなくても戻り値が返される (むしろ意識的に消さないと意図せぬ戻り値が生じてしまう) という話です PowerShellではFunction (ScriptBlock/Filter/スクリプトファ…

Windows PowerShellのFunction入門 (Begin、Process、Endブロック編)

この記事はWindows PowerShellのBegin、Process、Endブロック、そしてFunction/Filter/ScriptBlockスクリプトファイルの違いに関する基本的な話です PowerShellの処理はBegin、Process、Endの3つのブロックに分かれています # Sample1.ps1の内容 Begin{ Writ…