powershell - Trouble scripting inputs for set-Umserver cmd let -
i've writing exchange 2010 unified messaging automation scripts. i'm trying automate assoication of um dial plans um servers. powershell command :
[ps] e:\scripts>set-umserver -id exchange01 -dialplans "test1", "test2"
when try following scripting solution:
[ps] e:\scripts>$str = "`"test1`", `"test2`"" [ps] e:\scripts>set-umserver -id exchange01 -dialplans $str
i 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 i'm handling variable incorrectly , variable swapping in ""test1", "test2"" rather "test1", "test2".
any guidance appreciated.
regards
jon
you're overworking it. :-) try this:
$str = "test1", "test2" set-umserver -id exchange01 -dialplans $str
Comments
Post a Comment