A surgical instrument can comprise a handle including a battery cavity and electrical contacts and, in addition, a battery removably positionable in the battery cavity. The battery is configured to engage and supply power to the electrical contacts when the battery is operably seated in the battery cavity. The handle further comprises diagnostic means for assessing whether the handle is in a suitable operating and a battery lockout configured to permit the battery from being operably seated in the battery cavity if the diagnostic means determines that the handle is not in a suitable operating condition. Additionally or alternatively, the handle can comprise a battery lock configured to prevent the battery from being disengaged from the electrical contacts when the handle is transmitting an operating motion to a shaft assembly attached to the handle, for example. Either one system or two systems can comprise the battery lockout and battery lock.