0

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.

  • 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. – user39741 Nov 4 '11 at 22:07
0

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.

  • 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. – user39741 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
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy