Powershell-with-Filesystem-bat-vs-cmd

New Quote from Wikipedia
The only known difference between .cmd and .bat file execution is that in a .cmd file the errorlevel variable changes even on a successful command that is affected by command extensions (when command extensions are enabled), whereas in .bat files the errorlevel variable changes only upon errors.
The differences between .CMD and .BAT as far as CMD.EXE is concerned are: With extensions enabled, PATH/APPEND/PROMPT/SET/ASSOC in .CMD files will set ERRORLEVEL regardless of error. .BAT sets ERRORLEVEL only on errors.