- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Getting unicode object does not support item assignment error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2021 08:03 PM
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
Solved! Go to Solution.
Re: Getting unicode object does not support item assignment error
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2021 07:28 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2021 08:18 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2021 01:18 PM