Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am torn between learning myself some Powershell or just leveraging my existing Ruby knowledge for the various Windows scripting things that I do from time to time.

Powershell does look incredibly powerful, but from initial impressions the syntax is fairly ugly.

Is there anything that Powershell can do that I couldn't just do with Iron Ruby?

share|improve this question
    
They aren't exclusive. Personally I find Ruby much more expressive and would prefer to use it for more tasks. You can integrate IronRuby with PowerShell; so you more or less use Ruby to orchestrate invocations of PowerShell commandlets. ironruby-rocks.com/2010/04/28/… –  Jeremy Jul 1 '11 at 15:27
add comment

1 Answer

up vote 5 down vote accepted

This is a bit of apples and oranges. PowerShell is a shell built for Windows with Microsoft products in mind. Querying Windows network and resources is built-in. Also products like SharePoint and Exchange require PowerShell.

EDIT: PowerShell is a tool for sysadmins; it's a command shell. So if you want to administer Exchange 2010 they have a PowerShell plug-in. Same with SharePoint. Iron Ruby is a .NET implementation of Ruby. Ruby is a programming language. PowerShell is a tool used for administration. Here is a link for command shells to maybe help understand. http://en.wikipedia.org/wiki/Shell_(computing)

share|improve this answer
    
True, I understand they are slightly different things. I'm just interested in the practicalities of what can be achieved with the knowledge. Does sharepoint not expose some kind of .Net assembly that can be used? Could you elaborate on why PS would be needed? –  Mongus Pong Jul 1 '11 at 14:50
    
I should point out I am a programmer not a system admin, so I think in terms of data manipulation rather than configuration manipulation which might be why I don't fully understand the differences. –  Mongus Pong Jul 1 '11 at 14:51
    
PowerShell can also be used to run scripts, just like Iron Ruby can. From the script you can access all .Net classes you can from Iron Ruby. And you can host it from your .Net application, just like Iron Ruby. codeproject.com/KB/cs/HowToRunPowerShell.aspx In fact, that is how MS Exchange's GUI is using it. –  Lars Truijens Jul 1 '11 at 21:32
    
I have been convinced. Bought the book and am very glad I did! –  Mongus Pong Jul 5 '11 at 8:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.