none
Powershell - exchange - Add-MailboxPermission stopped working RRS feed

  • Question

  • I am calling the command Add-MailboxPermission in a powershell workflow activity. I recently noticed that it stopped working. It was working fine before. The command after that, Set-mailbox still works.Can someone help me?

    param
    (
       $AcctName
    )

    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

    add-MailboxPermission -Identity $AcctName -User "NT Authority\SELF" -Accessright 'Fullaccess' (stopped working)
    set-mailbox -identity $AcctName -HiddenFromAddressListsEnabled $false (working fine)


    • Edited by fim_sc Friday, June 6, 2014 1:22 AM
    Friday, June 6, 2014 1:21 AM

All replies

  • What happens if you run this script using the FIM Service account manually? (assuming this is what your PS WF is executed under) Does that give you any errors to work with?

    Friday, June 6, 2014 4:42 AM
  • There is no error on FIM's side. All the search requests are completed. I logged in as FIM service account and ran the commands one by one manually. it worked that way. but the script is called in fim workflow activity, it is not working. Is it anything to do with exch 2010 snapins.

    • Edited by fim_sc Friday, June 6, 2014 1:42 PM
    Friday, June 6, 2014 1:41 PM