Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 759365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:35:13+00:00 2026-05-14T15:35:13+00:00

Goal: Provide a web service using Visual Basic or C# or .NET that interacts

  • 0

Goal: Provide a web service using Visual Basic or C# or .NET that interacts with the Exchange Management Shell, sending it commands to run cmdlets, and return the results as XML. (Note that we could use any lanaguage to write the service, but since it is a Windows Box and we have Visual Studio 2008, it seemed like easiest solution would be just use it to create a VB/.NET web service. Indeed, it was quite easy to do so, just point and click.)

Problem: How to run an Exchange Management Shell cmdlet from the web service, e.g, Get-DistributionGroupMember “Live Presidents”

Seems that we should be able to create a PowerShell script that runs the cmdlet, and be able to call that from the command line, and thus just call it from within the program. Does this sound correct? If so how would I go about this? Thanks. Answer can be language agnostic, but Visual Basic would probably be best since that is what I loaded the test web service up in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:35:14+00:00Added an answer on May 14, 2026 at 3:35 pm

    Well, didn’t get an answer, but sort of figured it out. I had a problem getting a 64-bit PowerShell to run, but eventually upgraded to Exchange 2010 and used C# and then there was no longer a problem.

    The short answer is that you create a new PowerShell application in Visual Studio, then you add a reference to the System.Management.Automation dll. This allows you to set up a namespace for Powershell and make calls to it. http://msdn.microsoft.com/en-us/library/system.management.automation(VS.85).aspx You create a Pipeline using the available Pipeline class http://msdn.microsoft.com/en-us/library/system.management.automation.runspaces.pipeline(VS.85).aspx in order to pipe your commands back. Then you put your commands in, add parameters if needed. Run the app and it will return the results from the cmdlets you called in the PowerShell and you can go from there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My goal is to provide each of my users a web page that contains
It's been said that the goal of CSS is to provide visual presentation and
My over all goal is to upload a very simple ASP.NET web site created
High Level Goal: Create a single Maven Web Application project that can be used
I have build a wcf web service that simply provides MS Dynamics SQL data
I need to create a simple web service (being the server). The goal is
My goal is to provide something like a Read More link next to a
Goal is to make a dialog that appears on menu_key pressed, but it keeps
Goal: Produce an Excel document with information from 3 associated models that is similar
I am in the process of setting up a web service for an external

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.