Sunday, February 19, 2012

Microsoft Exchange 2010 EMS Cmdlets...

Exchange Server 2010 Mangament Shell Commands:----
1.      Create a Mail Enabled user:
New-Mailbox -UserPrincipalName chris@contoso.com -Alias Chris -Database “Mailbox Database 1“ -Name ChrisAshton -OrganizationalUnit Users -Password $password -FirstName Chris -LastName Ashton -DisplayName “Chris Ashton“ -ResetPasswordOnNextLogon $true
2.      Make all the users mail enable from sales OU:
Get-User | Where-Object {$_.distinguishedname -ilike "*ou=india,dc=kalagarh,dc=com"} | Enable-Mailbox -database "Mailbox Database 1"

3.      Set Mailbox size limit on Remote Users Group:
Get-DistributionGroup "marketings" | Get-DistributionGroupMember | Set-Mailbox -MaxReceiveSize 20MB

4.      Move all the mailbox VAN-EX1 server to mailbox store 2:
Get-Mailbox -server exch1 | New-MoveRequest -Local -targetDatabase " "Mailbox Store 2"

5.      To configure the database limits with Exchange Management Shell:

 Get-MailboxDatabase -Server Exch1 | Set-MailboxDatabase -IssueWarningQuota 100MB.
6.      To configure just the user mailboxes that are contained in the Marketing organizational unit:
 Get-Mailbox -OrganizationalUnit nonIT | Set-Mailbox -ProhibitSendQuota 55MB.
7.      Use the Exchange Management Shell to add permissions to a public folder
 Get-PublicFolderClientPermission \PF1
 Add-PublicFolderClientPermission \PF1 -AccessRights EditAllItems -User arun.
8.      Enable External Email Address:
 Enable-MailUser “Nikhil Chaudhary“ –externalemailaddress nikhil@contoso.com
Disable-MailUser “Nikhil Chaudhary“. Type Y.

9.      Configuring the custom mail Tips:
Get-OrganizationConfig     review the default configuration for MailTips.
10.  Set-OrganizationConfig –MailTipsLargeAudienceThreshold 20
modify the large distribution group threshold setting.
11.  Set-DistributionGroup IT –MailTip ’The IT Team is working now on our own cloud technology.‛
12.   .xls extension to be saved to disk before they can be opened in OWA:

set-owavirtualdirectory ’owa (Default Web Site)’ –ForceSaveFileTypes .xls

13.  disables Gzip compression for Outlook Web App:
set-owavirtualdirectory ’owa (Default Web Site)’ –GzipLevel Off

14.  Enable Web bacon filter:
Set-OwaVirtualDirectory -identity “Owa (Default Web Site)“ -FilterWebBeaconsAndHtmlForms ForceFilter

15.   To get the HT server Information:
Get-TransportServer -I HT1 |fl

16.  Test Edge Synchronization:
Start-EdgeSynchronization
Test-EdgeSynchronization

17.  Configure address rewriting:
New-addressRewriteEntry -Name “india.com” -InternalAddress kalagarh.com -ExternalAddress india.com

18.  Configure content filtering:
set-contentfilterconfig –quarantinemailbox Anuj@adatum.com

19.  Configure Domain Security:
Set-TransportConfig -TLSSendDomainSecureList kalagarh.com
Set-TransportConfig -TLSReceiveDomainSecureList kalagarh.com
Get-TransportConfig |FL
Start-EdgeSynchronization

20.  Configuring DAG:
New-DatabaseAvailabilityGroup –Name NewDag –WitnessServer DC1 -WitnessDirectory C:\NewDAG –DatabaseAvailabilityGroupIpAddress 192.168.1.100
Add-DatabaseAvailabilityGroupServer NewDag –MailboxServer MBX1

21.  Recovering Deleted Items:
Set-Mailbox ScottMacDonald -SingleItemRecoveryEnabled:$true
Export-Mailbox -Identity “Discovery Search Mailbox” -TargetMailbox “Rani Chaudhary” -IncludeFolders “fullMAPIpath” -Targetfolder “Personal Items (restored)”

22. How to Create a Point-in-Time Database Snapshot

