Environment
- System: Win11 (sudo enabled)
- Terminal: PowerShell (non-privileged)
- PHP: 8.4.12 (installation directory:
C:\Program Files\php-8.4.12-Win32-vs17-x64)
- PIE: 1.3.10 (wrapped into a
pie.bat script @php "%~dp0pie.phar" %* so I can call it from the terminal (Windows finds it in the system path), both pie and bat scripts are in the same directory as mentioned above)
Description
I tried to install xdebug on my Windows machine, but it failed on the step where sudo had to move some files. While mv works just fine on Windows, using it with sudo somehow doesn't (I'm not familiar with sudo on Windows)
Example
PS C:\Users\me\Downloads\testtt> sudo mv .\source\file.txt .\target\file.txt
Command not found
PS C:\Users\me\Downloads\testtt> mv .\source\file.txt .\target\file.txt
PS C:\Users\me\Downloads\testtt> cd .\target\
PS C:\Users\me\Downloads\testtt\target> ls
Directory: C:\Users\me\Downloads\testtt\target
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 18.03.2026 18:52 0 file.txt
This was the exact error I saw when trying to install xdebug (Command not found).
Screenshots
Workaround
What helped was running a PowerShell as an Administrator:
