PowerShell Custom Providers
PowerShell CustomProvidersは、いくつかのWindowsPowerShellのカスタムプロバイダの寄せ集めです。
WindowsPowerShellについては以下のサイトを参照してください。
Overview
現在、以下の三つのプロバイダを用意しています。
- Ftp? - 考え中
Installation
- lang/powershell/PSCustomProviders/trunk から最新のソースをチェックアウトしてきます。
- コマンドプロンプトを起動して、チェックアウトしたディレクトリに移動します。
- NAntを使ってソースのビルドを行います。
c:\PSCustomProviders\> nant
- ビルドしたモジュールをSnapInとしてPowerShellにインストールします。
c:\PSCustomProviders\> nant install
- SnapInはインストールしただけでは有効にならないので、PowerShellを起動して有効にしたいプロバイダに合わせて以下のコマンドを実行します。
PS > Add-PSSnapIn [スナップイン名]
- Todo管理
- PSTodo
- WebDAV
- PSWeb
- 2ちゃんねるビューワ
- PS2ch
- Todo管理
- 各プロバイダからパイプラインに出力されるオブジェクトのデフォルトの表示を変更するためにフォーマットファイルを上書きします。
c:\PSCustomProviders> nant export-format
- このコマンドを実行すると「C:\Documents and Settings\[ユーザ名]\My Documents\WindowsPowerShell」に「format」というフォルダが作成されて、その中に各プロバイダ用のフォーマットファイル(拡張子が.ps1xml)がコピーされます。
- あとはこのフォーマットファイルをPowerShell起動時に読み込むために「profile.ps1」に以下の一文を追加します。
Get-ChildItem ($HOME + "\My Documents\WindowsPowerShell\format") -recurse -include *.ps1xml | % { Update-FormatData -prependPath $_.FullName }
Development Environment
- Microsoft Visual Studio 2005 Professional Edition or higher.
- NAnt 0.85 - build tool for .NET
- Download binary from http://nant.sourceforge.net/
- NUnit 2.4.6 - unit test tool for .NET
- Download binary from http://www.nunit.org/
System Requirement
- .NET Framework 2.0 or higher.
- Windows PowerShell 1.0
