Bind mail control


    1. IN TXT "v=spf1 ip4: ip4: -all"

_dmarc IN TXT "v=DMARC1;p=quarantine;;"

F4EEC778-4C21-11EA-AD84-83DCF040F65E._domainkey IN TXT ( "v=DKIM1; k=rsa; "

Exchange 2010 recovery

new-mailboxdatabase -recovery -name RDB1 -server servername -edbfilepath "c:\rectemp\support\support.edb" -logfolderpath "c:\rectemp\support"


cd c:\rectemp\support
eseutil.exe /mh support.edb
esetuil.exe /p support.edb

restore-mailbox -identity administrator -recoverydatabase RDB1 -recoverymailbox "Boss" -targetfolder "recoverfolder1"

restore-mailbox -identity administrator -recoverydatabase RDB1 -subjectkeywords "Meeting" -contentkeywords "business" -includefolders \inbox

dismount-database RDB1 -confirm:$false
remove-mailboxdatabase RDB1

Increase office 365 Send & Receive attachment and message size

Get-MailboxPlan | fl name,maxsendsize,maxreceivesize,isdefault
Name : ExchangeOnline-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
MaxSendSize : 35 MB (36,700,160 bytes)
MaxReceiveSize : 36 MB (37,748,736 bytes)
IsDefault : False

Name : ExchangeOnlineDeskless-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
MaxSendSize : 35 MB (36,700,160 bytes)
MaxReceiveSize : 36 MB (37,748,736 bytes)
IsDefault : False

Name : ExchangeOnlineEnterprise-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
MaxSendSize : 35 MB (36,700,160 bytes)
MaxReceiveSize : 36 MB (37,748,736 bytes)
IsDefault : True

Get-Mailbox username | fl mailboxplan,maxsendsize,maxreceivesize
username ExchangeOnline-xxxxxxxx-xx... 35 MB (36,700,160 bytes) 36 MB (37,748,736 bytes)

Set-Mailbox username -MaxSendSize 50MB -MaxReceiveSize 51MB

Set-MailboxPlan ExchangeOnline-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -MaxSendSize 50MB -MaxReceiveSize 51MB
Set-MailboxPlan ExchangeOnlineDeskless-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -MaxSendSize 50MB -MaxReceiveSize 51MB
Set-MailboxPlan ExchangeOnlineEnterprise-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -MaxSendSize 50MB -MaxReceiveSize 51MB

Create Testing attachment file:
fsutil file createnew C:\45GBTest 47185920

Powershell to Office 365

$URL = ""
$Credentials = Get-Credential -Message "Enter your Office 365 admin credentials"
$EXOSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $URL -Credential $Credentials -Authentication Basic -AllowRedirection -Name "Exchange Online"
Import-PSSession $EXOSession

If got the error, "cannot be loaded because the execution of scripts is disabled on this system"
Set-ExecutionPolicy RemoteSigned

Outlook Address book not update

◾Windows XP
C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook\Offline Address Books\
◾Windows Vista, Windows 7, Windows 8
C:\Users\%username%\AppData\Local\Microsoft\Outlook\Offline Address Books\

rename all oab

Windows 2008 R2 + Exchange 2010

ServerManagerCmd -ip D:\Scripts\Exchange-Typical.xml -Restart
Set-Service NetTcpPortSharing -StartupType Automatic

get-user -filter "department" -eq 'sales'"
get-user -filter "department" -like 'sales*'"
get-mailbox administrator | fl name,emailaddresses

Set on behalf of and send as permission:
set-mailbox boss -grantsendonbehalfto assistant
add-adpermission boss -extendedrights send-as -user assistant
restart-server msexchangeis

Show the user forwarding status:
get-mailbox Username | fl name,forwardingaddress,delivertomailboxandforward,recipientlimits

Show each user send receive limit:
get-mailbox | ft name,maxsendsize,maxreceivesize

Global message size limit:
get-transportconfig | fl max*size,maxrecipientenvelopelimit

Add retention deleted items:
new-retentionpolicytag "tag-deleteditems" -type "deleteditems" -comment "deleted items are purged in 60 days" -retentionenabled $true -agelimitforretention 60 -retentionaction permanentlydelete

Add retention default policy:
new-retentionpolicytag "tag-default" -type all -comment "items without a retention tag are deleted in 1 year." -retentionenabled $true -agelimitforretention 365 -retentionaction movetodeleteditems -isprimary $true

Add retention business policy:
new-retentionpolicytag "tag-businesscritical" -type personal -comment "business critical messages are moved to the archive in 3 years." -retentionenabled $true -agelimitforretention 1095 -retentionaction movetoarchive

Add retention group:
new-retentionpolicy "RP1" -retentionpolicytaglinks "tag-deleteditems","tag-businesscritical","tag-default"

Apply to user:
set-mailbox username -retentionpolicy RP1 -confirm:$false

restart-server msexchangeis

Remove retention:
set-mailbox username -retentionpolicy $null
remove-retentionpolicy RP1
get-retentionpolicytag | remove-retentionpolicytag

Grant fullright access from user1 to user2:
add-mailboxpermission user1 -accessrights fullaccess -user user2

Display all edb path
get-mailboxdatabase | fl name,edbfilepath

Show state(Clean or Drily):
eseutil /mh

Repair with transaction log:
eseutil /r E05

eseutil /p

eseutil /g

eseutil /k

eseutil /ms

eseutil /d

Windows 7 connect to 365 via Powershell

Windows Management Framework 3.0

Microsoft Online Services Sign-In Assistant for IT Professionals RTW

Active Directory Module for Windows PowerShell (64-bit version)