Link to home
Start Free TrialLog in
Avatar of MilesLogan
MilesLoganFlag for United States of America

asked on

Update Notes in Active Directory account with powershell

I want to add some information to the Notes section in the Telephone tab. I can do it with the code below but that replaces what is already there .. I don't want to replace it .. I need this information to be the first or last line of what ever information is already there ..

What are the other options ? -Add does not work and I tried other options and none work and cant figure out the help on set-aduser

help ??

This is what I was testing with..

GC C:\PS\Users.txt | % {
$info = "My Notes Here"
Set-ADUser $_ -replace @{info=$info}
}
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MilesLogan

ASKER

SubSun .. thank you so much again !
You are welcome!!
Avatar of B Y
B Y

Is there anyway to append to the top instead of the bottom?
Thankyou very much sir .It was excellent solution for the above mention problem.