Skip to content

A sample application demonstrating how to connect to Exchange Remote PowerShell and run cmdlets programmatically.

Notifications You must be signed in to change notification settings

SayCloud/ExchangePowerShellAutomationSample

 
 

Repository files navigation

Exchange PowerShell Automation Sample

This sample application shows how to connect to a remote Exchange Powershell session, run cmdlets, and receive data. It also shows how variables can be passed into the PowerShell session from the C# code (currently only PSCredential is supported for the variable type).

The code shows how to connect to the PowerShell session directly (which means that only limited calls can be made, due to the runspace being in RestrictedLanguage mode) or to import the remote session into a local PowerShell session (in which case full scripting should be possible).

The code works with Exchange On-premises and Exchange Online (and can use the EXO v3 PowerShell module).

About

A sample application demonstrating how to connect to Exchange Remote PowerShell and run cmdlets programmatically.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%