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
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.
Solved! Go to Solution.
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"
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".
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.
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"