Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Nesting 2 foreach statements not working,

$
0
0

Hello,
I'm trying to cycle thru a list of groups and update the notes section with the of business owner from another list.
What is the best way to accomplish this task?
Clear-Host$groups=gcc:\temp\internalgrps.txt$BusOwner=gcc:\temp\BusOwners.txtForeach ($groupin$groups)

    {Foreach ($boin$BusOwner){Set-ADGroup-Identity$group-Add @{'info'="Business Owner: $bo" }}}

Viewing all articles
Browse latest Browse all 6937

Trending Articles