O365Extensions.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# some module variables
$AllServices = "AzureActiveDirectory","ComplianceCenter","Exchange","Sharepoint","Skype"
$ThisModule = Split-Path $PSScriptRoot -Leaf
$FunctionPath = Join-Path $PSScriptRoot "functions"
$HelperPath = Join-Path $PSScriptRoot "helpers"
$AppdataPath = Join-Path $env:APPDATA $ThisModule
$ExchComputerName = "outlook.office365.com"
$ComplianceComputerName = "ps.compliance.protection.outlook.com"
$SkypeComputerName = "online.lync.com"

# spin up the functions
$Functions = Get-ChildItem -Path $FunctionPath -Recurse -Filter "*.ps1"
$Helpers = Get-ChildItem -Path $HelperPath -Recurse -Filter "*.ps1"
foreach ($Script in @($Functions + $Helpers))
{
    . $Script.FullName
}

Set-Alias -Name O365 -Value Connect-O365