Skip to content

Instantly share code, notes, and snippets.

@BeerRider
Created February 28, 2018 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BeerRider/62005b5a712ee060d176eb0ac9221884 to your computer and use it in GitHub Desktop.
Save BeerRider/62005b5a712ee060d176eb0ac9221884 to your computer and use it in GitHub Desktop.
function Connect-Exchange {
[Cmdletbinding()]
param(
[Parameter(Mandatory = $false)]
[string]$URL = (Get-Content $HOME\.psvariables\exchangeserver)
)
Import-PSSession -Verbose (New-PSSession -Verbose -Name Exchange2013 -ConfigurationName Microsoft.Exchange -ConnectionUri http://$URL/PowerShell/ -Authentication Kerberos) -AllowClobber
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment