Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell Populate ADGroup from CSV

$
0
0

I have populated a csv file using the following

   Get-ADGroupMember -recursive "_Escalations" | Select samAccountName | FT > c:\temp\escalations.csv

I now want to use the created csv file to populate another group

   import-csv c:\temp\escalations.csv | % {add-adgroupmember -identity _Escalations1}

And I'm getting the following message

   cmdlet Add-ADGroupMember at command pipeline position 1
   Supply values for the following parameters:
   Members[0]:

I assume this means that the csv file is not being read.

Can anyone help point out where I'm going wrong.

Thanks


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>