I have a command to copy AD group members from one to another
but i want to do that with the help of Excel file for multiple groups.
i want PowerShell to get the content of column A (old group name) and copy all the members to the new group (column B).
internet search didn’t help for me.
We’re used to be better when we get something to tweak. What do you have so far? Please show your code. Powershell.org is not a free code writing service – you know that, right? We expect you to do your own research before and at least try to solve your problem by yourself.
Olaf is right without having any code to work with we can’t really assist much further. Below is an example of how I would go about it. Note the Headers in the csv file would be OldGroup and NewGroup.
When you use the foreach loop you have to assign a variable to the item that is being iterated through, it can be called anything you want. Here is another example.
$Pizza = Get-Content C:\temp\Pepperoni.txt
Foreach ($Slice in $Pizza){
Write-Output "I ate $slice"}