What are the best resources for learning Windows PowerShell? [duplicate] - powershell

This question already has answers here:
Closed 14 years ago.
I'm looking to learn Windows PowerShell. Can someone give me some really good references on where to start?

Search the web for some base tutorials on how to start. Once you are comfortable branch into the sites showing examples. Keep in mind that PowerShell is very similar to C# and uses the .net Framework. Starting with these technologies will help further your learning in PowerShell.
PowerShell Pro
http://www.powershellpro.com/powershell-tutorial-introduction/
Basic Commands and Examples
http://weblogs.asp.net/steveschofield/archive/2007/01/25/basic-powershell-examples-couple-useful-commands.aspx
The PowerShell Guy
http://thepowershellguy.com/blogs/posh/archive/2007/03/31/powershell-examples-used-on-ars-technica.aspx

I find that the podcast http://powerscripting.wordpress.com/ is pretty good. It won't teach you every bit of syntax you need to know but it's good as an introduction, if you use it start listening to the episodes from the beginning.

Related

Recommend a good mongodb/database tutorial for a beginner? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm a designer; proficient at HTML/CSS/JQuery. I know next to nothing about databases. I'm interested in learning mongodb (it seems simpler), but can't find any tutorials that will hold my hand from start to finish. Most tutorials I've found teach you how to use it in the command line or in their own web based shell. I'm looking for something that will show me how to actually deploy a site using it.
Or, if mongodb isn't appropriate for a database novice, then can you recommend some database tutorial that will be good for what I'm looking for?
Here are a couple of great sources that I have checked while docummenting to create a course:
A grasp of classic Relational Databases:
http://net.tutsplus.com/tutorials/tools-and-tips/relational-databases-for-dummies/
And continue with visual creation of Databases:
http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/
Next, you can go deeper in SQL knowledge:
http://net.tutsplus.com/tutorials/databases/sql-for-beginners/
http://net.tutsplus.com/tutorials/databases/sql-for-beginners-part-2/
http://net.tutsplus.com/tutorials/databases/sql-for-beginners-part-3-database-relationships/
Now, get to know the non-Relational "NoSQL" world:
http://net.tutsplus.com/tutorials/databases/getting-started-with-mongodb/
http://net.tutsplus.com/tutorials/databases/getting-started-with-mongodb-part-2/
Note: You can go directly to the MongoDB/NoSQL part directly, but I
recommend at least reviewing the first link (Relational Databases) to
get a good knowledge of the pros and cons of both paradigms.
p.s. I'm not part of tutsplus.com nor related to them. IMO, these matters are really well explained there
Most tutorials I've found teach you how to use it in the command line or in their own web based shell. I'm looking for something that will show me how to actually deploy a site using it.
This is basically where MongoDB starts. It's not really at the level of MySQL or SQL Server where you click a few buttons and have everything magically working.
The tutorials will start you at the command-line so that you can do basic CRUD (Create/Read/Update/Delete). Then you'll need to learn the specific details for whatever language you're using on the web-server (PHP, Ruby, C#, etc.)
There are tutorials for getting started (installing MongoDB on your server, installing drivers, etc). But you'll have to let us know what language you're using in the back end.
PHP has a ton of "getting started" documentation.
Here's a good link of links. Here's one of the links with basic wrapper code. And here's a link with an extensive example.
You'll probably find that the PHP code is very similar to the shell. You use array('_id' => 'bob') instead of { _id: 'bob'} and db->coll->find() instead of db.coll.find().

Learning... anything really [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm particularly interested in Windows PowerShell, but here's a somewhat more general complaint:
When asking for help on learning something new, be it a small subject on PHP or understanding a class in Java, what usually happens is that people direct me towards the documentation pages.
What I'm looking for is somewhat of a course. A deep explanation of why something works the way it does.
I know my basic programming, like Java and C#. I've never seen C or C++, though I have seen a bit of assembler. I know what the Stack and Heap are, how boxing and unboxing works, why you have to deep-copy an array instead of copying the pointer and some other things.
Windows PowerShell on the other hand, I know nothing about. And I notice that when reading the small document or some code, I usually forget what it does or why it works.
What I am looking for is preferably, a nice tutorial that explains the beginnings, the concepts, and goes to more difficult things at a steady pace.
The only thing documentation can do is explain what a function does. That's no good to me since I don't know what I want to do yet. I could read about a thousand functions, and forget about most of them, because I don't need to implement them right after it. Randomly wandering through the documentation doesn't do me any good.
So conclude, what is a good tutorial on Windows Powershell? One which explains in clear language what is happening, one which builds on previous things learned.
I don't think googling this is a good idea. Doing a Google search on this would turn up numerous tutorials. And experience tells me that you have to look long and hard to find the gem you're looking for. That's why I'm asking here. Because this is the place where you can find more experienced people. Many of the PowerShell guys among you will know the good ones already, and by asking you, I avoid wasting time that could be spent learning. So to summarize: I will not google this!
I wrote a free eBook along these lines. I will let you be the judge of whether or not it is good but my goal was to provide folks with a good mental model for how PowerShell works. You can download it from here. It is about 60 pages or so. You can find a more comprehensive free ebook online called Master-PowerShell.
Of course, you can peruse StackOverflow for Q&A and also ask questions as you have them.
I like this one
http://arstechnica.com/business/news/2005/10/msh.ars/2
I wouldn't consider doing research on a programming language a failure, even if it takes you forever to find that "gem" you are looking for. Searching for awesome material is an art and the more you do it, the better you get at it. The community won't always be able (or willing) to answer all of your questions for you, especially if they know you haven't done your due diligence to look something up.
"What tutorial do you recommend for learning PowerShell?" might be an answer to your question.
I like to use the O'Reilly Pocket Reference versions of books to get started in a new subject. Easy to take with you on the plane, on a lunch break, or in the necessary (beats People magazine).
Here's the Windows PowerShell Pocket Reference at Amazon. $6.84 for a Used copy.

How to get started with PowerShell? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
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)?
For learning PowerShell, there are a number of great resources
Technet Virtual Labs (Introduction to Windows PowerShell)
PowerShellCommunity.org - Forums, blogs, script repository
powershell on irc.freenode.net
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!
To answer your questions one by one.
Get v2.0 of the CTP. I have used 1.0 and 2.0 and have not found any stability issues with the later version and it has more functionality.
The best way to get started is to learn three basic commands and start playing with it.
Step 1 - Discover the available commands using Get-Command
To find all of the "get" commands, for example, you just type:
*Get-Command get**
To find all of the "set" commands, for example, you just type:
*Get-Command set**
Step 2 - Learn how to use each command using Get-Help
To get basic help about the Get-Command commandlet type:
Get-Help Get-Command
To get more information type:
Get-Help Get-Command -full
Step 3 - Discover object properties and methods using Get-Member
Powershell is an object oriented scripting language. Everything is a fully fledged .Net object with properties and methods.
For example to get the properties and methods on the object emitted by the Get-Process commandlet type:
Get-Process | Get-Member
There are a few other concepts that you need to understand like pipes and regular expressions, but those should already be familiar if you have already done some scripting.
What am I using it for?
Two things:
Processing log files from a massively distributed grid application. For this it has proven to be incredibly valuable and powerful.
Quick testing of .Net classes.
There are a number of PowerShell tools, for example,
PowerGUI
PowerShell Plus (not free)
PowerShell in Action is a well-regarded book.
And the Powershell team has a blog.
I just found this free ebook, linked from the Windows PowerShell blog:
Mastering PowerShell
Find a problem you need to solve and sit down and do it with PowerShell until it's fixed.
Don't give in and do it another way. Then find another, and another, etc. You'll take WAY longer at the start, but you'll be building knowledge to use going forward. As well as a script library to pull from for the future. One day you'll turn around and realize you now "know" PowerShell.
It's awesome. :)
Count me in with a vote for PowerShell in Action. There are a bunch of blogs out there as well, check out //\O//'s blog, The Huddled Masses, and JB's Powershell (SQL) as well, they go way back with the shell and have gobs of good scripts & snippets to look at.
Check PowerGUI, a PowerShell GUI and script editor. I don't use it yet, but I saw the sample videos and looks very good. Also, the site mantains a library with sample scripts.
Here is another excellent PowerShell reference.
The Ars Technica tutorial is a bit dated, but very good to get you up-and-running with PowerShell.
I would also second the suggestion to check out PowerGUI.
The PowerShell CTP is NOT supported in a production environment and a lot will change between now and the time it ships. I suggest following the many PowerShell blogs (don't forget the PowerScripting podcast). There's no shortage of good books on the topic. If you want to spend a little money, SAPIEN Technologies has some self-paced learning material at www.scriptingoutpost.com. I believe Don Jones has done a series of training videos for CBT Nuggets. You can probably find out more at concentratedtechnology.com.
I think getting into the habit of automating small tasks is a great way to train yourself in PowerShell. For example, writing a throwaway script rather than doing an onerous looking bit of text-processing by hand. It may actually take longer the first few times, but as you get quicker and build up a library of useful snippets that you can chain together you can save yourself a lot of time.
There are DNRtvs on PowerShell and PowerGUI. There are also .NET Rocks! episodes about these tools.
A chap called Guy Thomas does some good introductions to PowerShell.
I would start it on the fly. What I mean by on-the-fly is that just start to work on your real case and search for help on the web or this site for help if you don't know what to do. For sure, it will very beneficial if you spend some time to learn some basics first. This is what get on to PowerShell.
I have some blog posts on PowerShell, especially 3-serials on a real case I posted recently. Search for davidchuprogramming or go here. Good luck with your PowerShell journey.
PowerGUI was a big help in and of itself. The IntelliSense feature sold me on it, then I found some useful add-ons that were very good.
As far as resources:
Free eBooks:
Windows PowerShell Cookbook
Mastering PowerShell
PowerShell A more in-depth look
Introductory Video:
http://powergui.org/entry.jspa?externalID=2278&categoryID=361
With regard to the IDE question:
There is a rudimentary IDE which, on my computer at least, is already installed with PowerShell.
It's labeled "WindowsPowerShell ISE", and lets you do things like have several console sessions and several script files open simultaneously... one set of tabs for the scripts, one set for the console sessions, so you can click back and forth as needed.

What's the best online source to learn Perl? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am new to any scripting language. But, still I worked on scripting a bit like tailoring other scripts to work for my purpose. For me, what is the best online resource to learn Perl?
If you already know a bit of perl, PerlMonks is a great online resource. You can ask questions in their Seekers of Perl Wisdom section and the answers are often of very high quality. Many people who keep up with the latest developments in Perl hang out there.
As an added bonus, if you ask a clear question, many times the people there take the time to look at the underlying problem and will point out alternate approaches rather than simply taking your question at face value.
I realize that the question is about online sources, but I taught myself Perl in about three weeks thanks to the following books:
Learning Perl
Intermediate Perl
I already had a little bit of background knowledge in C, but the way these books teach is phenomenal. Scripts I've written in Perl are currently powering the data analysis process used by some instrument teams on the UA/NASA Phoenix Mars Lander - and I'm a junior in college! If it's good enough for NASA, it's good enough for you :)
The perldoc documentation is the best source for understanding how to use the language well.
The camel book "Programming Perl" is an excellent printed reference with thorough explanations written by the same people who wrote the perldocs (other books with animals on them are mostly ok.) Beware online tutorials - many of them teach very sloppy perl.
Use 'warnings' and 'strict' - then perl will be very helpful in pointing out your errors.
Perlmonks is also great (they will also tell you to use 'warnings' and 'strict'.)
And then you have to learn the CPAN one module at a time (which is where perlmonks and mailing lists are very helpful.)
http://learn.perl.org/
From the Online Library:
Beginning Perl
Impatient Perl
I highly recommend starting with Simon Cozens' Beginning Perl book.
And also, reading the Perl documentation.
Perl is in a state of (comparatively) rapid change, and has gotten into the position where the best documentation beyond a basic introduction to Perl 5 -- the current major version -- is the electronic documentation which comes with the language itself.
Read 'perldoc perlintro', then look to 'perldoc perl' for the rest of the core language documentation. Note that on Debian systems, you'll need to 'apt-get install perl-doc' to get this documentation.
Once you've got a handle on things, check out 'perldoc perldelta' to see what's new in the version of Perl installed on your system (which should be 5.8.8 or 5.10 these days -- much cool stuff in 5.10!). If the perldelta page isn't making any sense (and believe me, I remember how that feels), just come back to it later.
Finally, freenode #perl for questions you can't find answers to in the docs.
The Official Perl 5 Wiki is a great resource with lots of info and links, and it aims to be beginner-friendly.
Also see the bottom of the wiki home page for the latest headlines from the Planet Perl feed aggregator. It's useful to skim over every few days, because it sometimes answers questions that you didn't know enough to ask, but which you should be asking.
I would very much recommend Programming Perl, but beware you may need a subscription to Safari in order to read it online.
As other people noted, the online book Beginning Perl has a good reputation and is written by a very clueful expert and active Perl contributor. Other than that, I concentrated resources for beginners in the Perl Beginners' Site, and you can probably find something there that would be to your liking.
If you are a beginner, I would suggest you take a look at the cookbook provided by PLEAC. You can find it at http://pleac.sf.net. There you can find cookbooks for most languages.
A new resource is chromatic's Modern Perl, which is available for free online, though you may purchase a paper copy if you prefer.

Developing addins for World of Warcraft - Getting started? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
As a long time World of Warcraft player, and a passionate developer I have decided that I would like to combine the two and set about developing some addins. Not only to improve my gameplay experience but as a great opportunity to learn something new.
Does anyone have any advice on how to go about starting out?
Is there an IDE one can use? How does one go about testing? Are there any ready made libraries available? Or would I get a better learning experience by ignoring the libraries and building from scratch? How do I oneshot Hogger?
Would love to hear your advice, experiences and views.
This article explains how to start pretty well.
Your first bookmark is possibly the US Interface Forum, especially the Stickies for that:
http://us.battle.net/wow/en/forum/1011693/
Then, grab some simple addons to learn how XML and LUA interacts. The WoWWiki HOWTO List is a good point here as well.
One important thing to keep in mind: World of Warcraft is available in many languages. If you have a EU Account, you got an excellent testing bed by simply downloading the language Packs for Spanish, German and French. If you're an US Guy, check if you can get the Latin America version. That way, you can test it against another language version.
Once you made 1 or 2 really small and simple addons just to learn how to use it, have a look at the various frameworks. WowAce is a popular one, but there are others.
Just keep one thing in mind: Making an Addon is work. Maintaining one is even more work. With each new Patch, there may be breaking changes, and the next Addon will surely cause a big Exodus of Addons, just like Patch 2.0.1 did.
Another useful tools you might like is WarcraftAddOnStudio which lets you make plugins in the visual studio environment.
I learned the art of add-ons primarily by looking at the code of Blizzard's UI. You can see that code by extracting the default UI or finding a copy of the default UI online. Add-on developers sometimes like to over-engineer their pet projects (who doesn't?), while Blizzard's code is usually pretty no-nonsense and straightforward. In addition, Programming in Lua is a pretty useful (if slightly out-of-date) reference for the actual Lua language.
The best way to start is with the book World of Warcraft Programming. It covers LUA, XML, WarcraftAddOnStudio and the WoW API. The book also has sections on best practices and avoiding common mistakes.