From 98e66458c05d6fedc7627c9ab91ee3206f02da6b Mon Sep 17 00:00:00 2001 From: Jannis Hahn <j.hahn@itc.rwth-aachen.de> Date: Thu, 12 Oct 2023 10:57:02 +0200 Subject: [PATCH] Upload New File --- Beispielprojekt/ADAM_Run.ps1 | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Beispielprojekt/ADAM_Run.ps1 diff --git a/Beispielprojekt/ADAM_Run.ps1 b/Beispielprojekt/ADAM_Run.ps1 new file mode 100644 index 0000000..0f705f1 --- /dev/null +++ b/Beispielprojekt/ADAM_Run.ps1 @@ -0,0 +1,44 @@ +function Run +{ + # Setzen der Parameter für die Funktionen + [CmdletBinding()] + param + ( + # Pfad zur Excel-Datei (Inputdatei) + $xlsxpath = "C:\Verwaltungspfad\Files\BeispielExceldatei.xlsx", + $Logpath = "C:\Verwaltungspfad\Files\Logs\$(Get-Date -format "yyyy_MM_dd__HH_mm")_Log.log", + $prefix = "" + ) + + #Starten des Loggings + Start-Transcript -Path $LogPath + + # Importieren der anderen Dateien + . .\ADAM_Connect-Webservice.ps1 + . .\ADAM_Initialize.ps1 + . .\ADAM_Check-Invitations.ps1 + + + # Diese funktion führt automatisch alle Schritte automatisch durch in folgender Reihenfolge: + + # Laden aller Module (Excel) + write-host "Die Funktion Load-Modules wird ausgeführt" -Foreground darkyellow + Initialize + write-host "Die Funktion Load-Modules ist durchgelaufen `n" -Foreground darkyellow + + + # Verbinden mit dem Webservice der RWTH Aachen + write-host "Die Funktion Connect-Webservice wird ausgeführt" -Foreground darkyellow + Connect-WebService + write-host "Die Funktion Connect-Webservice ist durchgelaufen `n" -Foreground darkyellow + + + # Überprüfung, ob neue Accounts existieren und ggf. Einladung erstellen + write-host "Die Funktion Check-Invitations wird ausgeführt" -Foreground darkyellow + Check-Invitations -xlsxpath $xlsxpath -prefix $prefix + write-host "Die Funktion Check-Invitations ist durchgelaufen `n" -Foreground darkyellow + + + # Stoppen des Loggings + Stop-Transcript +} \ No newline at end of file -- GitLab