无法在Windows Server上卸载IoT Edge

我需要将Windows上的IoT Edge设备从一个IoT中心交换到另一个。我了解当前的逻辑迫使我卸载IoT-Edge并重新安装。 问题是尝试运行此脚本时出现以下错误:

{Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; `
Uninstall-IoTEdge

我得到这个回报:

无法在Windows Server上卸载IoT Edge

Invoke-Native : The term 'cmd' is not recognized as the name of a cmdlet,function,script file,or operable program.
Check the spelling of the name,or if a path was included,verify that the path is correct and try again.
At line:1748 char:28
+ ... ersString = Invoke-Native "$dockerExe ps --all --format ""{{.ID}}"""  ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (cmd:String) [Invoke-Native],CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Invoke-Native

Powershell被提升为Admin。我是否缺少一些PATH变量?有任何想法吗?

caoxh1975 回答:无法在Windows Server上卸载IoT Edge

请在PowerShell窗口中的命令下面运行并共享结果?

  1. 获取命令“ docker.exe”
  2. 写主机$ env:ProgramFiles \ iotedge-moby 检查路径是否存在。
  3. 您知道您安装了哪个版本的iotedge服务吗?如果该服务正在运行,则可以运行“ iotedge版本”进行查找。
,

感谢您的建议,但通过此脚本的帮助删除了docker,从而设法找到了解决方法:

https://success.docker.com/article/how-to-completely-remove-docker-in-windows-10

与IOT Edge版本一样,它是1.0.7和1.0.8。在Node-Red MQTT节点的透明网关模式下不起作用(建议MS等待1.0.9修复该错误)。

本文链接:https://www.f2er.com/3138559.html

大家都在问