Running PowerShell Scripts from a Management Pack - Part 1
Brian Wren: Considering all my work with OpsMgr management packs and my infatuation with PowerShell, it's surprising that I've never put the two together in a public forum. I keep meaning to, just don't ever seem to get there. I finally committed myself to this blog post while sitting at my local It's a Grind (that's a coffee house to all you Seattle Starbucks fans. It's a Grind was born in Long Beach, and I am fanatically loyal to my home town).So here's the basic question - can I use a PowerShell script in an OpsMgr management pack? In other words, can I execute a PowerShell script from a rule, monitor, diagnostic, recovery, or task? The answer is absolutely you can, but there are some considerations to keep in mind. First let's cover those considerations, then we'll get to concepts and code. If you just want the modules to copy and paste into your MP, go ahead and jump to the end.(continue at source)








