質問

Exchange 2010 Unifiedメッセージングオートメーションスクリプトを書いています。 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」に交換されているということです。

どんなガイダンスも大歓迎です。

よろしく

ジョン

役に立ちましたか?

解決

あなたはそれを過剰にしています。 :-) これを試して:

$str = "test1", "test2"
Set-UmServer -id Exchange01 -DialPlans $str 
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top