Friday, February 6, 2009

EmailAddresspolicy When migrating users from Exchagne 200x to Exchagne 2007

If you are migration from Exchagne 200x to Exchagne 2007 if you have Email policy with mulitple domains listed in the Exchange address tab and if you Primary smtp is not same as the DefaultEmail policy then once the mailbox is moved then you primary smtp address will get changed to email address which is set throught Defaultemail policy. The simple solution is you need to make sure that -EmailAddresspolicy should be disabled before you move the mailbox. This solves the problem.


$UserList = Get-Content "PathofTextfilecontactingusernames"
foreach($user in $UserList)
{
set-Mailbox $user -EmailAddressPolicyEnabled $false

}

Thursday, February 5, 2009

Creating Shared Calendar from Outlook in Public Folder

First Need to device where you want to create a public folder and you sufficient access on the folder inside which you wanted to create a Shared Calendar

1. Log into your mailbox using Outlook,Expand until you get required folder
2. Right-click on it and select New Folder in the pop-up menu.
3. Type in a name for the Shared Calendar, select Calendar Items in the Folder contains drop-down list and hit OK.

Right-click the Shared Calendar folder, select Properties.
Go to Permissions tab.
Hit Add and choose users and/or groups you wish to grant access permissions to.
Select required permissions level in the appropriate drop-down list and hit OK.

Wednesday, February 4, 2009

Powershell to Move Multiple Mailboxes in Multithread

This is a Beautiful piece of code which helps in moving the Multiple mailboxes in Multithread.

Sourcefilepath contact the text file with the list of alias names or email address of the users to move.
TargetDatabase should have the path of the destination store where mailstore to be moved.
Maxthreads 8 will move 8 users at a time, you can increase this count based on the performace of your machine.
-BadItemsLimit is if mailbox which is moved has some corrupted item then move-mailbox wil skip the corruption upto 30 items. If this corsses then specific mailbox will not be moved, but it will continue to move rest of the mailbox.


$TargetDatabase = "Path to the destination Store"
$k = Get-Content "SourceFilepath"
$k| Get-Mailbox | Move-Mailbox -BadItemLimit '30' -TargetDatabase $TargetDatabase -maxthreads 8 -Confirm: $false

Disable users from Creating and using pst

If you want users to not to user pst in their machines then please follow the steps

1. open Regedit from the computers and browse throught path
2. HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Outlook\
3. Create a REG_DWORD with name DisablePst set Value: 1

Recovering Deleted email from the Outlook (Shift Deleted Mails)

Most of them have the wrong information that they can recover delete mails only from the “Deleted Mail” folder or they can recover from backup.

But you can always recover both Deleted (Soft Delete) and Shift Deleted (Hard Delete) with out recovering from backup. Recovering Delete mails depends on the Mailbox store policy set on the mailbox. If policy is set as 7 Days then you can recover mail until it is 7 Days old.

Steps
1. Open Regedit and go to below mentioned path
2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Client\Options
3. Create a DWord with name DumpsterAlwaysOn and set the value as 1
4. Select the folder in which mails got deleted then Click on Tool -> Recover delete items.
5. Select the mail which wanted to restore and click recover the same
6. Recoverd mail will be back in the orignial location.

Monday, February 2, 2009

Alerting If any Mails Struck in IMSS Trend Server Mqueue Folder

' This scripts can be scheduled every one hours in schedule task to check if any mails struck in the mqueue folder on IMSS Servers. If it find any mail then it wil alert to the email mentioned in the script. It can also has
Dim colFiles
Dim DtmOldestDate
Dim DtmNewstDate
Dim strOldestFile
Dim strNewstFile
Dim OldH
Dim NewH
Dim FileStatus
FileStatus = ""
Set objFSo = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Trend\IMSS\ISNTSmtp\mqueue")
Set colFiles = objFolder.Files
dtmOldestDate = Now
For Each objFile in colFiles
If objFile.DateLastModified < dtmoldestdate =" objFile.DateLastModified" stroldestfile =" objFile.Path" oldh =" DateDiff(" dtmnewstdate =" dtmOldestDate"> DtmNewstDate Then
DtmNewstDate = objFile.DateLastModified
strNewstFile = objFile.Path
NewH = DateDiff("h", objFile.DateLastModified, Now)
End If
Next

If NewH > 1 Then
wscript.echo "Latest file " & strNewstFile & " its " & NewH & " Hours old"
FileStatus = "Latest file " & strNewstFile & ", its " & NewH & " Hours old"
End If

