We help IT Professionals succeed at work.

Add notes to multple AD groups

213 Views
Last Modified: 2014-08-08
Hi EE..

I want to add a note to a set of groups but .. first is below correct ? and how would I add two notes , in separate lines ?
So for instance .. I want it to appear as below in the Group notes .

Approver: Person1
Approver: Person2


GC C:\Powershell\groups.txt | % {
$info = "Approver: Person1"
Set-ADGroup $_ -replace @{info=$info}
}
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2014

Commented:
Haven't tested, but probably like this.
GC C:\Powershell\groups.txt | % {
$info = "Approver: Person1`nApprover: Person2"
Set-ADGroup $_ -replace @{info=$info}
} 

Open in new window

Let me know if it doesn't work.

Author

Commented:
Hi Subsun ..

It does add the note but on one line .. not on two separate lines like I would like it to .

Approver: Person1
Approver: Person2
CERTIFIED EXPERT
Top Expert 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
My bad footech ..your awesome !

Author

Commented:
Perfect .. thanks footech !
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.