0

Exchange 2010 ユニファイド メッセージング自動化スクリプトをいくつか作成しました。UM サーバーへの UM ダイヤル プランの関連付けを自動化しようとしています。powershell コマンドは次のとおりです。

[PS] E:\Scripts>Set-UmServer -id Exchange01 -DialPlans "test1", "test2"

次のスクリプト ソリューションを試すと、次のようになります。

[PS] E:\Scripts>$str = "`"test1`", `"test2`""
[PS] E:\Scripts>Set-UmServer -id Exchange01 -DialPlans $str

エラーが発生します:

The UM dial plan "test1", "test2" doesn't exist.
+ CategoryInfo          : NotSpecified: (0:Int32) [Set-UmServer], ManagementObjectNotF
+ FullyQualifiedErrorId : 7AF43AA1,Microsoft.Exchange.Management.Tasks.UM.SetUMServer

私の感じでは、変数の扱いが間違っていて、変数が "test1"、"test2" ではなく ""test1"、"test2"" に入れ替わっています。

ガイダンスをいただければ幸いです。

よろしく

ジョン

4

1 に答える 1

0

あなたはそれを酷使しています。:-) これを試して:

$str = "test1", "test2"
Set-UmServer -id Exchange01 -DialPlans $str 
于 2010-10-08T16:46:06.277 に答える