SMTP Port 25

Anything and Everything Related to Messaging and Collaboration, Active Directory and Scripting. It’s My Life!!!

Archive for April, 2009

Preventing Internal mails from application reaching Junk E-mail folder

Posted by Krishna - MVP on April 29, 2009

Some times there can be chances that internal mail from the application reaches Junk Email folder and some reaches Inbox. Some time it annoys you because some reaches inbox and other to Junk Email folder.

Every mail will be checked for the SPAM CONFIDENTIAL LEVEL (SCL). If SCL is more than 5 then mail will directly reach Junk email folder.

We can modify the SCL of the mails with the help of transport rules

1. Create the Email account(address) with the required email address for the application
2. Open Exchange Management console
3. Expand Organization Configuration
4. Select Hub Transport
5. On the right side Click on New-Transport rule
6. Input the Name -> click Next
7. Check “From People” -> Bottom click on people and browse the from address
8. Click Next -> Check “Set the spam confidence level to value” and set the value to “-1”

TransportRule
9.      Click next to and new to create the new one

Posted in Exchange 2007 | Tagged: , , , , , | Leave a Comment »

Removing Dead or Dirty Exchange 2003 Server from AD and ESM

Posted by Krishna - MVP on April 29, 2009

Removing dead Exchagne 2003 servers from the Exchange System Manager and Active Directory please follow below mentioned steps

1. Open Exchange system Manager
2. Expand Adminstrative group until you reach the required server
3. Right click on the server -> All Tasks -> Remove Server
4. Confirm the same by clicking yes.

If this did not help then you may need to Dig into Active directory through Adsiedit and remove the server Manually

Go to Start, Run and write ADSIEdit.msc and hit OK button.

Configuration Container
CN=Configuration, DC=Domainname,DC=com
CN=Services
CN=Microsoft Exchange
CN=Your_Organization_Name
CN=Administrative Groups
CN=AdminstrativeGroup_Name
CN=Servers
Right click on the Required server click Delete  and confirm the same.

Posted in Exchange 2007 | Tagged: , , , , , | Leave a Comment »

VBscript to get the folder size

Posted by Krishna - MVP on April 24, 2009

 VBscript to get the size of folder size, You can put it in the loop to get the list of folder size.

dim oFS, oFolder
set oFS = WScript.CreateObject(“Scripting.FileSystemObject”)
 set oFolder = oFS.GetFolder( “FolderPath”)
 wscript.echo oFolder.Name & ” : ” & round(oFolder.Size/1024/1024,2)

Posted in VB Scripts | Tagged: , | Leave a Comment »

Powershell to get the list of Disconnected mailbox in the Exchange Server

Posted by Krishna - MVP on April 23, 2009

If we delete a user account then it will automatically disconnects mailbox from the account and adds to Disconnected Mailbox list. Mailbox  will be listed until retention period of 30 days

Get-MailboxStatistics -server <servername> | where { $_.DisconnectDate -ne $null } | select DisplayName,MailboxGuid,Database,DisconnectDate

Gets the list of Disconnected mailbox in the specified Exchange 2007 Server

 

Get-MailboxStatistics  | where { $_.DisconnectDate -ne $null } | select DisplayName,MailboxGuid,Database,DisconnectDate

Gets the list of Disconnected mailbox on the Exchange 2007  maibox server where you are running this command

Posted in Exchange 2007, Powershell | Tagged: , , , | 1 Comment »

Recovering Deleted User Ad account throught Active Directory powershell

Posted by Krishna - MVP on April 22, 2009

We can recover any Active Directory deleted object with in the Tombstone period.
Tombstone lifetime can be found in active directory using below steps

• Load the ADSIEdit snap-in by navigating to start menu, programs, Windows 2000 Support Tools, Tools, ADSI Edit, or simply type adsiedit.msc at the run command.
• Navigate down to CN=Directory Service, through Configuration, CN=Configuration,DC=domainName,DC=com, CN=Services, CN=Windows NT, right-click and choose properties. 
• scroll down to tombstoneLifetime. This will have Tombstone period

Get-QADUser -Tombstone

Will get the list of user accounts which are Deleted and residing in Tombstone

  

Get-QADUser -Tombstone <name> |restore-QADDeletedObject

Will restore the user object in to the OU LOSTANDFOUND

  

Get-QADUser -Tombstone -LastKnownParent ‘<DN of container>’
Restores all user accounts that were deleted from a particular container to OU LOSTANDFOUND.

 

 Get-QADUser –Tombstone –LastChangedOn (get-date -year 2008 -month 9 -day 1)

Restores all user accounts that were deleted on September 1, 2008

 

Get-QADUser –Tombstone  <username> | fl

