Can someone please help me fix the error in the scripton PowerShell. When I try to run the script using a CSV file, Ikeep getting an error. A screenshot of the script and the CSV fileis attached. It would be helpful if you gave me the solution aswell ASAP.
SCRIPT
# Import required modules
Import-Module ActiveDirectory
# Create a New Password
$securePassword = ConvertTo-SecureString “Secret123” -AsPlainText-Force
# Prompt user for the CSV File path
$filepath = Read-Host -Prompt “Please enter the path of the CSVfile”
# Import the file into a variable
$users = Import-Csv $filepath
# Loop through each row and gather information
ForEach ($user in $users) {
# Gather the
OR
OR