Skip to main content
1-Visitor
April 30, 2018
Solved

Setting the Environment Variable Azure IoT Hub

  • April 30, 2018
  • 1 reply
  • 2511 views

Hi,

 

I am trying to connect Azure IoT Hub to thingworx and I am facing a problem when I need to set the environment variable. When I run this line into the shell :

set AZURE_IOT_OPTS=-Dconfig.file=C:\Thingworx-Azure-IoT-Hub-Connector-2.0.0.141\connector\conf\azuire-iot.conf
-Dlogback.configurationFile=C:\Thingworx-Azure-IoT-Hub-Connector-2.0.0.141\connector\conf\logback

I have an error :

 -Dlogback : The term «-Dlogback » is not recognized as a cmdlet, function, operable program, or script file. 

Thanks.

 

Best answer by cdovholuk

you have added too many quote. just 2 are needed:

 

set AZURE_IOT_OPTS=-Dconfig.file="C:\Thingworx-Azure-IoT-Hub-Connector-2.0.0.141\connector\conf\azuire-iot.conf -Dlogback.configurationFile=C:\Thingworx-Azure-IoT-Hub-Connector-2.0.0.141\connector\conf\logback"

 

1 reply

5-Regular Member
April 30, 2018

if there's spaces you need to properly 'quote' the line:

 

set AZURE_IOT_OPTS="-Dconfig.file=C:\Thingworx-Azure-IoT-Hub-Connector-2.0.0.141\connector\conf\azuire-iot.conf
-Dlogback.configurationFile=C:\Thingworx-Azure-IoT-Hub-Connector-2.0.0.141\connector\conf\logback"

Pretty sure that will fix it 

Alex231-VisitorAuthor
1-Visitor
April 30, 2018

Thank you but now I have another error, in fact when I run

set AZURE_IOT_OPTS=-Dconfig.file=C:\Thingworx-Azure-IoT-Hub-Connector-2.0.0.141\connector\conf\azuire-iot.conf -Dlogback.configurationFile=C:\Thingworx-Azure-IoT-Hub-Connector-2.0.0.141\connector\conf\logback

with a single space between azure-iot.conf and -Dlogback I have this error:

 

Set-Variable : A parameter cannot be found that matches parameter name "Dlogback".
5-Regular Member
April 30, 2018

The response you posted doesn't seem to be properly quoted yet. Did you add a quote after the equals sign and at the end of the line