我尝试NetworkController使用 Powershell 在 Windows 2016 Server TP4 上的 docker 容器上安装 Windows 功能“ ”。运行“ Add-WindowsFeature NetworkController”后,我收到消息:
“您必须重新启动此服务器才能完成安装过程。”
当我现在使用 Get-WindowsFeature 再次检查(还没有做任何其他事情)时,它的安装状态为“InstallPending”。
现在我不确定“重新启动此服务器”是什么意思 100%,但我想这意味着我应该重新启动主机,因为没有其他东西可以重新启动(并且容器本身只是一个容器,而不是虚拟机)使用 Hyper-V 方法)。
所以我尝试以下方法:
方法 (1)
我使用 停止 docker 容器docker stop iisdemo,然后重新启动主机(我的 Windows 2016 服务器),然后使用docker start iisdemo.
但是当我检查 NetworkController 时,它仍然没有安装。
方法 (2)
在第二次尝试中,我添加了该功能,然后重新启动 docker 容器而不重新启动 Windows 2016 服务器,只需运行
dock restart iisdemo.
现在发生了一些奇怪的事情,当我尝试通过 来检查特征时Get-WindowsFeature *network*,收集数据的过程停止在 57% 并且容器本身存在。
当我再次附加到 docker 镜像时:
> docker start iisdemo
> docker attach iisdemo
> …Run Code Online (Sandbox Code Playgroud) 我在Windows 主机 (Windows Server 2016 TP4)上运行Windows 容器。
容器应在内部端口 80 上运行IIS 网络服务器,我还想将端口 80 绑定到主机,以便我可以通过主机 IP/URL 访问它。
我按照 Microsoft 的说明进行操作
我通过 Powershell 和 Docker 尝试了这两种方法,在这两种情况下,绑定到主机的端口都不起作用。
========================== Powershell 方法 ======================== ===
将容器主机部署到现有系统(Windows Server 2016 TP4)
PS C:> wget -uri https://aka.ms/tp4/Install-ContainerHost -OutFile C:\Install-ContainerHost.ps1
PS C:> powershell.exe -NoProfile C:\Install-ContainerHost.ps1
Querying status of Windows feature: Containers...
Feature Containers is already enabled.
Waiting for Hyper-V Management...
Networking is already …Run Code Online (Sandbox Code Playgroud) networking port-forwarding container docker windows-server-2016
它是运行 Windows Server 2016 Essentials 的服务器。Intuit 以其无限的智慧希望我在我们的文件服务器上运行这个命令:
netsh int ipv4 add excludedportrange protocol=udp startport=55368 numberofports=5
Run Code Online (Sandbox Code Playgroud)
我得到的错误信息是:
该进程无法访问该文件,因为它正被另一个进程使用。
那么有谁知道我们在谈论什么文件以及它可能打开了什么过程?
假设我想在基于“现代 UI”的操作系统(Windows 10 或 Server 2016+)上并行打开这两个窗口:
第一个,所以我可以监控升级过程,第二个,这样我就不会忘记在升级完成后重置屏幕自动关闭。
如何同时打开两个窗口?一旦我打开其中一个并通过开始菜单打开第二个,第一个就会被第二个替换。
我尝试手动启动“control.exe”,但那是“旧的、经典的”控制面板,Windows Update 在那里不再可用。
(幸运的是,电源选项在那里仍然可用,所以我能够通过在经典 UI 中打开电源选项来解决这个特定问题,但我仍然对一般问题的解决方案感兴趣。)
control-panel windows-update modern-ui windows-10 windows-server-2016
是否有任何编程方式可以强制 Windows 检查更新?我已使用 Windows Update API 安装了更新,但以下屏幕未更新。

Windows 更新 API 表示需要重新启动 -
PS C:\Windows\system32> $rebootRequired = (New-Object -ComObject "Microsoft.Update.SystemInfo").RebootRequired
echo $rebootRequired
True
Run Code Online (Sandbox Code Playgroud)
我以管理员身份尝试了以下命令,但没有一个刷新屏幕 -
wuauclt.exe /updatenow
wuauclt.exe /detectnow
Run Code Online (Sandbox Code Playgroud)
谢谢!
Windows 10 在我们用户的公司 PC 上运行,当他们尝试将文件从 PC 传输到 Windows Server 2016 时,会出现长路径名错误
用户不想扁平化文件夹结构,而是不断增加深度,结果显然是传输或删除数据时出错。
我试图解决这个问题,但没有办法,我个人使用 robocopy ,请帮忙?
windows windows-backup robocopy windows-10 windows-server-2016
我遇到 Windows Server 2016 上的任务计划程序在禁用并重新启用重复任务后无法运行的问题。
\n\n我创建了一个任务,其 \xe2\x80\x9cTriggers->Start\xe2\x80\x9d 为未来五分钟,并将该任务设置为每五分钟运行一次。选中\xe2\x80\x9cSettings->错过计划启动后尽快运行任务\xe2\x80\x9d 选项。
\n\n一切正常 \xe2\x80\x93 任务在计划的开始时间运行,然后每五分钟运行一次。
\n\n禁用该任务并等待五分钟以上。
\n\n启用该任务,它不会再次运行。
\n\n下次运行时间继续每五分钟更新一次,但任务不会运行,并且上次运行时间永远不会更新。
\n\n重新启用任务后,任务历史记录中不会出现任何条目,Windows 事件日志中也不会出现任何事件。
\n\n当第二天达到开始时间时,任务再次开始运行,但这并不可取,因为任务重新启用和开始时间再次到来之间可能存在很长的延迟。
\nWindows Server 2016 Technical Preview 5 (TP5) Hyper-V guest 报告其网络电缆已拔出。
出了什么问题,如何诊断根本原因并解决它?
virtualization hyper-v virtual-machine windows-server-2016 windows-10-v1607
container ×2
docker ×2
windows-10 ×2
ftp ×1
hyper-v ×1
modern-ui ×1
netsh ×1
networking ×1
powershell ×1
robocopy ×1
uninstall ×1
windows ×1