米Microsoftの「Windows PowerShell 5.0」には多数の新機能が導入されており、全体的な操作性が向上している。筋金入りのWindows PowerShell開発者しか興味を持たない機能もある一方で、広範なユーザーが関心を持つ新機能もある。その1つがリモートファイル編集機能だ。
すみません、やや手抜き記事です。 先日、PowerShellファイルを高速起動(?)する仕組みの記事を書いたのですが。 これはタスクバー上にPowerShellの便利機能のファイルを起動させるキー入力用フォームを常置させて、機能呼出を速やかに行う仕組みでした。
ファイルやディレクトリの一覧から、必要な行だけを抜き出して表示する例を考えよう。 まず、次のようなディレクトリがあったとする。 PowerShell CoreではSelect-Stringコマンドレットがgrepコマンドと似たような動きをする。 そこでSelect-Stringコマンドレットを ...
PowerShellではGet-ChildItemコマンドレット(省略形gci)で、ファイルの一覧を表示することができます。また、表示するファイルを日付で絞り込みたい場合、パイプラインでWhere-Object(省略形where)コマンドレットに送って抽出します。 例えば、本日が2011年2月8日で ...
前も似たようなことがあったのですが、 マジで今回の記事は内容の説明が難しいのですよ。 順を追って説明させていただきます。 以前の投稿で開発を試みては挫折している事柄について語っているのですが。 その中の1つに来年廃止予定のVBScriptという古の ...
Windows PowerShell is probably best-known for its ability to allow Windows admins to operate at scale. For instance, it would take forever to create a thousand user accounts through the GUI, but ...
A PowerShell “for” loop is a core scripting tool that lets you execute a block of code multiple times. Whether you’re automating system tasks or processing data, understanding how to write a “for” ...
Over the last few years, I have created a vast library of PowerShell scripts that I use to keep my servers healthy. These scripts do everything from monitoring disk health to helping me to reclaim ...