I am running this script to add all employee IDs into my active directory
>> Import-Module ActiveDirectory>> $Users = Import-Csv -Path C:\excelfiles\importtest.csv
>> Get-Content -Path C:\excelfiles\importtest.csv | ft
>> sleep 10
>> foreach ($User in $Users)
>> {
>> Set-ADUser -identity $User.SamAccountName -replace @{"employeeID" = $User.employeeID} -verbose
>> }
>> $results | Export-Csv -path c:\excelfiles\export.csv
The last part of it is my attempt to pull out the results into a csv file but no luck, it exports the file but with no data. Any idea of what im doing wrong? Ive also tried it with the script below was and same results.....
>>Import-Module ActiveDirectory>>$Users = Import-Csv -Path C:\excelfiles\importtest.csv
>>Get-Content -Path C:\excelfiles\importtest.csv | ft
>>sleep 10
>>foreach ($User in $Users)
>>{
>>Set-ADUser -identity $User.SamAccountName -replace @{"employeeID" = $User.employeeID} -verbose | Export-Csv -path >>C:\excelfiles\export.csv -Append
>>}