Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps

Reply

Getting unicode object does not support item assignment error

New Member
Posts: 3
3124     0
Hi Team,

I written basic powershell code to add a host.
But getting Admconerror: none ('unicode' object does not support item assignment) internal error.

Please share your inputs if you come across this error

Re: Getting unicode object does not support item assignment error

Moderator
Moderator
Posts: 290
3124     0

Could you please post a code example so we can provide insight.  Be sure to use code tags to make it readable in the forum.

Re: Getting unicode object does not support item assignment error

New Member
Posts: 3
3124     0

Please find pseduo code below

<p>

<code>

$Creds = Get-Credential

$URL = https://x.x.x.x/wapi/v2.7.1/record:host

$data = '{"ipv4addrs":[{"ipv4addr":"y.y.y.y"}],"name":"test.acme.com","view":"default"}'

$data = $data | ConvertTo-Json

INvoke-RestMethod -uri $URL -Method POST -Credential $creds -Body $data -contenttype 'application/json'

</code>

</p>

Re: Getting unicode object does not support item assignment error

New Member
Posts: 3
3125     0
Fixed the issue. Explicitly declare @[pscustomobject]. Thank you.
Showing results for 
Search instead for 
Did you mean: 

Recommended for You