troubleshooting Question

Create Remote Powershell Process from ASP.NET C#

Avatar of forsters
forstersFlag for United Kingdom of Great Britain and Northern Ireland asked on
C#ASP.NETPowershell
7 Comments3 Solutions1133 ViewsLast Modified:
Hi Experts,

We have a powershell script which we run manually once every few months to provide our users with an overview of who has access to who's mailbox & vice-versa:

Get-Mailbox -Server “[OUREXCHANGESERVER]” | Get-MailboxPermission | where { ($_.AccessRights -eq “FullAccess”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | export-csv h:\access1.csv

We then import the results to SQL and display them by user via a web page, so each individual accessing the web page sees their specific mailbox details.

What we would like to try and do now is somehow run the script from the web page so that the whole thing becomes dynamic rather than requiring a manual process every few months.

We use Citrix and would intend the Powershell script to run on the Citrix server using parameters to identify who's who.

Can anyone point us in the direction of where to begin, we have got as far as running a simple powershell cmdlet from within an ASP.NET page (locally in a test environment) following the example given here:
http://devinfra-us.blogspot.co.uk/2011/02/using-powershell-20-from-aspnet-part-1.html
But I think we are now starting to appreciate the complexity of what to do next...some general guidance at this stage would be appreaciated.
ASKER CERTIFIED SOLUTION
Meir Rivkin
Full stack Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros