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'm a java dev that is new to powershell. I know that it's built on the .Net Framework, but I don't have much knowledge with that framework.

Is there a reference guide of some sort that shows what libraries are available in Powershell? I found a list of Powershell 2.0 commands, but I'm pretty lost as to what library to use or what is available from the underlying framework.

share|improve this question
    
Why do you need to use PowerShell and not the .NET Framework directly? –  Bernard Nov 4 '11 at 22:04
1  
We are a java shop primarily. The tasks I have to do relate to win xp machines running on VDI's. So the manager doesn't want to use java or groovy for this particular work. Powershell scripts will run with a simple install for xp and comes with the later windows versions. –  James Drinkard Nov 4 '11 at 22:07
add comment

2 Answers

up vote 1 down vote accepted

A good book for learning PowerShell is Windows PowerShell in Action, published by Manning.

As for the .Net framework, MSDN is a good source of info. If you search around on MSDN, you should be able to find the Visual Studio help files download, which is basically the same as the online version.

share|improve this answer
    
The MSDN is what I was looking for as a resource. I figured they had to have api documentation and reference materials, but didn't know what the link was. –  James Drinkard Nov 7 '11 at 13:22
1  
Technet is another site to bookmark... technet.microsoft.com/en-us/scriptcenter/default –  Joe Internet Nov 8 '11 at 16:55
add comment

You can load any CLR assembly in powershell. One option is to use parts of reflection to load assemblies, such as [Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'). Powershell 2 added the Add-Type commandlet.

Once you have the assembly loaded, you can use New-Object to create instances of classes.

share|improve this answer
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.