Because you are new to Powershell, I'm showing you two alternative ways of framing the problem. These might help you get used to some of the features of powershell.
$Email = '[email protected]'
$mytext = @"
"User Name","Skill Name","Level"
"$Email","T1","4"
"$Email","T2","6"
"$Email","T3","7"
"$Email","Training","1"
"$Email","Supervisor","8"
"@
$mytext | Out-file Mycsv.csv
Here, I just set up the Email variable, then create one big here string with the header and the five data records in it. Because I used double quotes on the here string, the variable $Email will be detected inside of it. A here string with single quotes would not have behaved correctly.
Then, I pass $mytext through a pipeline one line at a time, and Out-file collects all this into a file.
Here's the second approach:
$Email = '[email protected]'
$myarray = @(
[PsCustomobject]@{"User Name" = $Email; "Skill Name" = "T1"; "Level" = 4}
[PsCustomobject]@{"User Name" = $Email; "Skill Name" = "T2"; "Level" = 6}
[PsCustomobject]@{"User Name" = $Email; "Skill Name" = "T3"; "Level" = 7}
[PsCustomobject]@{"User Name" = $Email; "Skill Name" = "Training"; "Level" = 1}
[PsCustomobject]@{"User Name" = $Email; "Skill Name" = "Supervisor"; "Level" = 8}
)
$myarray | Export-Csv myothercsv.csv
Here, I set up the variable Email, then create an array of custom objects, each with the same named properties.
Then I pass the array through a pipeline to Export-Csv which converts everything to Csv format. It's worth noting that Export-Csv V5 throws in a line that says #TYPE in it. This is not hard to eliminate, using the notype parameter if desired. It's also worth noting that the double quotes in the output file were all added in by Export-csv, and weren't copies of the double quotes in the script.
Edit. Pipelines are a surprisingly easy and flexible way of getting things done in powershell. For this reason, cmdlets like Out-File and Export-Csv are built to work well with pipelines supplying a stream of input. A lot of loop control, initialization, and finalization busy work is being handled behind the scenes by PS.
Export-Csv?