Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Looking Ahead
>
Developing for PowerShell v2.0
C# invoking the wrong powershell
Last Post 12 Apr 2011 06:28 PM by
Poshoholic
. 1 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
haroonrasheed
New Member
Posts:1
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
Poshoholic
PowerShell MVP, Community Director
Basic Member
Posts:111
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.
Using PowerShell
--General PowerShell
--Active Directory
--Exchange Server
--Lync Server
--SharePoint
--SQL Server
--System Center
--Non-Microsoft Products
--Books, Tools, and Videos
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Looking Ahead
>
Developing for PowerShell v2.0
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2