New-InboxRule: all but 4 mailboxes fail: cannot open mailbox (connectionFailedTransientExceptio n)
Hi,
Does anyone know of any reasons that could be responsible for why I'm able to add new InboxRules to 4 mailboxes while all others fail?
Those 4 mailboxes aren't all on the same database and a lot of other mailboxes exist with no problems accessing them via Outlook or any other clients. I also never had any connectionFailedTransientException errors in event log.
I'm using the following: Get-Mailbox | foreach { New-InboxRule -Mailbox $_.Name -Name Spam -HeaderContainsWords "Spam-Reason" -MoveToFolder "$($_.Alias):\Junk-E-Mail" -StopProcessingRules $true -Confirm:$False -force }
Thank you!
March 6th, 2013 2:22pm
Hi
Could you please post the error message for those which were failed?
Also, was the account running the command got the permission for all those mailboxes
Get-Mailbox -resultsize unlimited | Add-ADPermission -user [AccountrunningCommand] -AccessRights FullAccess
CheersZi Feng
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
March 7th, 2013 3:37am
Hi
Could you please post the error message for those which were failed?
Also, was the account running the command got the permission for all those mailboxes
Get-Mailbox -resultsize unlimited | Add-ADPermission -user [AccountrunningCommand] -AccessRights FullAccess
CheersZi Feng
TechNet Community Support
March 7th, 2013 11:35am
Thanks for your reply!
The mailboxes were all created using ecp with the same user account which is the (default) domain administrator's account. When I try to run the cmdlets I'm logged in with the same user (domain\Administrator).
The error I get is:
Cannot open mailbox /o=ORG/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=a8c0a9868be34256b9915abff8f2bcbc-test.
+ CategoryInfo : NotSpecified: (:) [New-InboxRule], ConnectionFailedTransientException
+ FullyQualifiedErrorId : EEA358F7,Microsoft.Exchange.Management.RecipientTasks.NewInboxRule
+ PSComputerName : <fqdn>
Running Add-ADPermission
returns with:
Cannot process argument transformation on parameter 'AccessRights'. Cannot convert value "FullAccess" to type "System.DirectoryServices.ActiveDirectoryRights[]". Error: "Cannot convert value "FullAccess" to type "System.DirectoryServices.ActiveDirectoryRights". Error: "Unable to match the identifier name FullAccess to a valid enumerator name. Specify one of the following enumerator names and try again: CreateChild, DeleteChild, ListChildren, Self, ReadProperty, WriteProperty, DeleteTree, ListObject, ExtendedRight, Delete, ReadControl, GenericExecute, GenericWrite, GenericRead, WriteDacl, WriteOwner, GenericAll, Synchronize, AccessSystemSecurity""
+ CategoryInfo : InvalidData: (:) [Add-ADPermission], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Add-ADPermission
+ PSComputerName : <fqdn>
Running Get-ADPermission for the current Account:
Identity User Deny Inherited
-------- ---- ---- ---------
<domain>/Users/Adm... NT-AUTORITT\Auth... False False
<domain>/Users/Adm... NT-AUTORITT\SYSTEM False False
<domain>/Users/Adm... VORDEFINIERT\Admi... False False
<domain>/Users/Adm... <DOMAIN>\Domnen-Ad... False False
<domain>/Users/Adm... <DOMAIN>\Organisati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... Jeder False False
<domain>/Users/Adm... NT-AUTORITT\SELBST False False
<domain>/Users/Adm... NT-AUTORITT\SELBST False False
<domain>/Users/Adm... NT-AUTORITT\Auth... False False
<domain>/Users/Adm... NT-AUTORITT\Netz... False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-554 False False
<domain>/Users/Adm... S-1-5-32-560 False False
<domain>/Users/Adm... S-1-5-32-561 False False
<domain>/Users/Adm... S-1-5-32-561 False False
<domain>/Users/Adm... <DOMAIN>\Zertifikat... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Organizati... False False
<domain>/Users/Adm... <DOMAIN>\Delegated ... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange S... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
<domain>/Users/Adm... <DOMAIN>\Exchange T... False False
The Administrator is also in Help Desk, Recipient Management, Organisations-Admins, Organization-Management, Public Folder Management, Schema Admins, Server Management and Policy-Creator-Owner.
Thank you very much!
Free Windows Admin Tool Kit Click here and download it now
March 7th, 2013 1:31pm
Hi mxx82
My mistake, it should be Add-MailboxPermission
Get-Mailbox -resultsize unlimited | Add-MailboxPermission -user [AccountrunningCommand] -AccessRights FullAccess
CheersZi Feng
TechNet Community Support
March 8th, 2013 12:51am
Hi mxx82
My mistake, it should be Add-MailboxPermission
Get-Mailbox -resultsize unlimited | Add-MailboxPermission -user [AccountrunningCommand] -AccessRights FullAccess
CheersZi Feng
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
March 8th, 2013 8:49am
Thank you! It works.
I wasn't aware that assigning roles wasn't enough to be able to add inboxrules to mailboxes using powershell.
March 13th, 2013 8:42pm