cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Setting the Environment Variable Azure IoT Hub

Alex23
12-Amethyst

Setting the Environment Variable Azure IoT Hub

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.

 

ACCEPTED SOLUTION

Accepted Solutions
cdovholuk
12-Amethyst
(To:Alex23)

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"

 

View solution in original post

5 REPLIES 5
cdovholuk
12-Amethyst
(To:Alex23)

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 

Alex23
12-Amethyst
(To:cdovholuk)

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".
cdovholuk
12-Amethyst
(To:Alex23)

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

Alex23
12-Amethyst
(To:cdovholuk)

I followed the example given by PTC Support here

When I add quote as

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 still have the same error....

 

I am working on Windows 10 (x64) machine.

cdovholuk
12-Amethyst
(To:Alex23)

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"

 

Announcements


Top Tags