November 20, 2006

267 words 2 mins read

Windows PowerShell

So I recently got into Windows PowerShell (Aka Monad). I have to admit that Microsoft actually did something right. By that I mean they made a REALLY powerful command line interface. If you like the power of bash, try out WPS, you’ll like it. First off, not only do they give you tab completion, and make it object oriented, they made it intelligent enough so that you really don’t need to grep and awk data from one command to another. It also has C#ish capabilities, with variables and fun stuff like that. Now the dangerous part is that WPS is REALLY powerful, you can access the registry direct, among other things. I’ve been playing the “get-process” and “stop-process” commandlets (yea, I know the name is a bit… silly). Mainly the stop-process, because its DAMN awesome. Its so super powerful it can kill ANYTHING and EVERYTHING without warning. Yes, I mean everything. If you have WPS (or want to try it) and want to see what I mean.. run “get-process|stop-process” (yes, that pipes all the process’s direct to stop-process, or “kill -9” for the linuxers). Instant BSOD, sooo cool. If you want to use it for something useful, try something like “get-process|where {$.Company -eq “Symantec Corporation”}|stop-process_". This will get and kill all the Symantec processes, including the tray monitor process, the services, and everything. Great for gaming time!

And if you want to create a batch file, I have no idea. I still haven’t figure out how to write usable scripts. If you know, please let me know (like…. what extension to use would be a good start).