commit 6401784fbd6961fb758b9a955689226ecb226357 Author: EndMove Date: Thu Aug 25 13:47:30 2022 +0200 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..cffc295 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# EXCAL-ARIGHTS + diff --git a/configs.ps1 b/configs.ps1 new file mode 100644 index 0000000..f238f5c --- /dev/null +++ b/configs.ps1 @@ -0,0 +1,26 @@ +<## + # EXCAL-ARIGHTS - configuration file + # + # @version 1.0.0 + # @since 08-25-2022 + # + # @author Jérémi Nihart + # @copyright © 2022 EndMove, All rights reserved. + # + # @link https://git.endmove.eu/EndMove/excal-arights + #> + + # Permission to use (define current by this one) + $permission = "LimitedDetails" + + # Name of the calendar folder in the user's calendar + $calandarFolders = @("Calendar", "Calendrier", "Kalender") + + # Alias of account to be skipped (an alias, is the email prefix ahead of the @domain.com) + $ignoreAlias = @("raoul.nihart", "brecht.marsoul") + + # Email of the Administration account to use + $adminAccount = "endmove@luminussolutions.be" + + # Logs file in which log all process + $logFile = "access_rights_update.log" \ No newline at end of file diff --git a/dev-note.txt b/dev-note.txt new file mode 100644 index 0000000..f573b46 --- /dev/null +++ b/dev-note.txt @@ -0,0 +1,4 @@ +Get-ExecutionPolicy + +Set-ExecutionPolicy Unrestricted +Set-ExecutionPolicy Restricted \ No newline at end of file diff --git a/run.ps1 b/run.ps1 new file mode 100644 index 0000000..08fdfa3 --- /dev/null +++ b/run.ps1 @@ -0,0 +1,26 @@ +<## + # EXCAL-ARIGHTS - runable script (entrypoint) + # + # @version 1.0.0 + # @since 08-25-2022 + # + # @author Jérémi Nihart + # @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 \ No newline at end of file