Hi,

I am trying to enable mailbox (Exchange 2010) using Power shell cmdlets
on Active Directory driver. But I am getting below error:

There might be some syntax mistake that I might have commited, can
anyone correct me please?

DRIVER POLICY CODE:
<rule>
<description>Adding PSExecute to Create Group Mailbox</description>
<comment xml:space="preserve">Adding PSExecute to Create Group
Mailbox</comment>
<conditions>
<or>
<if-operation mode="regex"
op="not-equal">query|status</if-operation>
</or>
</conditions>
<actions>
<do-set-local-variable name="identityname" scope="policy">
<arg-string>
<token-xpath
expression="./add-attr[@attr-name=sAMAccountName]/value/text()"/>
</arg-string>
</do-set-local-variable>
<do-set-dest-attr-value name="PSExecute">
<arg-value type="string">
<token-text xml:space="preserve">Enable-Mailbox -Identity
$identityname$</token-text>
</arg-value>
</do-set-dest-attr-value>
</actions>
</rule>

DRIVER ERROR LOG:

[03/18/14 07:26:00.169]:AD ST: Applying to modify #1.
[03/18/14 07:26:00.169]:AD ST: Evaluating selection criteria for rule
'Adding PSExecute to Create Group Mailbox'.
[03/18/14 07:26:00.170]:AD ST: (if-operation not-match
"query|status") = TRUE.
[03/18/14 07:26:00.170]:AD ST: Rule selected.
[03/18/14 07:26:00.171]:AD ST: Applying rule 'Adding PSExecute to
Create Group Mailbox'.
[03/18/14 07:26:00.171]:AD ST: Action:
do-set-local-variable("identityname",scope="policy",token-xpath("./add-attr[@attr-name=sAMAccountName]/value/text()")).
[03/18/14 07:26:00.172]:AD ST:
arg-string(token-xpath("./add-attr[@attr-name=sAMAccountName]/value/text()"))
[03/18/14 07:26:00.172]:AD ST:
token-xpath("./add-attr[@attr-name=sAMAccountName]/value/text()")
[03/18/14 07:26:00.173]:AD ST: Token Value: "".
[03/18/14 07:26:00.173]:AD ST: Arg Value: "".
[03/18/14 07:26:00.173]:AD ST: Action:
do-set-dest-attr-value("PSExecute","Enable-Mailbox -Identity
$identityname$").
[03/18/14 07:26:00.174]:AD ST: arg-string("Enable-Mailbox
-Identity $identityname$")
[03/18/14 07:26:00.175]:AD ST: token-text("Enable-Mailbox
-Identity $identityname$")
[03/18/14 07:26:00.175]:AD ST: Expanded variable reference
'$identityname$' to ''.
[03/18/14 07:26:00.175]:AD ST: Arg Value: "Enable-Mailbox
-Identity ".
....
<output>
<add-association dest-dn="\SEI\data\users\TestUser001"
dest-entry-id="34289"
event-id="SEIIDV#20140318095655#1#3:c03a79f0-a684-478e-d4b5-f0793ac084a6">ddae61fa4dfdcc4eb9eebeaa2e2d26a6</add-association>
<status
event-id="SEIIDV#20140318095655#1#3:c03a79f0-a684-478e-d4b5-f0793ac084a6"
level="error" type="driver-general">Could not set password via platform
call. Err=5 (access denied)</status>
<status
event-id="SEIIDV#20140318095655#1#3:c03a79f0-a684-478e-d4b5-f0793ac084a6"
level="error" text1="Exchange 2010" type="powershell">Exchange 2010
Exception. code:0x00000130 Error completing exchange 2010 command.
ERROR: Missing an argument for parameter 'Identity'. Specify a parameter
of type 'Microsoft.Exchange.Configuration.Tasks.UserIdPara meter' and try
again.</status>
<status
event-id="SEIIDV#20140318095655#1#3:c03a79f0-a684-478e-d4b5-f0793ac084a6"
level="success"/>
</output>

Thanks & Regards,
Neha


--
neha_gupta
------------------------------------------------------------------------
neha_gupta's Profile: https://forums.netiq.com/member.php?userid=1249
View this thread: https://forums.netiq.com/showthread.php?t=50306