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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Setting the Environment Variable Azure IoT Hub

Alex23
10-Marble

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
cdovholuk
6-Contributor
(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
6-Contributor
(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 

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
6-Contributor
(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

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
6-Contributor
(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"

 

Top Tags