Software Development Kit (SDK) and API Discussions

newbie general powershell looping question

stephen2
6,782 Views

I have a sorted csv file in the following format:

 

name, uniqueID, environment

 

server1 x123 production

server1 x234 installed

server1 x345 n/a

server2 x999 anything

 

what I want to do is read the environment for the first occurance of server1, and then update the unique identifiers via API for any subsequent occurances of the name

 

so my expected output would be  

server1  x123  production

server1 x234   production

server1 x345   production

server2  x999 anything

etc ...

 

Anyone know what type of foreach loop with a nested loop would produce such a result?

 

thanks

 

Thanks in advance

 

1 ACCEPTED SOLUTION

asulliva
5,246 Views

No worries!  Feel free to reach out here or on Slack, we have a channel specifically for PowerShell questions.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

11 REPLIES 11
Public