I have a file called test.csv, Data in the file is looking like this:
ServerName,Software
"server1.domain.com","Security Update for Windows Server 2003 (KB890046)"
"server1.domain.com","Security Update for Windows Server 2003 (KB893756)"
"server2.domain.com","Microsoft .NET Framework 3.5 SP1"
"server2.domain.com","Microsoft SQL Server 2005"
"server3.domain.com","Security Update for Windows Server 2003 (KB916281)"
"server3.domain.com","Security Update for Windows Server 2003 (KB917159)"
I want to split it into files for each server using "ServerName" as file name and containing the data from the "Software" column
I would like the output to look like this:
file: server1.domain.com.csv
Security Update for Windows Server 2003 (KB890046)
Security Update for Windows Server 2003 (KB893756)
file: server2.domain.com.csv
Microsoft .NET Framework 3.5 SP1
Microsoft SQL Server 2005"
file: server3.domain.com.csv
Security Update for Windows Server 2003 (KB916281)
Security Update for Windows Server 2003 (KB917159)
I'm new to Powershell and can't work out how to do it. Thanks.