Problem with Powershell references in Visual Studio

Posted on 2014-09-02
Last Modified: 2014-09-02
I have problems referencing powershell functions from within Visual Studio 2008 or 2010. I have imported the
System.Management.Automation.dll but it still cannot find references to:

        Dim connInfo As WSManConnectionInfo
        Dim mycommand As PSCommand, pscmd As PowerShell
        Dim ws As

Also it cannot find AuthenticationMechanism or RunspaceAvailability so I am unable to build the project

I tried removing and re-adding references with no luck.
I used to work ok before but it lost all the references for some reason. I even went back to an earlier version of the project.
I tried creating a new project with the appropriate references.

Are there different versions of System.Management.Automation.dll ?
 Mine is 6.0.6000.16386 dated 12/01/2007
Question by:Peter Hutchison
    1 Comment
    LVL 18

    Accepted Solution


    I reinstalled Windows SDK for Windows 7 and .NET 3.5 SP1 and updated the references.
    The DLL has been updated to v6.1.7600 which has the appropriate references in it.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now