Skip to content
Snippets Groups Projects
Commit ad49ff09 authored by Christian Maintz's avatar Christian Maintz
Browse files

Update Load-Modules.ps1; Add Test, ob die Excel-Datei existiert

parent cc6a30c2
No related branches found
No related tags found
1 merge request!5Reorganisation und Erweiterung um eine Beispielanwendung
...@@ -20,4 +20,15 @@ function Load-Modules ...@@ -20,4 +20,15 @@ function Load-Modules
Import-Module ImportExcel Import-Module ImportExcel
} }
write-verbose "Module geladen!" write-verbose "Module geladen!"
# Testen, ob das Excel-File existiert
if($(Test-Path -Path $xlsxpath) -eq $true)
{
write-verbose "Excel-Datei existiert bei >$xlsxpath< und wird im laufe des Skriptes benutzt"
}
else
{
write-host "Excel-Datei konnte bei >$xlsxpath< nicht gefunden werden. Bitte verschieben Sie das Excel-File oder ändern Sie den Dateipfad"
break;
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment