Queue Buildups, Event IDs16025 and 205, and “You do not have permission to perform this action” when sending a message

Scenario:  You are troubleshooting an issue where you have the following symptoms:

  • When sending a message via any client the message is getting stuck in the Outbox/Drafts.
  • In Outlook Web it states “You do not have permission to perform this action” when attempting to send a message.
  • The Queues are backed up and not draining
  • Event IDs 16025 and 205 are in the event log for MSExchange Common and MSExchange Transport

Solution:  Make sure the ‘Register this connection’s addresses in DNS checkbox is checked.  This is required in order for Exchange Transport to operate correctly.  Once this was set, all was well.

Powershell: You want to determine which Exchange admin ran a PowerShell command edited a specific mailbox

Scenario: You want to determine which Exchange admin edited/altered the mailbox of a specific user HarryJ.  HarryJ could no longer access OWA as someone disabled it.  Now to determine  the admin that made the change.

Solution: Run the following:

Search-AdminAuditLog -cmdlets Set-CasMailbox -startdate “2/28/201 7:00PM” -enddate “3/1/2017  9:00AM” | Where ObjectModified -like *HarryJ* | Out-gridview

Install Windows Updates and Hotfixes from Command Line

Scenario:  You have a lot of Windows Updates and Hotfixes that you need to install manually.  You want to do the following:

  1. Script the install
  2. Do not restart the server after the update is installed — (so you can manually restart it when you are ready)

Scriptlets:

Download the updates to a folder and copy that folder to the servers requiring the update.

#Collect your Servers into a variable
$Servers = Get-exchangeserver ex*

#Create an folder to copy your updates to
$Servers.name | %{ MD \$_c$updatesCluster_Updates }

#Copy your updates to that new folder
$servers.name | %{ Copy-item "C:Cluster_updates*.msu" "\$_c$updatesCluster_updates"

Install the updates on each server by running the following command from an elevated command prompt:

FOR %h IN (*.msu) DO START /WAIT WUSA %h /QUIET /NORESTART

To verify the updates are installed on each one of your servers, run the following PowerShell commandlet:

$servers.name | %{ get-hotfix -computername $_ | Where InstalledOn -gt 2/5/2017}

 

 

 

Powershell: Run a Scheduled Task Remotely

Scenario:  You want to run a Scheduled Task remotely without needing to remote into the server, open task scheduler, and execute the task.

Solution:  Run the following in Powershell with appropriate permissions:

schtasks /run /s exchsvr1 /tn "exchange monitor"

If you want to loop it so it runs manually every 30 minutes, run the following:

#When the counter reaches 30, that’s 15 hours

$counter  = 0

Do{
schtasks /run /s exchsvr1 /tn "exchange monitor"
sleep 1800
$counter++
“$counter – Running script”
} While ($counter –lt 30)

 

Remove an Exchange Server from Autodiscover lookups

Scenario:  You have a server where you need to change the namespaceconfiguration settings of your client access virtual directories and you do not wish for this server to hand these server settings out with autodiscover.

Solution:  Run the following Powershell so it will not participate in the SCP lookup:

Set-ClientAccessServer  2016ExSrv1 -autodiscoverserviceinternaluri $null