dxExchange.Online.psm1

# Implement your module commands in this script.


# Export only the functions using PowerShell standard verb-noun naming.
# Be sure to list each exported functions in the FunctionsToExport field of the module manifest file.
# This improves performance of command discovery in PowerShell.
$ExoPSModuleRoot = (Get-ChildItem -Path $PSScriptRoot -Filter CreateExoPSSession.ps1 -Recurse -ErrorAction SilentlyContinue -Force | Select-Object -Last 1).DirectoryName
$ExoPSModule = 'Microsoft.Exchange.Management.ExoPowerShellModule.dll'
$DllPath = [System.IO.Path]::Combine($ExoPSModuleRoot, $ExoPSModule)
$ModuleKickoff = [System.IO.Path]::Combine($ExoPSModuleRoot, 'CreateExoPSSession.ps1')
Import-Module $DllPath
. $ModuleKickoff

If ($Global:ExoCredential) {
    $Credential = $Global:ExoCredential
} Else {
    $Credential = $(Get-Credential)
}

Connect-ExoPSSession -Credential $Credential

Export-ModuleMember -Function *-*