when I open a command prompt
You are on a wrong track. You didn't opened a simple CommandBox, but a PowerShell box.
In PowerShell knowns "dir" as alias for the CmdLet "Get-CildItem", but that alias don't support switches like the DOS command dir.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am running windows 11 in oracle virtualbox 6.1.38
when I open a command prompt and type "dir" it woks as expected, but when I try to add switches ie "dir /s" I get this error: (also does this in administrator mode)
dir : Cannot find path 'C:\s' because it does not exist.
At line:1 char:1
+ dir \s
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\s:String) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommandt
when I open a command prompt
You are on a wrong track. You didn't opened a simple CommandBox, but a PowerShell box.
In PowerShell knowns "dir" as alias for the CmdLet "Get-CildItem", but that alias don't support switches like the DOS command dir.