Sunday, September 2, 2007

Calculate amount of disk space to be reclaimed by Offline Defrag

By using the command eseutil /ms, we can calculate the exact amount of disk space that can reclaimed by doing the offline defrag. Here are the steps:

1) Run eseutil /ms command from the bin directory on the dismounted database. It will always be run on the edb file.

2) The first section of the space report is the SLV SPACE DUMP. This reports on free space in the streaming database file (.stm).
TOTALS:
Free: 1528814
Reserved: 2238
Deleted: 228
Committed: 11888
Unknown: 0
There are 1528814 free pages in the .stm file, and each page is 4096 bytes in length. Therefore, there are 6,262,022,144 bytes of empty space in the file (1528814 x 4096).

3) As for the EDB file dump you'll see the following information in the last line in the column 'Available'

-------------------------------------------------------------------------------
3244272

The number at the lower right of the output (3244272) is the total of all free pages in the database. If you multiply this number by 4096, you will see that defragmenting this database will recover 12.3 gb of space.

4) Hence, based on the above example you will recover 12.3 GB + 6GB after you do the offline defrag.(this is including the STM also)

Monday, August 13, 2007

India - 60th Year Of Independence

Note : 28 States and 7 UT's .. Thanks to Raman .. Intelligent ...

Something we all should know about our country ..

Yeah. The country is so diverse! Many languages, religions, costumes flourish in India. Even the division into states are basically according to this cultural/language diversity.

Most of the states have its own language. eg: Language of the state of Kerala = Malayalam. ( Mallu )

Hindi is the national language. English has associate status and is widely used.

Herez a list I got from Wikipidea, on the major languages:

1. Hindi हिन्दी
2. English (associate official)

Recognized national languages of India (Scheduled list for official use)


1. Assamese (official language of Assam) অসমীয়া
2. Bengali (official language of Tripura and West Bengal) বাংলা
3. Bodo (official language of Assam)
4. Dogri (official language of Jammu and Kashmir)
5. Gujarati (official language of Dadra and Nagar Haveli, Daman and Diu, and Gujarat) ગુજરાતી
6. Hindi (official language of Andaman and Nicobar Islands, Bihar, Chandigarh, Chhattisgarh, Delhi, Haryana, Himachal Pradesh, Jharkhand, Madhya Pradesh, Rajasthan, Uttar Pradesh and Uttaranchal) हिन्दी
7. Kannada (official language of Karnataka) ಕನ್ನಡ
8. Kashmiri
9. Konkani (official language of Goa)
10. Maithili (official language of Bihar)
11. Malayalam (official language of Kerala and Lakshadweep) മലയാളം
12. Manipuri (Meithei) (official language of Manipur)
13. Marathi (official language of Maharashtra) मराठी
14. Nepali (official language of Sikkim)
15. Oriya (official language of Orissa) ଓଡ଼ିଆ
16. Punjabi (official language of Punjab) ਪੰਜਾਬੀ, پنجابی
17. Sanskrit संस्कृता
18. Santali
19. Sindhi سنڌي، سندھی, सिन्धी
20. Tamil (official language of Tamil Nadu and Pondicherry) தமிழ்
21. Telugu (official language of Andhra Pradesh) తెలుగు
22. Urdu (official language of Jammu and Kashmir) اردو

Other popular languages of India(over 5 million speakers but no official status)
1. Awadhi (often considered a sub-variety of Hindi)
2. Bhili (Bhil tribals)
3. Bhojpuri (language of Bihar, often considered a sub-variety of Hindi)
4. Bundeli (often considered a sub-variety of Hindi)
5. Chhattisgarhi (language of Chhattisgarh, often considered a sub-variety of Hindi)
6. Gondi (Gond tribals)
7. Hariyanavi (Haryanvi) (language of Haryana, often considered a sub-variety of Hindi)
8. Hindustani (A mixture of Hindi and Urdu. Spoken largely in the Northern part of India.)
9. Kanauji (language of Uttar Pradesh, often considered a sub-variety of Hindi)
10. Kodava, spoken in the Kodagu district of Karnataka
11. Kutchi (language of Kutch, a region in Gujarat)
12. Magadhi (language of southern Bihar, often considered a sub-variety of Hindi)
13. Marwari (language of Rajasthan, often considered a sub-variety of Hindi)
14. Tulu (spoken by Tulu people of Karnataka and Kerala)


