Archive for February, 2009
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: uptime of servers, VBscript | 2 Comments »
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: "+" in subject line, + in subject, Entourage, Exchange 2007 sp1, Mac, Mail, Windows 2008 | Leave a Comment »
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

Posted in Exchange 2003 | Tagged: domain, MX Record, Nslookup | Leave a Comment »
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 »
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: Delivery Recipient, Read Recipient, Send mail, VBscript | Leave a Comment »
Posted by Krishna - MVP on February 19, 2009
Posted in Exchange 2007 | Leave a Comment »
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: Properties for specific Exchange store | Leave a Comment »
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: Export properties from specific exchange server, Powershell | Leave a Comment »
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: Exchange 2007 Mailbox Properties export, Powershell | Leave a Comment »
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: Exchange 2007 Mailbox convert, msExchRecipientTypeDetails | Leave a Comment »