Trying to run the SharePoint tool stsadm.exe in PowerSehll I get the following error:

The term 'stsadm.exe' is not recognized as a cmdlet, function, operable program, or script file


To get stsadm.exe to work in PowerShell you have to edit the 'profile.ps1' file.
Look in C:\WINDOWS\system32\windowspowershell\v1.0\ and if it doesn't exist just create a new file and add the following code:

Set-Alias -Name stsadm -Value $env:CommonProgramFiles”\Microsoft Shared\Web Server Extensions\12\BIN\STSADM.EXE”


Now you can use stsadm in Powershell without it buggering up.

 

http://2000mph.blogspot.com/2008/02/sharepoint-stsadmexe-and-powershell.html