To compress files in CMD, use compact /c /s:"directory" "filename" and expand "source" "destination" to extract. PowerShell's Compress-Archive and Expand-Archive cmdlets offer straightforward commands for compressing and extracting files, respectively, providing a simple and efficient way to manage file compression and extraction within Windows Terminal.