Wednesday, April 16, 2025

Powershell

Connect to your 365 instance.

You have to do connect first, always.  Powershell ISE can't be used.  If you try you'll get a "A window handle must be configured" error.  Use regular Powershell.

Here's an example of connecting, then removing a user's auto-reply.

PS C:\> import-module exchangeonlinemanagement

PS C:\> connect-exchangeonline -UserPrincipalName admin@contoso.com

PS C:\>Get-MailboxAutoReplyConfiguration -Identity user@contoso.com

PS C:\> Set-MailboxAutoReplyConfiguration -identity user@contoso.com -AutoReplyState disabled
PS C:\> Set-MailboxAutoReplyConfiguration -identity user@contoso.com -ExternalMessage $null
PS C:\> Set-MailboxAutoReplyConfiguration -identity user@contoso.com -internalMessage $null

 

 

No comments:

Post a Comment

Use the Microsoft Learn Platform to imrpove our Azure, Defender, etc. skills

From Reddit One of the biggest frustrations when I was trying to get hands-on with Microsoft's stack was that you simply can't pract...