Gives the complete details of the -Tombstone account which can help in finding detained information of the Tombstoned account

Posted in Active Directory, Powershell | Tagged: , , , | 1 Comment »

Deleted Mailbox not appearing in Disconnected mailbox in Exchange 2007

Posted by Krishna - MVP on April 22, 2009

Deleted mailboxes will appear in disconnected mailbox list, but it will not reflect immediately. We have to wait for online maintenance to run and complete.

If we accidentally delete mailbox and if we wanted to reconnect it back then we may not be able to find it Disconnected Mailbox. We have run Clean-MailboxDatabase to get the deleted mailbox.

Eg.

Clean-MailboxDatabase \servername\SGName\Store
Cleaning Database of Individual Store

Get-Mailboxdatabase | Clean-MailboxDatabase
Cleans all the database in the Organization

Get-Mailboxdatabase | Where{ $_.Server –eq “<servername>”}| clean-MailboxDatabase
Cleans all the database in the specific store

Get-Mailboxdaatabase | Where{ $_.Name –eq “<DatabaseName>”}| clean-MailboxDatabase
Cleans all the Database which matches the specific name given in Databasename

Posted in Exchange 2007, Powershell | Tagged: , , | 1 Comment »

Changing password of Exchange 2003 users throught Exchange 2007 OWA

Posted by Krishna - MVP on April 16, 2009

Changing password of user can be done throught OWA.  If you are running Exchange 2007 environment on Windows 2007 with IIS 7.0 and also has Exchagne 2003 users then changing password throught Exchagne 2007 OWA would not be possbile you will get “404 page not found” Error message.

 As The Change Password feature in Exchange Server 2007 Outlook Web Access does not require the IISADMPWD functionality.  IISADMPWD functionality is used to change password in Exchange 2003 servers. 

Work around solution

1. When user is in inside office network then he/she can access OWA throught http://exchnage2003servername/exchagne/username

2.  a. Create the appropriate IISADMPWD folder and virtual directory on each Client Access server
b. Change the registory in Exchange 2003 backend serves – Click Start -> Run -> type regedit -> ok
c. Expand to the this path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSExchangeWeb\OWA
d. Right click and create new DWORD with the name Disablepassword and set value to 0
e. On each Client access server, open IIS Manager, and then select Web Service Extensions.
f. In the result pane, select Active Server Pages, and then click Allow.

 

Reference Page : http://technet.microsoft.com/en-us/library/bb684904.aspx

Posted in Exchange 2007 | Tagged: , , , | Leave a Comment »

VBscript to copy file to the remote computers

Posted by Krishna - MVP on April 16, 2009

Below is the VB script to copy a file from local computer to list of remote computers

On Error Resume Next
Const ForReading = 1
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objTextFile = objFSO.OpenTextFile(“C:\server.txt”, ForReading)

Do Until objTextFile.AtEndOfStream
 strComputer = objTextFile.Readline
        objFSO.CopyFile “C:\regsetting.bat” , “\\” & strcomputer & “\C$\”
        wscript.echo strcomputer & ” Copied”
Loop

Posted in VB Scripts | Tagged: , , | Leave a Comment »

Powershell to find the size of Spam Mails folders in the Exchange mailbox

Posted by Krishna - MVP on April 16, 2009

Below script can be used to find the size of spam  Mails folder in the User mailbox for the given list of users. Export list of users from the server throught below command and input into the Name.txt and Execute 

Get-mailbox | Where{$_.Servername -eq “Servername”} | select-object Alias > c:\Names.txt

 
$UserList = Get-Content “C:\Names.txt”
foreach($user in $UserList)
{
     $Spamsize = get-mailboxfolderstatistics $user | Where {$_.Name -match “Spam”}  | select  FolderAndSubfolderSize
     $output = $user + ” ” + $spamsize.FolderAndSubfolderSize/1mb
     Write-output $output 
}

Posted in Exchange 2007, Powershell | Tagged: , , , , | 1 Comment »

Activeroles Quest Management Powershell to check User account Active or Disabled

Posted by Krishna - MVP on April 15, 2009

You can download Active roles Quest Management shell from the below mentioned link.

http://www.quest.com/powershell/activeroles-server.aspx

Commands to check if mailbox is active or disabled

Get-QADUser <username> -enabled              

Will get the result if acount in active

Get-QADUser <username> -disabled                

Will get result if account is disabled

Get-QADUser  -Enabled       

Will get  all the enabled in the Active Directory

Get-QADUser  -Disabled      

Will get all the disabled users in the Active Directory

get-content “C:\users.txt” | Get-QADUser -enabled | select Email 

Will get list of all active users email address from the given input users

Posted in Exchange 2007, Powershell | Tagged: , , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 50 other followers