Let's say you get a winexe or wmiexec shell to a SQL server. Maybe you want to extract the top 10 rows of some juicy looking table. Maybe you need to exfil it to your HTTP server and are yolo'ing it. The following may help you:
Output the top 10 records of a SQL table using osql:
Post the file to a URL using powershell:
Set up a an HTTP server to receive the file, or just ncat -l it.
Oh, want to use domain fronting? use this powershell line instead: