$myJson = Get-Content .\test.json -Raw | ConvertFrom-Json $myJson.Accounts.Users.asmith.department = "Senior Leadership" $myJson | ConvertTo-Json -Depth 4 | Out-File .\test.json