set-Umserver cmdlet 的脚本输入问题
我编写了一些 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”中交换, “测试2”。
任何指导将不胜感激。
问候
乔恩
I've writing some Exchange 2010 Unified Messaging automation scripts. I'm trying to automate the assoication of UM dial plans to UM Servers. The powershell command is :
[PS] E:\Scripts>Set-UmServer -id Exchange01 -DialPlans "test1", "test2"
When I try the following scripting solution:
[PS] E:\Scripts>$str = "`"test1`", `"test2`""
[PS] E:\Scripts>Set-UmServer -id Exchange01 -DialPlans $str
I get an error:
The UM dial plan "test1", "test2" doesn't exist.
+ CategoryInfo : NotSpecified: (0:Int32) [Set-UmServer], ManagementObjectNotF
+ FullyQualifiedErrorId : 7AF43AA1,Microsoft.Exchange.Management.Tasks.UM.SetUMServer
My feeling is that I'm handling the variable incorrectly and the variable is swapping in ""test1", "test2"" rather than "test1", "test2".
Any guidance would be greatly appreciated.
regards
Jon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你工作过度了。 :-) 试试这个:
You're overworking it. :-) Try this: