Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get started with PowerShell? [closed]

I played with one of the early beta versions of PowerShell V1, but haven't used it since it went "gold". What is the best way to get started using PowerShell?

Which version of PowerShell should I be using (V1.0 vs 2.0 CTP's)? What are you using PowerShell for? Are there any tools that make using PowerShell easier (that is, development environments)?

like image 985
Brad Leach Avatar asked Aug 28 '08 22:08

Brad Leach


People also ask

How do I get PowerShell to open on startup?

From the Start MenuClick Start, type PowerShell, and then click Windows PowerShell. From the Start menu, click Start, click All Programs, click Accessories, click the Windows PowerShell folder, and then click Windows PowerShell.

How do I start a PowerShell command?

Press Windows+R to open the Run dialog box, and then type “powershell” in the text box. You can either click “OK” (or press the Enter) to open a regular PowerShell window, or press Ctrl+Shift+Enter to open an elevated PowerShell window.

How do I stop a PowerShell script from running in the background?

You can use Stop-Job to stop background jobs, such as those that were started by using the Start-Job cmdlet or the AsJob parameter of any cmdlet. When you stop a background job, PowerShell completes all tasks that are pending in that job queue and then ends the job.


1 Answers

For learning PowerShell, there are a number of great resources

  1. Technet Virtual Labs (Introduction to Windows PowerShell)
  2. PowerShellCommunity.org - Forums, blogs, script repository
  3. powershell on irc.freenode.net

  4. PowerShell podcasts - PowerScripting.net and Get-Scripting.blogspot.com

For IDE style environments, you have PowerShell Analyzer (free) and PowerGUI (free), PowerShell Plus (commercial), PrimalScript (commercial), and Admin Script Editor (commerical).

I use PowerShell for everything that I can. Right now, I'm looking at Psake, a PowerShell based build script environment. I use if for managing my Active Directory, Hyper-V, Twitter, some keyboard automation (hosting PowerShell in a winforms app to grab keystrokes), and a ton of other stuff. Another cool project I have to check out is PSExpect for testing. I also use it for database access - monitoring changes made to rows in a database by applications. It is also integrated in to my network monitoring solution.

I am also looking to use PowerShell as a scripting engine for a project I am working on.

EDIT: If you are just learning PowerShell, I would focus on V1. As you get more comfortable, take a look at the CTP, but too much can change from the CTP to what is actually released as V2 to make that your learning tool. Version 2 is out and available from XP SP3, Server 2003, Vista, and Server 2008 and in the box for Win7 and Server 2008 R2. What you learned for V1 will still serve you well, but now I would concentrate on V2, as there is a superior feature set.

Good luck!

like image 191
Steven Murawski Avatar answered Sep 17 '22 15:09

Steven Murawski