MicrosoftはPowerShell 7.0.0 Preview3の段階でForEach-Objectコマンドレットに並列処理機能を追加した。この機能を利用するとブロック単位で処理を並列化することができる。並列数は制御が可能で、使い方によっては大幅な高速化が可能になることを以前取り上げた。
「Windows」のコマンド実行ツール「PowerShell」は、IT管理者がシステムを構成したり、タスクを自動化したりするのに活用できる。PowerShellのスクリプト(簡易プログラム)でループ処理を使えば、IT管理者は同じスクリプトを繰り返し記述することなく、タスク ...
The ForEach-Object cmdlet performs an operation on each item in a collection of input objects. The input objects can be piped to the cmdlet or specified using the InputObject parameter. Starting in ...
これまでも何度か紹介したように、PowerShellではパイプラインでオブジェクトを入出力します。コマンドレットがオブジェクト群をまとめて受け取ったとき、そのオブジェクト1つ1つに処理を実行したいケースは少なくありません。そんなとき便利なのがForEach ...
2006年11月、マイクロソフトは新シェル「Windows PowerShell 1.0」の配布を開始した。オブジェクト指向で、ひと味違う。XP標準装備の「コマンドプロンプト」でテキストコマンドを使っている人は要注目だ。 「Windows PowerShell(ウインドウズパワーシェル)」は ...
Windowsユーザーなら一度は見たことがある「コマンドプロンプト」。でも、その隣にひっそりと佇む「PowerShell」、ちゃんと使ったことありますでしょうか? 実はこのPowerShell、ただの黒い画面じゃないんです。業務効率化や自動化の強力な味方。今回はそんな ...
Whenever you use PowerShell, whether it is querying data or making a change to some configuration or existing object, you are working with different types of objects. You may not be aware of it ...
PowerShell 3 deploys a new type adapter that will have you seeing hash table output in the order you want them to appear. In PowerShell 2, a common technique for creating a custom object is to create ...