The RemoveAllJobSteps method removes all system records maintaining steps executed by the referenced SQLServerAgent job.
object.RemoveAllJobSteps( )
object
Expression that evaluates to an object in the Applies To list
HRESULT RemoveAllJobSteps();
A SQLServerAgent job is enabled once it has at least one step and an execution target. Successful execution of the RemoveAllJobSteps method disables the referenced SQLServerAgent job, and SQL-DMO empties the JobSteps collection of the Job object used. To reenable the referenced job using SQL-DMO, create JobStep objects and add them to the JobSteps collection of the Job object. For more information, see JobStep Object.