Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Modify JSON array with Powershell

$
0
0

Hey Guys,

I am trying to modify a property in a JSON array with Powershell but I can't seem to get it to work.

I can retrieve the property I want to update but when I try to update it it says the property cannot be found...

So far I have used ConvertFrom-Json to bring the info into a PSObject and then tried using

Powershell
$newconfig.AllowSSH='false'

Which results in:
Text
The property 'allowssh' cannot be found on this object. Verify that the property exists and can be set. 
However, if I call the property it returns fine:
Powershell
$newconfig.AllowSSHTrue
Any ideas?

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images