If you would like a complete breakdown of the script and the results I have obtained so far, you can reference my previous post.
Import the items from the pipeline in to an array
I am trying to figure out how to get only the two fields I need from the array, so I can manipulate the data. Right now the array shows the entire line as the first element in the array.
$Date = (Get-Date -format "MM-dd-yyyy")
$DateTime = (Get-Date)
$Projects = Import-Csv c:\temp\pm_project.csv
#Show me the entire list of Projects
$Projects
$TS_Entries = Get-Content "c:\temp\timesheet\$Date.txt"
#Show me all the chosen entries in the text file
$TS_Entries
#Show me only the lines in the text file that match the regex statement
$TS_Entries = Select-String -Path "C:\temp\TimeSheet\$Date.txt" -Pattern '(?>FOAH|PRJ)\d{1,10}' -allmatches | Select-Object -expand matches | Select-Object -expand Value
$TS_Entries
$TS_Entries | group -NoElement
I cannot seem to utilize the count element in the array. I need to get a value of each value in Count and multiply them by 15. The only thing I can reference in the list below is Name
Count Name
----- ----
2 FOAH278
1 FOAH519
1 FOAH704
3 FOAH718
2 FOAH780