Hello, this may be a simple question but it is one that I am having trouble with since I am fairly new to PowerShell.
I have a program which grabs specific columns from groups and puts them into a .csv file. To give an example but not specific property types:
Get-Childitem | Format-Table -Property groupname, columna | Export-csv groupname.csv
The groupname.csv is where I am trying to run a separate alias run inside this pipeline. I want this alias to grab the groupname and make it be the filename. However, I also want it to grab only the names associated with its group.
Group 1——————-Name 2
Group 2——————-Name 3
Group 2——————-Name 4
Get-Childitem | Format-Table -Property groupname, columna
Intended Alias Example:
- Grabs the groupname and all names from Column A that are in Group 1 to export to the .csv
- the .csv file is named after the Group 1 name (it grabs it)
- Repeats/Loops for Group 2 and on.
Can Anyone help?