header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
C# invoking the wrong powershell
Last Post 12 Apr 2011 06:28 PM by Poshoholic. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
haroonrasheedUser is Offline
New Member
New Member
Posts:1
Avatar

--
03 Mar 2011 08:36 PM
    I have written a C# code to call the Powershell and execute the commands. Requirement for me is to add a snap-in provided by VMware(VMware.View.Broker)and start using their PowerCLI commands in the PowerShell console. It is a web application developed in Windows XP and deployed in Windows Server 2008 R2(64 bits). When I started test with the PowerShell commands , in initial stage it started working with 32 bits PowerShell. Then after few days it started working with 64 bits powershell I guess. How I come to this notion is, VMware snapin is registered in 32 bits powershell not in 64 bits. So whenever I execute the get-pssnapin -registered command it is not listing the VMware snapin. However, When I do the same in 32 bits PowerShell manually listing includes VMware snapin. Due to this issue I am not able to add the snapin from my C# application.

    I have below queries for which I could not find answers after so much of surfing.
    Is this invoking 64 bits PowerShell?
    if yes how this got changed suddenly?
    What should be done to make this invoke right powershell?

    Please this is an urgent requirement for me. I would really grateful if someone help me out with this issue.

    Eagerly waiting for some positive response.Thanks in advance.

    Regards,
    Haroon.
    +91 9840440362
    PoshoholicUser is Offline
    PowerShell MVP, Community Director
    Basic Member
    Basic Member
    Posts:111
    Avatar

    --
    12 Apr 2011 06:28 PM
    I recommend reposting this question to the PowerShell Development forums that aren't part of Looking Ahead. This forum is not actively monitored. I'm going to add a post so that others know this as well.
    Kirk Munro [MVP]
    Poshoholic

    My blog: http://poshoholic.com
    Follow me on Twitter: http://twitter.com/poshoholic
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer