I haven't had any experience with Cmdlet development, but I can take a couple of guesses:
- There is a StopProcessing() method (
http://msdn.microsoft.com/en-us/lib....85).aspx) and a Stopping property (http://msdn.microsoft.com/en-us/library/system.management.automation.cmdlet.stopping(v=VS.85).aspx) that you can maybe use.
- You can throw a FileNotFoundException which will stop the execution of your code.