Exchange log Clear (Fake Backup)

Open Command Prompt as Administrator

Diskshadow
Add volume d: (optional, add one line for each additional drive to include) 
Begin Backup
Create
End Backup

At this step you should notice the following events in the application log indicating that the backup was indeed successful and logs will now be deleted.

Allow Anonymous Relay on a Receive Connector

Create a new Receive Connector, name it “Anonymous Relay”
Set Permission Groups tab; to ONLY Exchange Servers
Set Authentication tab; to do TLS and Externally Secured Only

Then Run this in Power shell.

Get-ReceiveConnector "Anonymous Relay" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient"

Exporting PST’s from Exchange 2010

##First you need to grant your self permissions one time

New-ManagementRoleAssignment -Role "Mailbox Import Export" -user cswadmin

Exit Exchange Shell and Enter again

Setup UNC Share, and set the Exchnage server Computer account to have access to the Share&Folder

##Now Run this command for each user’s Mailbox.

New-MailboxExportRequest -Mailbox useralias -FilePath \\server\ExchangeMailboxes\user.pst

#### TO check on the STATUS

Get-MailboxExportRequest | get-mailboxexportrequeststatistics

######WHen they are COmpleted, and you want to CLear them from the History, run this

Get-MailboxExportRequest | where {$_.status -eq "Completed"} | Remove-MailboxExportRequest

How to send as/from a distribution group with Exchange 2010

To grant a user the permission to send from a distribution group you will need to open Active Directory with the view set to “Advanced” then open the properties of the Distribution group you wish to modify, and select the “Security” tab. Click the “Add…” tab to add the users who will be sending as the group.
Once you’ve added the users, check mark Allow for “Send as” under “Permissions for SELF” make sure to uncheck all other permissions.
Remember to allow time for the changes to replicate, and send a test message to you to confirm the changes took effect.

Find Email Forwards

To find Forward Rules:
foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.ForwardTo} | fl MailboxOwnerID,Name,ForwardTo >> d:\Forward_Rule.txt }

To find Redirect Rules:
foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.ReDirectTo} | fl MailboxOwnerID,Name,RedirectTo >> d:\Redirect_Rule.txt }

Here’s what I ended up using to find rules that wholesale forward or redirect…
foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.RedirectTo -or $_.ForwardTo -and -not ($_.description -match "If the message") } | fl MailboxOwnerId,Description >> rules.txt }

Disable POP by default

This will disabled POP on New accounts Only.

You will have to disable POP on all Existing accounts.

create this File:
C:\Program Files\Microsoft\Exchange Server\V14\Bin\CmdletExtensionAgents\ScriptingAgentConfig.xml

Put this in the File


<?xml version="1.0" encoding="utf-8" ?>  
<Configuration version="1.0">  
  <Feature Name="MailboxProvisioning" Cmdlets="enable-mailbox">  
    <ApiCall Name="OnComplete">  
      if($succeeded)  
        {  
        $user = (Get-User $provisioningHandler.UserSpecifiedParameters["Identity"]).distinguishedName  
        Set-CASMailbox $user -PopEnabled $false 
        }  
      </ApiCall>  
    </Feature> 
  <Feature Name="MailboxProvisioning" Cmdlets="new-mailbox">  
    <ApiCall Name="OnComplete">  
      if($succeeded)  
        {  
        $user = (Get-User $provisioningHandler.UserSpecifiedParameters["Name"]).distinguishedName  
        Set-CASMailbox $user -PopEnabled $false 
        }  
      </ApiCall>  
    </Feature>
</Configuration>

Run this Command

Enable-CmdletExtensionAgent "Scripting Agent"

Exchange Allow Relaying

If you have a server that needs to send email to any and all destinations, you need to create a new Receive connector, and manually add host’s addresses.
Then you need to use power-shell to run this command against that particular Receive connector.

Get-ReceiveConnector "" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Recipient"