I have been searching for a solution for a month now. The issue I am facing is that when using Windows PowerShell on Windows 10 (version 1909), I cannot type “docker” alone, I need to type “docker.exe”. However, in Windows PowerShell (x86), “docker.exe” works perfectly fine.
The command “Get-ExecutionPolicy” shows that it is set to “Unrestricted” for both instances.
$ENV:ExtPath
is .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
for both.
$ENV:Path
is the same for both:
C:\Python27\;C:\Python27\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\ProgramData\chocolatey\bin;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files\OpenSSL\bin;;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\me\AppData\Local\Microsoft\WindowsApps;C:\Users\me\AppData\Local\Programs\Fiddler;C:\Users\me\.dotnet\tools;C:\Users\me\AppData\Roaming\npm
$PSVersionTable
is the same for both:
Name Value
---- -----
PSVersion 5.1.18362.628
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.628
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
However, it seems to only affect docker
.
3 Answers
It took me some time to examine the situation. The problem was occurring after searching in the directory C:\windows\system32, but a program like OpenSSL was not affected by it. Eventually, I discovered that there was a blank file in C:\windows\system32 with the name “docker”. Once I removed that file, the issue was resolved and the program started functioning correctly.