私の英語は申し訳ありませんが、PowerShellスクリプトで助けが必要です。 私はpowershellスクリプトでIISサーバーを設定する必要があります。私は "アプリケーションの追加"に問題があります。サイトにWebアプリケーションが存在するかどうかを確認する必要があります。私は、サイト「testsite2」IISでpowershellを使用してWebアプリケーションを一覧表示する
$webapplication=Get-WebApplication | Where-Object {$_. applicationpool -eq "testsite2"} | select -expand Name;
内のすべてのwebアプリケーションを選択し たいしかし、私はエラー
で終了されたコマンドに問題があります選択:1つの文字:プロパティ「の名前は」found.At行することはできません。 75 Get-WebApplication | Where-Object {$ _。アプリケーションプール-eq "testsite2"} |選択... CategoryInfoを:InvalidArgument:(Microsoft.IIs.P ... gurationElement:PSObject)[選択-オブジェクト]、PSArgumentException FullyQualifiedErrorId:ExpandPropertyNotFound、Microsoft.PowerShell.Commands.SelectObjectCommand
私は理解してドント。列「名前」から値を選択する場合、私は何をしますか?私は同じ結果に
Get-ChildItem –Path IIS:\AppPools\ | Where-Object {$_. Name -eq "testsite2"} | select -ExpandProperty applications
結果取得
:
の選択:プロパティ "アプリケーションは、" 見つかりません。 行:1 char:80 Get-ChildItem -Path IIS:\ AppPools \ | Where-Object {$ _。名前-eq "testsite2"} | S ... CategoryInfo:InvalidArgument:(Microsoft.IIs.P ... gurationElement:PSObject)[選択-オブジェクト]、PSArgumentException FullyQualifiedErrorId:ExpandPropertyNotFound、Microsoft.PowerShell.Commands.SelectObjectCommand
私はあなたがこれらの実際の特性を見つける方法を示すために、取得するメンバーを含めるように答えを編集示唆;) – 4c74356b41
4c74356b41 @良いアイデア、更新の回答 –