[PowerShell V2 CTP3] PowerShell ISEでのRead-Hostコマンドレット

by HIRO 16. 4月 2009 09:30

通常の(ISEではない方)でRead-Hostコマンドレットを実行すると、カーソルが点滅して入力を促します。

image3

PowerShell ISEの方でRead-Hostコマンドレットを実行すると、VBScriptとかのInputboxのようなダイアログが表示されます。

image1

-Promptパラメータも使用可能なので

PS> $a = Read-Host “下記に文字列を入力してください”

のようにすると、下記のようにプロンプト付きで表示されます。

image2

ちなみに、[X]ボタンを押したときと[Cancel]ボタンが押されたときは、入力したデータは返されません。(当然ですね)

最新のブログ

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

PowerShell ISE | PowerShell V2 CTP3

コメント

コメントを書く


 

  Country flag

biuquoteredbluegreenyellowPowerShellTextFile
  • コメント
  • プレビュー
Loading



Calendar

<<  3月 2010  >>
月曜火曜水曜木曜金曜土曜日曜
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 PowerShell from Japan!!