Avatar of Si Walton
Si Walton
 asked on

Powershell script to search a CSV file for numbers in a Column

Hi All

I am working on a project in Powershell to show the output of various share drives in HTML

I need to find a way to search Column 2 for various values from 0 to 2048 and add the following after each one depending on the value.

0-99 Red
100-199 Amber
200-2048 Green

Example below

Column 1      Column 2      Column 3      Column 4
Unc Path_1      18      sharename_1      2048
Unc Path_2      98      sharename_2      2048
Unc Path_3      12      sharename_3      2048
Unc Path_4      18      sharename_4      2048
Unc Path_5      4      sharename_5      2048
Unc Path_6      41      sharename_6      2048
Unc Path_7      72      sharename_7      2048
Unc Path_8      12      sharename_8      2048

Thank you for looking and hopefully you can help me.

Si
PowershellProgrammingMiscellaneous

Avatar of undefined
Last Comment
Si Walton

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
oBdA

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Si Walton

ASKER
Thank you oDba

Thats works a treat

Si
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23