mardi 28 avril 2020

values in this csv are not being edited - Powershell

$users = Import-Csv -Path "C:\scripts\door-system\test\testChange.csv" -Encoding UTF8 $users | ft

$output = forEach ($user in $users) {

if ($user.GroupName -like "Normal")
{
    $output.GroupName = "edited"
}

}

$output | export-csv .\modified.csv -noTypeInformation

Aucun commentaire:

Enregistrer un commentaire