If oldH > 1 Then
FileStatus = FileStatus & "
" & "Oldest file " & strOldestfile & ", its " & OldH & " Hours old"
Wscript.echo "Oldest file " & strOldestfile & " its " & OldH & " Hours old"
End If
Call Sendmail(FileStatus)
sub Sendmail(FileStatus)
If FileStatus <> "" Then
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "Abc@toemailaddress"
objEmail.To = "Xyz@toemailaddress"
objEmail.Subject = "Mails struck in Mqueue folder on IMSS Name"

strBody = " Body of the message "

objEmail.HTMLbody = strBodyobjEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _ "SMTP Server" objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25objEmail.Configuration.Fields.UpdateobjEmail.SendEnd If
End Sub

VB Script to Find the Uptime of the server on the given machines list in text file

on error resume next
Set filesys = CreateObject("Scripting.FileSystemObject")
set filetxt1 = filesys.OpenTextFile("C:\scripts\Serveruptime\Serverlist.txt",1)

do Until filetxt1.AtEndOfStream
strComputer = filetxt1.Readline
strComputer = trim(strComputer)
set objWMIDateTime = CreateObject("WbemScripting.SWbemDateTime")
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colOS = objWMI.InstancesOf("Win32_OperatingSystem")

for each objOS in colOS
if err.number = 0 Then
objWMIDateTime.Value = objOS.LastBootUpTime
Wscript.Echo strComputer & " | " & objWMIDateTime.GetVarDate
Else
Wscript.Echo strComputer & " | "
End If
next
Err.clear
Loop

How to check if your Email domain IP is not blacklisted

1. There are various site available in the internet and one of the Good site is http://www.mxtoolbox.com/blacklists.aspx
2. you need to find the list of ip address in the internet which you are registerd in the Internet.
3. http://www.mxtoolbox.com/index.aspx This link helps you to get the list of ipaddress registered for the domain
4. Enter each ip address http://www.mxtoolbox.com/blacklists.aspx and click on Blacklist will get the details on all the site if it is blacklisted Else it wil mentioned all the sites as OK
5. If any domain is blacklisted then mail send by that domain wil not reach other domain because Spam filters or appliance available on the DMZ of the destination domain will always refering blacklist site.
6. If it find any mails comming from the domain which is backlisted , this will direclty drop the mail instead of forwarding into the domain.
7. To avoid this make sure that you SMTP is not set to open relay

Steps to configure Entourage 2008 (MAC) for Exchange 2007

1. Open Entourage
2. click on Tools -> Accounts and selected select Exchange
3. Click on the Configure Account manually
4. Then You get a options Account settings enter username, Name, Email address(complete email address of the user)
5. Then followed by server information like user login id, Domain , password
6. Enter Exchagne server as https://ClinetAccessServername/exchange/useremailaddress or https://OWAaddress/Exchange/emailaddress
7. Click on Advance Tab to configure public folder enter https://ClinetAccessServername/public or https://OWAaddress/public
8. go to Terminal on MAC computer type cat /etc/resolv.conf
9. This will give NameServer IP Address, this needs to Enter at LDAP Server
10. Need to make sure To check This server require me to log on and Override default port is unchecked with port 3268

Moving BESAdmin(Blackberry Admin) account from Exchange 2003 to Exchange 2007

1. Login to BB server
2. Stop all Blackberry Enterprise Server services
3. Move the account to the new server
4. Remove Microsoft Exchange System Manager 2000 or 2003. (A Microsoft Exchange Server installation CD is required to complete this step.)
5. Perform a search for MAPI32.dll and cdo.dll in BB Server
6. Rename any cdo.dll and MAPI32.dll files from the system32 folder and the program files\exchsrvr\bin folder to a .bak file extension.
7. Download ExchangeMapiCdo.EXE and install in BB Server, see KB12697
8. Edit MAPI Profile and type the new mailbox server
9. Restart the BB Server

Before the start of the move make sure that Besadmin has sufficient rights on Exchagne 2007 else run this

Get-mailboxserver | add-adpermission –user BESAdmin -accessrights GenericRead, GenericWrite -extendedrights Send-As, Receive-As, ms-Exch-Store-Admin

PFDAVAdmin tool to Recover Deleted public folder

Download PFDAVAdmin from Microsoft site
1. Extract it to a folder
2. Doublick click on PFDAVAdmin.exe
3. Input the Exchange Server name and the Global Catalog server.
4. Authenticate with account which has Exchange administrator access
5. Right click on the folder and Select "show Delete folder'
6. This will be show the deleted Pf in Red colour.
7. Then again right click on the folder and click Recover
8. This will recover with the same name as foldername RECOVERED
9. Rename the foldername and check if its mail enabled.
10.If required then right click on the folder -> All Tasks -> mail enable.