I tried the delete() command in wlst, but that did not work:
wls:/EBS_domain_PROD/edit/Machines !> delete('slc01ouc_5','Machine')
Traceback (innermost last):
File "<console>", line 1, in ?
File "<iostream>", line 549, in delete
File "<iostream>", line 1847, in raiseWLSTException
WLSTException: Error occured while performing delete : Error while deleting an MBean
Use dumpStack() to view the full stacktrace
wls:/EBS_domain_PROD/edit/Machines !> dumpStack()
This Exception occurred at Thu Dec 12 14:05:59 EST 2013.
wls:/EBS_domain_PROD/edit/Machines !> ls()
There are resources like instances, etc.. that are still attached to the machine. You will need to unassign them all from the machine before you can delete the machine.
As a tip, if your goal is to be able to script it, but you don't mind using the console to generate the script itself, or a working script template to further customise, you might want to enable 'recording' in the console, and then do the deletion of the machine. Every step you make to delete the machine will be added to a generated .py script which you can then use as a sample.