To list hidden files in CMD, use the command dir /A:H. In PowerShell, the equivalent command is Get-ChildItem -Force, which reveals hidden files and directories in the listing by overriding the default behavior to hide certain items.