Demos are one of the most fun parts of presenting, and one of the riskiest. This is because the demo gods have two options. They can smile upon you and give you a perfect demo, or they can piss all over you and your demo can crash and burn. How you handle those demo failures shows how good of a speaker you really are.
If you are able to recovery from the failure and fix the problem without anyone noticing the problem, you are a master speaker. If you point out the failure, then work around it, you’re pretty good (this is where I usually fall in the demo failure recovery event). If you stumble from the failure and get stuck and can’t continue, you need to practice your demos more (or not use demos if you can get away from it).
There’s a few ways to avoid demo failure. The easiest is to avoid demos. If possible stick to screenshots, they can’t fail you and you don’t have to drop out of the PowerPoint to get to them. Many demos out there don’t really need to be demos. If all you are doing is showing code, and the output I can do that with screenshots. Or at the very least have screenshots handy in a hidden slide so that if the demo fails you can toss them up on the screen to show how it’s supposed to work.
Another way to avoid demo failure, is to not type in the demo. People laugh when I (and others) say to never type in a demo, but we aren’t kidding. When you are on stage presenting you are nervous and odds are you’ll hit a key wrong and get a lovely error on the screen when you shouldn’t. Have all the code you’ll be using pre-written (and tested) so you can just open it and show it, then run it. The same goes for T-SQL scripts, PowerShell scripts, etc. Just open the script, show it, and run it. (And when showing PowerShell scripts don’t use the PowerShell prompt, use the damn ISE so the audience can read the screen.)
My final suggestion is to use something like DemoMate to record the demos ahead of time. This way if there’s a demo failure you can show the recorded version of it working. Now don’t plan on just using DemoMate and never showing an actual demo because that won’t fly with your audience. But if the demo blows up you need a way to get your point across.