troubleshooting Question

Executing a local PS1 file in Exchange 2010 with VB.NET

Avatar of tokarbill
tokarbill asked on
PowershellExchangeVisual Basic.NET
2 Comments1 Solution632 ViewsLast Modified:
I have an Exchange 2007 Management program written in VB.NET.  Many of the PS queries were PS1 files that I create on the fly and execute, redirecting the output to a simple text file.  This all worked just fine.

Now I have to update the tool to work with Exchange 2010.  I am looking for an example of executing a local PS1 file (i.e. c:\temp\myfile.ps1) in a VB.NET environment.  The PS1 file could be something as simple as a single line

get-mailboxpermission -identity me@mine.com  | where {$_.AccessRights -like "FullAccess"} export-csv "c:\temp\output.txt"

Or much more complex.

I know I can run the file interactively, I just can't figure out how to run it programmatically.,

Thanks,
bill


ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 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 1 Answer and 2 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