That depends on what scope you're using and how you connect to it. It's very common to have GPIB (IEEE-488.2) connection to a scope. The manufacturer will publish a list of commands for the scope.
See my answer to your earlier question here.
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000004BA50000&UCATEGORY_0=_318_&UCATEGORY_S=0