Tuesday, June 19, 2007

Export All DL's in a Domain

The following command can be used to export all Distribution List's.

csvde -f c:\DistributionLists.csv -s GCNAME -d ",dc=rishi,dc=com" -p subtree -l name,managedBy -r "((&(objectCategory=Group)(objectClass=Group)((groupType=8)(groupType=4)(groupType=2)))(objectCategory=ms-Exch-Dynamic-Distribution-List)(objectClass=msExchDynamicDistributionList))"

If you remove -l it will give the dump of all the attributes.

Monday, June 11, 2007

Drive Safely

Last weekend I got a car for my sister .. Today while reading my mails .. I came across a junk mail .. But it was really good .. So I want you all to read it .. We all have loved ones whom we want to be there always ..
This is really touchin ..............
Sanjay, a rich guy, loved fast cars and he did have a few in his possession. He loved to speed and could not be bothered about breaking speed limits. Many a times he was caught by the cops and speed radars, fined, but still he never bothered until.
One day as he was driving at a very high speed as usual, he saw a cop following him. The cop overtook him finally and asked him to stop and checked his license. He then took out his pad and started Writing, and then handed over the sheet of paper to Sanjay.
How much was this one going to cost?!!!
Wait a minute.
What was this????
Some kind of joke? Certainly not a ticket.
Sanjay began to read:
"Dear Sanjay,
Once upon a time I had a lovely daughter. She was six when killed by a car.You guessed it - a speeding driver's car.A fine and three months in jail, and the man was free. Free to hug his three daughters. I only had one, and I'm going to have to wait until Heaven, before I can ever hug her again.
A thousand times I've tried to forgive that man. A thousand times I thought I had. Maybe I did, but I need to do it again. Even now. Pray for me.. And be careful, Sanjay, my son is all I have left."
Sanjay turned around in time to see the cop's car pull away and head down the road. He watched until it disappeared. A full 15 minutes later, he too, pulled away and drove slowly home, praying for forgiveness and hugging a surprised wife and kids when he arrived.
Life is precious. Handle it with care.

Thursday, June 7, 2007

Shortcut to Command Prompt

We go to the command prompt via Start > Run > Cmd and then do Ipconfig or nslookup .. and so on .. There is a shorter way to do it ..

Start > Run
Type : cmd /k ipconfig or cmd /k nslookup

The above commands can be used as batch file as well. Create few batch files and keep them on the desktop so that you dont have to type .. You know .. I want to make it easy for you guys.

Monday, June 4, 2007

Move the Offline Address Book to another drive

A situation can occur where we have less space on the drive, So we can move the address book to a different drive.

The address book can take upto 700 MB.

1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersionWindows Messaging Subsystem\Profiles\Profile_name\13dbb0c8aa05101a9bb000aa002fc45a
3. On the Edit menu, point to New, and then click String Value.
4. Type 001e660e, and then press ENTER.
5. Right-click 001e660e, and then click Modify.
6. In the Value data box, type the path of the folder where you want to store the Offline Address Book files, and then click OK.
7. Quit Registry Editor.

NDR : 5.1.4

MS definition : Two objects have the same (proxy) address, and mail is sent to that address. This issue can also occur if the recipient does not exist on the remote server.

Normal search in ADUC does not give the result that we want. So go to the command prompt and make use of LDIFDE

ldifde -f c:\duplicate.txt -s DC_name -t 3268 -d "dc=abc,dc=com" -p subtree -r "(proxyAddresses=smtp:duplicate.smtp@abc.com)"

Macro to warn you if attachment is missed

I have made such mistakes many a times .. I used to write to my Boss .. Please find the attached file .. But there was no attachment .. hehehehe..

I thought .. better i find a way .. before my Boss finds a way to improve me .. So I went to my best friend google .. and found a Macro .. I have edited it as per my requirement ..

Steps in detail :

In Outlook, go to Tools -> Macros -> Security and select Medium. You'll be prompted if you want to run macros when you start Outlook.

Go to Tools -> Macros -> Visual Basic Editor.

Double-click on 'This Outlook Session' in the left-hand panel.

Paste the following code into the code window:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim lngres As Long
If InStr(1, UCase(Item.Body), "ATTACH") <> 0 Then
If Item.Attachments.Count = 0 Then
lngres = MsgBox("'Attach' in body, but no attachment - send anyway?", _vbYesNo + vbDefaultButton2 + vbQuestion, "Boss wont like it ... You did it again")
If lngres = vbNo Then Cancel = True
End If
End If
End Sub

Press F5 to check the code and make sure it's properly compiled.

Close the code editor and restart Outlook. You should be asked on startup if you want to run macros; select Enable Macros.

Send a test message with "attach" somewhere in the body and no attachment to make sure the script works.

Range of MX Record

The values that we can assign to MX records are in the range of 0 to 65535. That makes 65536 values. It is 2^16 = 65536.