SOLVED

Set-Mailbox Not Working

%3CLINGO-SUB%20id%3D%22lingo-sub-2160178%22%20slang%3D%22en-US%22%3ESet-Mailbox%20Not%20Working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2160178%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20trying%20to%20change%20the%26nbsp%3BMessageCopyForSentAsEnabled%20property%20for%20a%20mailbox%20per%20the%20instructions%20in%3A%3C%2FP%3E%3CP%3EMessages%20sent%20from%20a%20shared%20mailbox%20aren't%20saved%20to%20the%20Sent%20Items%20folder%20-%20Exchange%20%7C%20Microsoft%20Docs%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20looks%20pretty%20simple.%20First%20I%20did%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-ExoMailbox%20-Identity%20%22account%40mydomain.com%22%20-properties%20Name%2CMessageCopyForSendOnBehalfEnabled%2CMessageCopyForSentAsEnabled%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20got%20the%20results%20I%20expected.%20The%20property%20was%20set%20to%20false.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20I%20did%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eset-mailbox%20-Identity%20%22account%40mydomain.com%22%20-MessageCopyForSentAsEnabled%20%24True%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20I%20get%20the%20error%20message%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20operation%20couldn't%20be%20performed%20because%20object%20'account%40mydomain.com'%20couldn't%20be%20found%20on%20'*********.NAMPR10A002.PROD.OUTLOOK.COM%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%20why%20it%20can%20find%20the%20account%20with%20the%26nbsp%3BGet-ExoMailbox%20(And%20Get-Mailbox)%20commands%20but%20can't%20find%20it%20with%20the%26nbsp%3Bset-mailbox%20command%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22ms-editor-squiggler%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22ms-editor-squiggler%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22ms-editor-squiggler%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22ms-editor-squiggler%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22ms-editor-squiggler%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2160178%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2160463%22%20slang%3D%22en-US%22%3ERe%3A%20Set-Mailbox%20Not%20Working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2160463%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4770%22%20target%3D%22_blank%22%3E%40John%20Twohig%3C%2FA%3E%26nbsp%3BHi%2C%20short%20of%20time%20here%20trying%20to%20go%20through%20a%20couple%20of%20questions%20so%20will%20not%20suggest%20anything%20else%20than%20this.%20Try%20using%20the%20M365%20admin%20portal%20instead.%20Groups%20-%20Shared%20mailboxes%20-%20Sent%20items%20(edit)%20tick%20the%20check%20boxes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2160689%22%20slang%3D%22en-US%22%3ERe%3A%20Set-Mailbox%20Not%20Working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2160689%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F551905%22%20target%3D%22_blank%22%3E%40ChristianBergstrom%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20wasn't%20what%20I%20was%20trying%20to%20do%20but%20it%20looks%20like%20a%20better%20solution.%20I%20didn't%20know%20that%20was%20there.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20have%20the%20person%20who%20is%20having%20the%20issue%20try%20it%20in%20the%20morning.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I was trying to change the MessageCopyForSentAsEnabled property for a mailbox per the instructions in:

Messages sent from a shared mailbox aren't saved to the Sent Items folder - Exchange | Microsoft Docs

 

It looks pretty simple. First I did:

 

Get-ExoMailbox -Identity "account@mydomain.com" -properties Name,MessageCopyForSendOnBehalfEnabled,MessageCopyForSentAsEnabled

 

I got the results I expected. The property was set to false.

 

Then I did:

 

set-mailbox -Identity "account@mydomain.com" -MessageCopyForSentAsEnabled $True

 

But I get the error message:

 

The operation couldn't be performed because object 'account@mydomain.com' couldn't be found on '*********.NAMPR10A002.PROD.OUTLOOK.COM

 

Any ideas why it can find the account with the Get-ExoMailbox (And Get-Mailbox) commands but can't find it with the set-mailbox command?

 

 

 
 
 
 
 
4 Replies
best response confirmed by John Twohig (Contributor)
Solution

@John Twohig Hi, short of time here trying to go through a couple of questions so will not suggest anything else than this. Try using the M365 admin portal instead. Groups - Shared mailboxes - Sent items (edit) tick the check boxes.

@ChristianBergstrom 

 

That wasn't what I was trying to do but it looks like a better solution. I didn't know that was there. 

 

I will have the person who is having the issue try it in the morning.

 

Thanks

@John Twohig 

 

Hi,

 

Please execute the command with alias name only as below:

Set-mailbox -Identity "AliasName" -MessageCopyForSentAsEnabled $True 

 

Please try this command and check the output is showing correctly or not??/

 

Get-Mailbox -Identity "account@mydomain.com" | fl Name, *message*

Get-Mailbox -Identity "AliasName" | fl Name, *message*

 

Regards,

MD

Have you tried to send it through a pipe?

Get-ExoMailbox -Identity xxx | set-mailbox -MessageCopyFor...

Same result?