« Deploying a SQL Database to a Remote Hosting Enviroment | Main | Psuedo Classes and Child Selectors »

PowerShell

Holy Cow!  I am in!  I am hooked!  I am committed!

I love PowerShell.

Simple as that.  This is the first in a series of blogs which will explore the amazing technology PowerShell.  This 'command' language works with the .NET framework to allow for just about anything a .NET programmer can think of.  I am going to start at the very beginning since that is where I am at right now!  If you don't have any .NET programming experience you will still be able to follow along with these examples but as I progress in my understanding of the language and these blogs get more advanced you will be in the dark on a lot of the power in PowerShell.  It's not too late, the .NET framework is only getting better, release by release!  The best way I know of to learn the .NET framework and how to use it is via Instructor Led Training, you may as well go to the best school in the country (in my and several others opinion). 
Once you get a class or two under your belt I suggest involvement with a local user group.  I was so lucky to begin here in Phoenix where we have the AZGroups run by Scott Cate and Lorin Thwaits it's free and fun and EXTREMELEY informative!

Last but definitely not least you can take FREE online Training via Microsoft Learning.  It's an unbelievable resource and it's free.  If you come from a php or Java background you can learn ASP.NET very quickly with the above mentioned steps.

Check out the Microsoft Learning Site Here!!  In this case there is a such thing as a free lunch and you should definitely get it while it hot!!!

Well here goes.

Lesson 1:  Creating A File and Writing Text To It.

 

Step 1: Create a folder on your C drive named PowerShellTesting.

Step 2: Open up PowerShell.  (you can download it here).

Start > All Programs > Windows PowerShell 1.0 > Windows PowerShell

figurea.jpg

 

 

 

 

 

 

Step 3: In the Command Window, Change Directory to the PowerShellTesting Folder (from the C drive) with the following command: cd PowerShellTesting

figure1.jpg

Step 4: Use the write-output command to write 'Hello World!' out to a file which will be created with this command called foo.txt:

  Type in this command: write-output Hello World! > foo.txt

figure2.jpg

 

Step 5: Open up the folder PowerShellTesting and verify that a file 'foo.txt' now exists.

 

figure3.jpg

 

Step 6: Open up the foo.txt file and look inside!

figure4.jpg

 

That's it!

It's that easy.

We are just getting started, check back soon or subscribe I will be posting at least bi-weekly.  There will be a lot of PowerShell related suprises here over the next few years!

 

Posted on Tuesday, February 6, 2007 at 01:46PM by Registered CommenterSpike Xavier | Comments4 Comments | References1 Reference

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (1)

References allow you to track sources for this article, as well as articles that were written in response to this article.

Reader Comments (4)

Welcome to the PoSH infected ;-)

Greetings /\/\o\/\/
February 6, 2007 | Unregistered Commenter/\/\o\/\/
Couldn't you always do this in DOS?

What is the differnce between you example and this one.

echo hello work >c:\foo.txt
February 9, 2007 | Unregistered CommenterJason
We are just getting started here, check back over the next few months.
February 9, 2007 | Unregistered Commenterspike
Traitor! :)

As Simon would say "You're dead to me".

February 13, 2007 | Unregistered CommenterJen
Editor Permission Required
You must have editing permission for this entry in order to post comments.