I recommend using the tree /f
command if you just wanted to see what dir /s/b
did for you while in a powershell console:
C:\test>tree /f C:. ├───a ├───anotherdir │ somefile.txt │ somefile2.txt │ somefile3.txt │ └───anotherdir2
If you are writing a script or something I like the answer @Bob gave:
(dir -r).FullName