After downloading the BCP utility to sql server, I ran this code to allow me to run the BCP from inside SSMS:
EXEC sp_configure 'show advanced options', 1
EXEC sp_configure 'xp_cmdshell', 1
"select top 5 patientid from tpsqldb1.cdw.dbo.pmview"
"c:\users\pmckann\documents\test.csv" -T t, -S TPSQLDB1\MSSQLSERVER
OK. Qashif Kureshi had a good answer but I want to be more specific about why my original code didn't work. You can't separate out the lines of the bcp command. It must be in a single line. Also, I removed the -S line.:
EXECUTE master..xp_cmdshell 'bcp "select top 5 * from cdw.dbo.pmview" queryout C:\temp\test.csv -t, -c -T '
Thanks everybody for your help.