我正在编写一些 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”中交换。
任何指导将不胜感激。
问候
乔恩