Index operation failed; the array index evaluated to null. At line:32 char:9 + $dureeNote = $durees[$ligne.DuréeNote] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArrayIndex Exception calling "Beep" with "2" argument(s): "Positive number required. Parameter name: duration Actual value was 0." At line:35 char:9 + [console]::beep($frequenceNote, $dureeNote) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ArgumentOutOfRangeException Start-Sleep : Cannot validate argument on parameter 'Milliseconds'. The argument is null, empty, or an element of the argument collection contains a null value. Supply a collection that does not contain any null values and then try the command again. At line:39 char:39 + Start-Sleep -Milliseconds $ligne.DuréePause + ~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Start-Sleep], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.StartSleepCommand