Firstly create a DAG:
New-DatabaseAvailabilityGroup –Name NewDag –WitnessServer DC1 -WitnessDirectory C:\NewDag –DatabaseAvailabilityGroupIPaddresses 192.168.1.100,
Set Replay lag time:
Set-MailboxDatabaseCopy –id Accounting\MBX2 –replaylagtime 7.0:0:0,
Block the Activation Policy on MBX2
Set-MailboxServer MBX2 –DatabaseCopyAutoActivationPolicy Blocked
23.   Creating Recovery Database:
New-MailboxDatabase -Name “RecoverDatabase” -Server MBX1 -EDBFilePath “c:\DBBackup\C_\Program Files\Microsoft\Exchange Server\V14\Mailbox\Accounting\DB1.edb” -Logfolderpath “c:\DBBackup\C_\Program Files\Microsoft\Exchange Server\V14\Mailbox\DB1” –Recovery

cd “c:\Program Files\Microsoft\Exchange Server\v14\bin”
eseutil /p “c:\dbbackup\c_\Program Files\Microsoft\Exchange Server\v14\Mailbox\DB1\DB1.edb“.  click OK.
Mount-Database “RecoverDatabase
Get-MailboxStatistics -Database “RecoverDatabase
Restore-Mailbox -Identity MichiyoSato -RecoveryDatabase RecoverDatabase
24.   Create the Transport Rules:
New-TransportRule -Name "Indian Govt policy Block Rule" -SubjectOrBodyMatchesPatterns "\d\d\d-\d\d\d-\d\d\d" -RejectMessageEnhancedStatusCode "5.7.1" -RejectMessageReasonText "This message has been rejected because of content restrictions & Indian Govt. Policy"

25.  Configuring the AD-RMS Settings:
get-irmconfiguration
set-irmconfiguration –InternalLicensingEnabled:$true
test-irmconfiguration –sender arun@adatum.com

26.  Retention Tag & Policy:
 New-RetentionPolicyTag DefaultTag -Type:All -MessageClass AllMailboxContent -RetentionEnabled $true -AgeLimitForRetention 365 -RetentionAction PermanentlyDelete –isprimary:$true
New-RetentionPolicyTag InboxTag -Type:Inbox -MessageClass:* -AgeLimitForRetention:30 -RetentionEnable:$True -RetentionAction:MovetoDeletedItems
New-RetentionPolicyTag “Business Critical“ -Type:Personal -MessageClass:* -AgeLimitForRetention:1100 -RetentionEnable:$True -RetentionAction:MoveToArchive
New-RetentionPolicy AllTagsPolicy -RetentionPolicyTagLinks:DefaultTag,InboxTag,“Business Critical“
Set-Mailbox Andreas -RetentionPolicy AllTagsPolicy
Start-ManagedFolderAssistant -Mailbox Nikhil
27.  Creating Custom Role groups in RBAC:
New-ManagementScope –Name MarketingMailboxes –recipientroot “kalagarh.com/NonIT“ -RecipientRestrictionFilter {RecipientType -eq “UserMailbox“}
New-RoleGroup –Name MarketingAdmins –roles “Mail Recipients”, “Mail Recipient Creation “ -CustomRecipientWriteScope MarketingMailboxes
Add-rolegroupmember –id MarketingAdmins –member Nikhil



6 comments:

Anonymous said...

I enjoy reading an article that can make men and women think.

Also, many thanks for allowing me to comment!
My site - exchange data Recovery tools

Anonymous said...

I'm not sure where you're getting your information, but good topic. I needs to spend some time learning much more or understanding more. Thanks for fantastic info I was looking for this information for my mission.
Also see my site: .edb file Recovery tool

Anonymous said...

Thank you for the auspicious writeup. It in fact was a amusement
account it. Look advanced to far added agreeable from you!
However, how can we communicate?
My site :: exchange 2007 edb Recovery

Arun Chaudhary said...

Thanks my Friend, But please share your name also

Anonymous said...

Excellent beat ! I wish to apprentice while you amend your web site, how could i subscribe for
a blog web site? The account helped me a acceptable deal.
I have been tiny bit acquainted of this your broadcast provided brilliant clear idea
Also see my site :: Recovery PST files and contacts in Microsoft Outlook

Arun Chaudhary said...

Hello My Friend you can join my blog using the option join this site & for more you can email me on arunkalagarh@gmail.com my email id
& Thnks for your valuable time that you visit my blog