#1. Have to have permissions to the OU or organization Import-module ActiveDirectory #Imports CSV file - change location as neccessary Import-CSV "C:\users\Test\desktop\mobilenumber.csv" | % { #Variables created to correspond with headers in CSV File. Make sure the variables match your csv headers. $Title = $_.EmployeeTitle $Location = $_.Location $IDnumber = $_.EmploeeID # Getting user based on employee number then setting user with that employee id the following variables Get-ADUser -Filter {EmployeeID -eq $IDnumber}| set-aduser -Description $Title -Office $Location -Title $Title}
Original:
No comments:
Post a Comment