Add file path checking component

This commit is contained in:
Ray 2024-04-12 21:00:54 +10:00 committed by GitHub
parent b50d3999c2
commit a8f100e85b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,11 @@ import-module ActiveDirectory
#Get user to specify path of the CSV file containing OU names to be added into the Active Directory. #Get user to specify path of the CSV file containing OU names to be added into the Active Directory.
$fpath = Read-Host -Prompt "Please enter the path to your CSV file containing OU info to be added within the Active Directory Domain Forest" $fpath = Read-Host -Prompt "Please enter the path to your CSV file containing OU info to be added within the Active Directory Domain Forest"
# Check if the CSV file exists
if (Test-Path $fpath) {
# Display path to file given by end-user
echo $fpath
# Display path to file given by end-user # Display path to file given by end-user
echo $fpath echo $fpath