Forum Discussion
AresWare
Feb 03, 2023Copper Contributor
Update telephone notes in AD with powershell
Hello! I'm a beginner to PowerShell and I created this script which mostly works. It does a line break in between semicolons however it doesn't follow by row it updates every user in the csv with the...
AresWare
Feb 06, 2023Copper Contributor
This is great! However I need a line break in between. For instance my cell would look like. Hi;hi2;hi3 and I’d like them to be under each other.
RGijsbersRademakers
Feb 10, 2023Iron Contributor
Hi AresWare,
I'm not sure how to get them al underneath each other, but you could try the following like in your starting post:
$UserNamesCSV = Import-CSV 'C:\temp\users.csv' -Delimiter ","
foreach($user in $UserNamesCSV){
$usersplit = $user.answer -split ';' | Out-String
Set-ADuser -identity $user.user -replace @{info=$usersplit}
}
Regards,
Ruud