schlawiner
Mitglied
Ich versuche unter Powershell eine config.txt zu ändern
in dem Falle die Ports
vieleicht hat jemand eine Idee was ich falsch mache
Code:
{
"udpPort": 9231,
"tcpPort": 9232,
"maxConnections": 85,
"configVersion": 1
}
in dem Falle die Ports
vieleicht hat jemand eine Idee was ich falsch mache
Code:
$pathToJson = "configuration.txt"
$jsonstr = Get-Content settings.txt | ConvertFrom-Json
$jsonstr.udpPort= "test"
$json = $jsonstr | ConvertTo-Json
echo $json > settings.txt
Get-Content settings.txt