Powershell 如何在NanoServer上安装根证书
有一些指南显示了如何做到这一点,但它们来自不久前,我似乎找不到他们所指的实用工具certoc.exe。这是否已从nanoserver的更高版本中删除 有人知道我应该在哪里得到这个工具吗 我在这里发现了另一个小线索 在nano服务器中可以使用Import-Certificate命令。虽然我也没有找到 欢迎任何帮助,干杯Powershell 如何在NanoServer上安装根证书,powershell,docker,nano-server,Powershell,Docker,Nano Server,有一些指南显示了如何做到这一点,但它们来自不久前,我似乎找不到他们所指的实用工具certoc.exe。这是否已从nanoserver的更高版本中删除 有人知道我应该在哪里得到这个工具吗 我在这里发现了另一个小线索 在nano服务器中可以使用Import-Certificate命令。虽然我也没有找到 欢迎任何帮助,干杯 PS C:\> docker run microsoft/nanoserver:1803_KB4338819 certoc.exe C:\Program Files\
PS C:\> docker run microsoft/nanoserver:1803_KB4338819 certoc.exe
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 3f732602c6d8fbbf9370613971a7f40993a54bc33870d3040bf5e9c2fec8969c encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"CommandLine":"certoc.exe","User":"ContainerUser","WorkingDirectory":"C:\\","CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}.
PS C:\> docker run -it microsoft/powershell:6.0.4-nanoserver-1803_kb4338819 certoc.exe
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 285d821dccac930df5681e73842f8ce2bac812f361a6b9d14b00dcb4901a9141 encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"CommandLine":"certoc.exe","User":"ContainerUser","WorkingDirectory":"C:\\","Environment":{"PSCORE":"C:\\Program Files\\PowerShell\\pwsh.exe","ProgramFiles":"C:\\Program Files"},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[42,249]}.
PS C:\> docker run microsoft/powershell:6.0.4-nanoserver-1803_kb4338819 pwsh -Command "Get-Help Import-Certificate"
Get-Help : Get-Help could not find Import-Certificate in a help file in this session. To download updated help topics type: "Update-Help". To get help online, search for the help topic in the TechNet library at https://go.microsoft.com/fwlink/?LinkID=107116.
由于某种原因,certoc.exe已从1709和1803中删除。如果您想在图像上显示它,可以从
microsoft/nanoserver:sac2016
FROM microsoft/nanoserver:sac2016 as tool
FROM microsoft/dotnet:2.1-runtime-nanoserver-1709
COPY --from=tool /Windows/System32/certoc.exe .