Hallo
ich möchte bestimmte Wörter in CSV-Datei ädern aber es klappt nicht.
$BenutzerListe = C:\Users\Administrator\Documents\Benutzer.csv $myPatern = "Microsoft.ActiveDirectory.Management.ADPropertyValueCollection" $meinPassword = "Pa$$wort" Get-Content -Path $BenutzerListe | foreach { if($_ -match $myPatern) { $_ -replace $myPatern, "$meinPassword" } }
Und Die Fehlermeldung auch
Get-Content : Cannot bind argument to parameter 'Path' because it is null. At line:5 char:19+ Get-Content -Path $BenutzerListe | foreach {+ ~~~~~~~~~~~~~~+ CategoryInfo : InvalidData: (:) [Get-Content], ParameterBindingValidationException+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.GetContentCommand
Anscheinend wird die Datei nicht gelesen.
Wie behebe ich diese Fehlermeldung?