Использование регулярного выражения, вероятно, самое простое решение задачи.Это можно сделать в PowerShell:
$text = @'
-car:"Nissan" -Model:"Dina" -Color:"Light-blue" -wheels:"4" -windowSize.Front:"24"
'@
# assume parameter values do not contain ", otherwise this pattern should be changed
$pattern = '-([\.\w]+):"([^"]+)"'
foreach($match in [System.Text.RegularExpressions.Regex]::Matches($text, $pattern)) {
$param = $match.Groups[1].Value
$value = $match.Groups[2].Value
"$param is $value"
}
Вывод:
car is Nissan
Model is Dina
Color is Light-blue
wheels is 4
windowSize.Front is 24