October 2006 - Posts

How to ask a question the smart way

I am posting this as a reference for myself. "How to ask a question the smart way" is a must read.  Its not only good for asking questions on the internet, but for life in general. For all of the Microsoft die-hards, check out the KB article.  It is a good summary. http://support.microsoft.com/kb/555375
Posted by Anonymous | 2 comment(s)

Rem sleep 17100

Rem (Rapid eye movement) is the stage of sleep characterized by rapid movements of the eyes, and 17100 is about the number of seconds it took for me to be through all of the stages of sleep and stumbling for the coffee pot. Of course if I were scripting, then the statement "Rem sleep 17100" would have done nothing for me.

rem - sets a remark in batch scripts

The Windows 2003 Resource Kit provides a 'sleep' command and many more needed commands if you are going to use batch files to manage systems.

sleep - will wait for a specific amount of time before the script continues.

sleep N
Replace N with the number of seconds for batch file to 'sleep'.

If I used this blog post title in my script, I would have remarked out the sleep command and would be very tired right now. Fortunately for me, sleep and rem were accomplished.

I also learned that according to wikipedia "People who regularly sleep between 4 and 7 hours live longer than people sleeping more or less than this, with serious differences between life span when people sleep less than four hours or more than 9."

Posted by Anonymous | with no comments

He shells on the sea shore, or floor, or couch. Ouch, Neck, hurts now.

Ah, the wonderful world of shells. It's been over a year since I posted about trying out linux.

Im going to have to come out of the closet at some point (ha! not what you were thinking), but I have "switched to the dark side".  Ok, I haven't really switched. I have however, gained an entirely new respect for linux.  In the past, I used Linux to accomplish the things I was unable to do in windows, such as password recovery or removing malware entries from the registry.  Shortly after that post, I discovered Ubuntu Linux.  Since then, I have explored many other distro's and I really do like Linux.  It is simply a very powerful operating system.  What does this have to do with shells or my hurt neck?

Well, the power of linux is quite apparent once you start to do some shell scripting.  It also make you think about how you can accomplish some of the same things in windows.  Ok, shells made for a better title, but I needed something to segway into batch scripting and the power of being LAZY.  I am a lazy person.  I live by the theory of  "If you do it more than once, AUTOMATE it."  I posted this last month on using WMIC to manage McAfee, but WMIC is much more powerful than the examples I listed.  Matt Broadstock posted a comment stating that he loved to see folks using the FOR command, and that's because Matt knows the power of that command and scripting in general.  He has some great posts on his blog with many examples of the FOR command.  He would appear to be lazy also.  I say lazy, but it actually takes some practice to be lazy, much practice.  You will know you have been practicing enough when you only sleep a few hours per night and your neck is in pain from staring  at the screen for so long.  Ah, another segway, pun intended.  Your welcome segway, both of my readers will visit your link.  Lets get started on your hurt neck, but first lets ask Matt a question, if he is not busy with world of warcraft.  Hey Matt, or anyone who may stumble upon this post, what is the clipboard output of WMIC used for?  Yea, Yea, I know you can copy the output to the clipboard, but why?  What else could you do besides paste it into another document?  I'm just curious if there are some other uses or not.  Ok back to the hurt neck....

If you had the time to read this, then whats the next few months of neck injury going to matter?

Open a shell, um you know, start, run, cmd.exe.

Then type WMIC

Then /?

Good luck, life will never be the same.  If you have to physically go to the server room after that, and a HDD or a motherboard isnt shot, just bang your head against the nearest wall - just kidding.

If that doesnt peak your interest, then pick up Microsoft Windows Command-Line - Administrators Pocket Consultant ISBN# 0-7356-2038-5, its good stuff and will be great for your career administering Windows.



 

Posted by Anonymous | with no comments