Exchange Mgmt Shell - 您必须在“-or”运算符的右侧提供值表达式

时间:2013-11-08 10:59:18

标签: powershell exchange-server

我在EMS中执行此命令时遇到一些问题:

PS>Set-AddressList -Identity "some_list" -RecipientFilter {((((RecipientType -eq 'UserMailbox' -or RecipientType -eq 'MailContact') -and -not(CustomAttribute1 -ne $null)) -and (CustomAttribute12 -eq 'aa' -or CustomAttribute12 -eq 'aa, bb')) -and (-not(CustomAttribute13 -eq 'function_boxes') -or SamAccountName -eq 'some_user'))}


At line:1 char:325
+ ... _boxes') -or SamAccountName -eq 'some_user'))}
+                    ~
You must provide a value expression on the right-hand side of the '-or' operato
r.
At line:1 char:326
+ ... _boxes') -or SamAccountName -eq 'some_user'))}
+                    ~~~~~~~~~~~~~~
Unexpected token 'SamAccountName' in expression or statement.
At line:1 char:325
+ ... _boxes') -or SamAccountName -eq 'some_user'))}
+                    ~
Missing closing ')' in expression.
At line:1 char:64
+ Set-AddressList -Identity "some_list" -RecipientFilter {((((Recipient
Typ ...
+                                                                ~
Missing closing '}' in statement block.
At line:1 char:363
+ ... me_user'))}
+                    ~
Unexpected token ')' in expression or statement.
At line:1 char:364
+ ... me_user'))}
+                    ~
Unexpected token ')' in expression or statement.
At line:1 char:365
+ ... me_user'))}
+                    ~
Unexpected token '}' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordEx
   ception
    + FullyQualifiedErrorId : ExpectedValueExpression             ~

我无法弄清楚问题是什么?

0 个答案:

没有答案