If only I were

Building Great Software

PowerShell del

with 2 comments

del is an alias to the Remove-Item cmdlet and you can use it pretty much like you did in a DOS shell. But there are some additions.  It can delete more than just files and directories. It can now delete certificates, registry keys, aliases and more.

One of the nicest features is that you can issue a del command with the -whatif parameter and it won’t run the command, but will tell you what would be deleted if you really did issue the command. So del *.zip -whatif would give you a list of .zip files in your current directory, but wouldn’t actually delete them.

If you haven’t tried PowerShell yet and you work from the command line a lot, you really should check it out.  It is a pretty easy transition from cmd.exe, but there is way more power under the hood if you want to dig deeper.

I’ll likely blog more on PowerShell in the future and will link to many of the resources out on the web to help you learn how to use it.

Written by Chris Sutton

March 26, 2008 at 7:39 am

Posted in Learning, Technology

Tagged with , , ,

2 Responses

Subscribe to comments with RSS.

  1. In case you do not already know, there is a great podcast on Powershell called the Power Scripting Podcast. http://powerscripting.wordpress.com/

    Rhonda Tipton

    March 26, 2008 at 8:52 am

  2. Rhonda, I listen to that whenever I can. I liked the interview they just did with Jeffery Snover.

    Chris Sutton

    March 26, 2008 at 11:15 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: