Monday, August 24, 2015

Allow Quarantine Mobile Device


Please refer the below steps to  allow the quarantine state device activesync device  to allow state,

Before proceed the steps, note-down the mobile device ID  
 
Below command will display about the user device information, refer the device ID state is allowed or quarantine

Get-ActiveSyncDevice -Mailbox Aliasname | select user*,device* | fl
 
Below command will display only the allowed device IDs ,

Get-CASMailbox Aliasname | select ActiveSyncAllowedDeviceIDs 

Below command used to allow the device ID,

Set-CASMailbox Aliasname -ActiveSyncAllowedDeviceIDs "704294541"
 
Below command used to allow the more than one device,

Set-CASMailbox Aliasname -ActiveSyncAllowedDeviceIDs @{add="1560598775"}
 
Solution:2

We can try this solution in GUI mode also , refer the below steps
  1. Login to https://webmail.domain.com/ecp
  2. Click the  Phone & Voice , select the Activesync Access 
  3.  Select the user name and click allow ( Make sure to sync the device below perform this steps)



 

Delete mail in all mailbox

Recently I have faced the email virus issue. It's started from one PC and spread over all mailboxes. 

Now the solution is need to delete that particular mail from all mailboxes, so I have started the below steps,

Below command will delete with particular subject and export to notepad,

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery "(subject:test)" -DeleteContent -Force > C:\deleteoutput.txt

Below command will delete with particular attachment and export to notepad,

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery "(Attachment:test)" -DeleteContent -Force > C:\deleteoutput.txt

Below command will delete with particular attachment & subject and export to notepad,

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery "((subject:test) AND Attachment:test)" -DeleteContent -Force > C:\deleteoutput.txt

 Below command will display only the count item in particular user with particular subject


Search-Mailbox -Identity Aliasname -SearchQuery "(Subject:test)" –EstimateResultOnly

 Below command will display only the count item in particular user with particular attachment 

Search-Mailbox -Identity Aliasname -SearchQuery "(Attachment:test)" –EstimateResultOnly