Nov 17 2018
12:09 PM
- last edited on
Apr 07 2022
05:32 PM
by
TechCommunityAP
Nov 17 2018
12:09 PM
- last edited on
Apr 07 2022
05:32 PM
by
TechCommunityAP
Hi There,
I want to install OMS extension on Linux VMs using Azure CLI and for this I am using below code. But not sure why there are two values with workspaceKey and omskey as well as workspaceId and omsid.
are they referring any two different key and IDs?
az vm extension set \
--resource-group myResourceGroup \
--vm-name myVM \
--name OmsAgentForLinux \
--publisher Microsoft.EnterpriseCloud.Monitoring \
--version 1.7 --protected-settings '{"workspaceKey": "omskey"}' \
--settings '{"workspaceId": "omsid"}'
Nov 17 2018 12:42 PM
Nov 17 2018 11:31 PM - edited Nov 17 2018 11:33 PM
Hi Travis,
I just missed : in the script, Now able to understand it properly.
But whenever i tried to execute this script i am getting "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)" error on screen.
Could you please help me to fix this. I have also attached screenshot for further reference : -
Nov 18 2018 04:19 PM
The only thing that I noticed is the examples in MS Docs only shows single quotes around protected-settings and settings. Try removing them from the rest?
Nov 19 2018 01:24 AM
Tried but no luck, same as earlier.
Apr 23 2019 09:37 AM
This is an old thread and I am not sure if you already found a solution. But I wanted to reply just in case you haven't.
Running a CLI command in PowerShell, the double quotes are handled differently. You need to add back-slash escape characters before the double quotes. Example below.
.......
--protected-settings '{"workspaceKey": \"omskey\"}' \
--settings '{"workspaceId": \"omsid\"}'
Hope this helps
Apr 26 2019 10:47 AM
@asimvirtual Thanks for the reply, I will give a go and get back to you.