SMTP Port 25

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

Archive for February, 2009

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

Posted by Krishna - MVP on February 28, 2009

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

Posted in VB Scripts | Tagged: , | 2 Comments »

Unable to Download Mails in Entourage which has “+” in the subject

Posted by Krishna - MVP on February 28, 2009

Unable to Download Mails in Entourage which has “+” in the subject line. Eg. Test + Mail

This happens on both Entourage 2004 and 2008 when you are running Exchange 2007  Sp1 on Windows 2008 Machine which has IIS 7.

To fix this, log into Exchange 2007 Mailbox servers and Client Access server and Mailbox Server and enter the below line in the command prompt. No need for restarting of machine is required.

%windir%\system32\inetsrv\appcmd set config “http://localhost/Exchange” -section:system.webServer/security/requestfiltering -allowDoubleEscaping:true /commit:apphost

You will see the following response after running the above command in the same window.

Applied configuration changes to section “system.webServer/security/requestFiltering” for “MACHINE/WEBROOT/APPHOST/Default Web Site/Exchange” at configuration commit path “MACHINE/WEBROOT/APPHOST”

SOURCE :

http://blogs.technet.com/amir/archive/2008/08/06/e-mail-download-issue-in-entourage-with-exchange-2007-on-windows-2008.aspx

Posted in Entourage - Mac, Exchange 2007, Windows 2008 | Tagged: , , , , , , | Leave a Comment »

Nslookup to Verify MX Record Configuration for any domain

Posted by Krishna - MVP on February 26, 2009

Open command prompt then type

Nslookup

set q=Mx and enter the domain name which you wante to find the MX records or your can use web based www.mxtoolbox.com to find the MX Records.

MX Preferences will give the priority option to which mail has to be deliverd

nslookup

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

Powershell to Set Exchange 2007 Mailbox Quota limit to UNLIMITED

Posted by Krishna - MVP on February 20, 2009

Some times there may be a necessary that you may have to set mailbox quota prohibitsendandreceive to unlimited. Some users may be very important person and you need to set UNLIMITED to atleast receive emails.

$username = <username>

Set-Mailbox $username -UseDatabaseQuotaDefaults:$False -issuewarningQuota 90MB -ProhibitSendQuota 100MB -ProhibitSendReceive “UNLIMITED”

This is to set explicity for a user, if you want to send similar setting to multiple people then you have have to loop it and apply the same or

get-content “C:\names.txt” | Set-Mailbox  -UseDatabaseQuotaDefaults:$False -issuewarningQuota 90MB -ProhibitSendQuota 100MB -ProhibitSendReceive “UNLIMITED”

get-content “C:\names.txt” | Set-Mailbox  -UseDatabaseQuotaDefaults:$False -issuewarningQuota “UNLIMITED” -ProhibitSendQuota “UNLIMITED” -ProhibitSendReceive “UNLIMITED”

Posted in Exchange 2007 | Leave a Comment »

VBSCript to Send mail using CDO with Delivery and Read Recipient enabled

Posted by Krishna - MVP on February 19, 2009

Below is the Procedure to send mail using CDO with Delivery and Read Recipient Enabled
Sub TestmailusingCDO_SMTP()
set objMsg = CreateObject(“CDO.Message”)
set objConf = CreateObject(“CDO.Configuration”)
Set objFlds = objConf.Fields
 
 With objFlds
  .Item(“http://schemas.microsoft.com/cdo/configuration/sendusing“) = 2
  .Item(“http://schemas.microsoft.com/cdo/configuration/smtpserver“) = “SMTPServername”
  .Update ‘ Save
 End With

strBody = “This is a Test email.” & vbCRLF & vbCRLF & “—————————”

 With objMsg
  Set .Configuration = objConf
  .To = “<valid email addres>”
  .From = “<valid email addres>”
  .Subject = “Testing Email ” & Date()
  .TextBody = strBody ‘ Use .HTMLBody to send a HTML e-mail
  .Fields(“urn:schemas:mailheader:disposition-notification-to”) = “<valid email addres>”
  .Fields(“urn:schemas:mailheader:return-receipt-to”) = “<valid email addres>”
  .DSNOptions = cdoDSNSuccessFailOrDelay
  .Fields.update ‘ Save
  .Send
 End With

 

End Sub

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

Antivirus Software Scan Exclusions on Exchange 2007

Posted by Krishna - MVP on February 19, 2009

http://technet.microsoft.com/en-us/library/bb332342.aspx

Posted in Exchange 2007 | Leave a Comment »

Powershell to Export list of user properties from specific Exchange server and specific Store

Posted by Krishna - MVP on February 19, 2009

$Exservername = <Servername>
$EXStore = <storename>
Get-MailboxServer | Where {$_.Name -eq $Exservername} |Get-MailboxDatabase | Where {$_.Name -eq $EXStore} | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,{$_.TotalItemSize.Value.ToMB()},ItemCount

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

PowerShell to Export list of user properties from specific Exchange Server

Posted by Krishna - MVP on February 19, 2009

Powershell command to export list of user details like name, mailbox size and item count on the specific Exchange server

$Exservername = <Servername>
Get-Exchangeserver | Where {$_.Name -eq $Exservername} | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,{$_.TotalItemSize.Value.ToMB()},ItemCount

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

Powershell Command to Export User mailbox Propertes

Posted by Krishna - MVP on February 19, 2009

Below Powershell command can be used to export the list of mailboxes properties like DisplayName, totalItems,ItemCount for the list of users given in a text file to a export to a csv file

Get-Content “C:\name.txt” | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,TotalItemSize,ItemCount| Export-Csv c:\MailboxStatistics.csv
Get-Content “C:\name.txt” | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,{$_.TotalItemSize.Value.ToMB()},ItemCount| Export-Csv c:\MailboxStatistics.csv
Get-Content “C:\name.txt” | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,{$_.TotalItemSize/1.0MB},ItemCount| Export-Csv c:\MailboxStatistics.csv
Get-Content “C:\name.txt” | Get-Mailbox | Get-MailboxStatistics | Select DisplayName,{$_.TotalItemSize.Value.ToGB()},ItemCount| Export-Csv c:\MailboxStatistics.csv

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

Converting Exchange 2007 Mailbox

Posted by Krishna - MVP on February 19, 2009

You can convert mailbox from one type to other type in two ways

1. Throught Powershell command

     Set-Mailbox <mailboxname> – Type <type>

     Type can be Regular, Room, Equipment, Shared

2.  Second option is throught Editing Value of msExchRecipientTypeDetails  from ADSIEDIT.

      Access user properties throught ADSIEDIT and find the attribute msExchRecipientTypeDetails change values. Values for Different mailboxes is given below

     User Mailbox : 1
     Linked Mailbox : 2
     Shared Mailbox :4
     Legacy Mailbox :8
     Room Mailbox   : 16
     Equipment Mailbox :13

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

 
Follow

Get every new post delivered to your Inbox.

Join 49 other followers