This will read a csv folder of users and set their passwords to reset on next logon.

This commit is contained in:
2025-09-24 03:00:53 +00:00
parent 99588cf760
commit ebb11455cd

View File

@@ -149,5 +149,6 @@ Write-Output "The original CSV file has been renamed to $newFilePath."
# Open the folder containing the renamed CSV file # Open the folder containing the renamed CSV file
Start-Process -FilePath "explorer.exe" -ArgumentList "/select,`"$newFilePath`"" Start-Process -FilePath "explorer.exe" -ArgumentList "/select,`"$newFilePath`""
# Clear all variables from active memory # Clear all variables from active memory
Remove-Variable -Name form, label, label2, textBox, browseButton, acceptButton, cancelButton, csvPath, userList, destinationPath, todaysDate, outputCsvPath, originalFileName, originalFileExtension, directory, newFileName, newFilePath -ErrorAction SilentlyContinue Remove-Variable -Name form, label, label2, textBox, browseButton, acceptButton, cancelButton, csvPath, userList, destinationPath, todaysDate, outputCsvPath, originalFileName, originalFileExtension, directory, newFileName, newFilePath -ErrorAction SilentlyContinue