Unfortunately I don't think there's an easy way to get to this in Prompt at the moment (although annoyingly we do already have the code in place since you can script multiple invalid objects in the "Find Invalid Objects" page). We do have a related uservoice request
for scripting things from the object explorer so please add your vote to it.
In the meantime you could use SQL Compare to create a scripts folder from your database then navigate to the folder and copy the scripts out. A guide for how to do so can be found here