smbclient -L '\\\\server-name' -U username -W DOMAIN
# Logs into server to type commands
smbclient '//server-name/sharename$' -U username -W DOMAIN
# Logs in, runs 'ls' command and disconnects
smbclient '//server-name/sharename$' -U username -W DOMAIN -c ls
# Other parameters:
-d99 = debug output
-D directory = start from directory
# Commands
get = just like FTP
See also smb2www (perl) and smb2www (c).