In previous versions of the SharePoint platform, you would use the STSADM.exe administration tool to perform command line scripting. While STSADM.exe is still available for use within the SharePoint Foundation tool, the preferred tool for command-line scripting is Windows PowerShell, which is a new tool from Microsoft that complements Cmd.exe in Windows administration context. Going forward, you should use PowerShell scripting when developing any new command-line scripts in SharePoint Foundation 2010.
INSIDE OUT Phasing out STSADM
Although STSADM is still available within SharePoint Foundation, it is deprecated and will not be available in the next version of SharePoint.