excal-arights/run.ps1

26 lines
620 B
PowerShell

<##
# EXCAL-ARIGHTS - runable script (entrypoint)
#
# @version 1.0.0
# @since 08-25-2022
#
# @author Jérémi Nihart <contact@endmove.eu>
# @copyright © 2022 EndMove, All rights reserved.
#
# @link https://git.endmove.eu/EndMove/excal-arights
#>
# Setup script
$root = (Split-Path $MyInvocation.MyCommand.Path -Parent)
. $root\configs.ps1
Import-Module ExchangeOnlineManagement
# Start logging
Start-Transcript -Path $root\$logFile -Append
# Initiate exchange connection
Connect-ExchangeOnline -UserPrincipalName $adminAccount -ShowProgress $true
# Stop logging
Stop-Transcript