none
PowerShell - What available Assemblies from VisualBasic can be used?

    Question

  • I ran across an article showing that PowerShell is able to use VisualBasic Assemblies by adding

    Add-Type -AssemblyName Microsoft.VisualBasic

    So it got me curious which Assemblies from VisualBasic can be utilized, or if there is a way (through powershell) to list which ones are available to be used? 

    Such as [Microsoft.VisualBasic.Interaction]::Inputbox("Testing Inputbox: ")

    What other ones can be used, and is there a way to list them like you can with members - like when you use get-member?

    Monday, February 18, 2013 10:58 PM

Answers

All replies

  • Unfortunately therir is no way to list assemblies that "might" work in PowewrShell.  All assembly classes are documented at Microsoft in MSDN.  YOU can do as others have done to discover this.  Try and load an assembly then try to use it.

    As for VB.  That is the main VB assembly.

    To find out what methods are exposed do this:

    [Microsoft.VisualBasic.Interaction]|gm -static


    ¯\_(ツ)_/¯


    • Edited by jrv Monday, February 18, 2013 11:41 PM
    Monday, February 18, 2013 11:40 PM
    • Marked as answer by Rokitec Friday, March 22, 2013 4:21 PM
    Monday, February 18, 2013 11:42 PM
  • Great info, that's exactly what I needed.  Thanks so much.

    Also do you know how to invoke or call the VB.net framework for the System Items into PowerShell?

    such as System.IO    or    System.Management.

    Thanks for the help, I really appreciate it.

    Tuesday, February 19, 2013 2:46 PM
  • Great info, that's exactly what I needed.  Thanks so much.

    Also do you know how to invoke or call the VB.net framework for the System Items into PowerShell?

    such as System.IO    or    System.Management.

    Thanks for the help, I really appreciate it.

    Yes -0  I/we know about those things.  Perjaps you shopuld l3earn how to program in dotNet and then laern some PowerShell.  This would teach you how to do this.  To learn by asking one question at a time would take months.


    ¯\_(ツ)_/¯

    Tuesday, February 19, 2013 6:29 PM