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

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

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

Powershell to Set Exchange 2007 Mailbox Quota limit to UNLIMITED

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”

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

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