Indian Flag:


The orange (deep saffron) symbolizes courage and sacrifice (saffron is the sacred color of Hinduism).

The white stands for peace, unity and truth.

The green stands for faith (Islam) and fertility.

The wheel in navy blue indicate the Dharma Chakra, the wheel of law in the Sarnath Lion Capital.

The blue symbolizes the sky and the ocean.

The 24 lines inside the chakra (wheel) symbolizes 24 hours of the day.

Friday, July 27, 2007

Latest MS KB

The below URL will take you to the latest MS KB articles.

http://support.microsoft.com/selectindex/?target=rss

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.

Sunday, June 3, 2007

Myth of /3GB

3GB switch only needs 1GB or more physical memory.

It's simple to explain what it does, but people often misunderstand.
The /3GB switch changes the way the 4GB virtual address space is split up. Instead of splitting it as 2GB of user mode virtual address space and 2GB of kernel mode virtual address space, the split is 3GB of user mode virtual address space and 1GB of kernel mode virtual address space.
That's all.
And yet people think it does more than that.
I think the problem is that people think that "virtual address space" means something other than just "virtual address space".
The term "address space" refers to how a numerical value (known as an "address") is interpreted when it is used to access some type of resource. There is a physical address space; each address in the physical address space refers to a byte in a memory chip somewhere. (Note for pedants: Yes, it's actually spread out over several memory chips, but that's not important here.) There is an I/O address space; each address in the I/O address space allows the CPU to communicate with a hardware device.
And then there is the virtual address space. When people say "address space", they usually mean "virtual address space".
The virtual address space is the set of possible pointer values (addresses) that can be used at a single moment by the processor. In other words, if you have an address like 0x12345678, the virtual address space determines what you get if you try to access that memory. The contents of the virtual address space changes over time, for example, as you allocate and free memory. It also varies based on context: each process has its own virtual address space.
Saying that 2GB (or 3GB) of virtual address space is available to user mode means that at any given moment in time, out of the 4 billion virtual addresses available in a 32-bit value, 2 billion (or 3 billion) of them are potentially usable by user-mode code.

User Info w/o using Adsiedit

' On Error Resume Next
' Define variables
dim firstName
dim lastName
' Prompts to enter first name and loops till users does not enter a first name
Do while firstname=""
' msgbox("Please type your first name")
firstName=inputbox("Enter your first name:","First Name")
' If user presses cancel then move forward
If IsEmpty(firstname) Then
exit do
End If
Loop
' Prompts to enter last nameDo while lastname=""
' msgbox("Please type your last name")
lastName=inputbox("Enter your last name") ' If user presses cancel, then move forward
If IsEmpty(lastname) Then
exit do
End If
Loop
' Display AD properties only if a name has been entered
if firstname<>"" Or lastname<>"" then
Set objUser = GetObject("ldap://cn=&" "&lastname&",dc=abc,dc=com")
Set WMIUser = GetObject("winmgmts:{impersonationlevel=impersonate}!" &"/root/cimv2:Win32_UserAccount.Domain='ASIA'" & ",Name='" & objUser.sAMAccountName & "'")
WScript.Echo "Display Name: " & objUser.displayName
WScript.Echo "Office: " & objUser.physicalDeliveryOfficeName
WScript.Echo "Telephone Number: " & objUser.telephoneNumber
WScript.Echo "Home Phone: " & objUser.homephone
WScript.Echo "Login ID: " & objUser.sAMAccountName
WScript.Echo "Account Last Accessed on: " & objUser.whenChanged
WScript.Echo "Account Created on: " & objUser.whenCreated
WScript.Echo "User SID: " & WMIUser.SID
' Add more properties if needed

End If

Script to send email from a server which has SMTP service running.

Set objEmail = CreateObject("CDO.Message")
objEmail.From = "Rishi.Bhardwaj@abc.com"
objEmail.To = "myself@abc.com"
objEmail.Subject = "Automated Email"
objEmail.Textbody = "Server is running SMTP."
objEmail.AddAttachment "abc.txt"
objEmail.Send