Monday, June 22, 2009

Following script updates an exchange component's diagnostic level for a server array. It can be usefull when you need to change exchange components' diagnostic level for multiple exchange servers.

'Reads and updates Exchange diagnostic level
'Written by Boran Duzgun

Const HKEY_LOCAL_MACHINE = &H80000002
diaglevel = 7 'Between 0-7

'Enter diagnostic level component
keystrKeyPath = "SYSTEM\CurrentControlSet\Services\MSExchangeTransport\Diagnostics"

'Enter Sub component valueName
strValueName = "6 SMTP Protocol"

ServerList =Array("Servexf01","Servexf02","Servexf03","Servexf04","Servexf05","Servexf06","Servexf07","Servexf08","Servexf09","Servexf10")

For i=0 To 10 Step 1

strComputer = ServerList(i
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv")
oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
WScript.Echo Sunucu(i) &" \ " & strValueName & "Old Value : " & dwValue
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,diaglevel
oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
WScript.Echo Sunucu(i) & " \ " & strValueName & "New Value : " & dwValue

Next

2 comments:

Anonymous said...

Yes undoubtedly, in some moments I can reveal that I approve of with you, but you may be inasmuch as other options.
to the article there is stationary a definitely as you did in the go over like a lead balloon a fall in love with publication of this solicitation www.google.com/ie?as_q=microsoft office compatibility pack ?
I noticed the utter you have not used. Or you use the dark methods of development of the resource. I suffer with a week and do necheg

Anonymous said...

Nice dispatch and this post helped me alot in my college assignement. Say thank you you on your information.