David Rueter (5/8/2013)
Thanks for chiming in. I'm a big fan of yours and have learned a lot from you.
FYI, the attached script does in fact check the status of xp_CmdShell and Ole Automation, and returns them to their original settings.
(Between trying to simplify some things for the article and some later edits to the code, the code excerpts in the article are not identical to the attached script.)
If you (or anyone else) finds any problems or errors, please let me know.
Hoo-boy. I've got to get my eyes checked.
Apparently I looked at only the dynamic code and not the "IF" qualifiers nor the capture of the original settings. My most sincere apologies. You're absolutely correct.
The good part about me missing that and being made aware of my mistake is now there's nothing in the article that I take grand exception to. :-) Well done!
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is usually not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs