
DanielFoley
(usa HaikuOS)
Enviado em 31/08/2023 - 07:18h
Prepare the CSV File:
Create a CSV file in Excel or a text editor with columns for login, name, role, etc. Save it with the appropriate format (CSV).
Write PowerShell Script:
You'll need to write a PowerShell script to read the CSV file and create user accounts based on the data. Here's a basic example:
powershell
Copy code
$csvFile = "C:\path\to\your\file.csv"
$csvData = Import-Csv $csvFile
foreach ($user in $csvData) {
$displayName = $user.Name
$username = $user.Login
https://www.adpworkforce-now.com/
$password = "YourPassword" # You can use a secure method to set passwords
$role = $user.Role
New-ADUser -Name $displayName -SamAccountName $username -AccountPassword (ConvertTo-SecureString $password -AsPlainText -Force) -Enabled $true -DisplayName $displayName -Description $role -Path "OU=YourOU,DC=YourDomain,DC=com"
}
Adjust the script to match your CSV columns and organizational structure.
DanielFoley