我已经编写了一些交换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”中交换。

任何指导都将不胜感激。

问候

乔恩

有帮助吗?

解决方案

您正在过度劳累。 :-) 试试这个:

$str = "test1", "test2"
Set-UmServer -id Exchange01 -DialPlans $str 
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top