I agree, and I got it to work with WMI as well. Mostly, I was just looking for some way of testing a CI with Powershell as the setting type. And then I started down the road of testing out the different data types and began to question my return values and the correct way to validate them. Sounds like I'm on the right track.
From: [email protected] [mailto:[email protected]] On Behalf Of Jason Sandys Sent: Tuesday, July 30, 2013 10:48 AM To: [email protected] Subject: RE: [mssms] DCM Discovery Script Return Value So, I do truly like PowerShell and advocate its use as often as possible, but why not use a WMI CI for this? In this case, it's much easier. J From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Ryan Sent: Tuesday, July 30, 2013 9:34 AM To: [email protected]<mailto:[email protected]> Subject: Re: [mssms] DCM Discovery Script Return Value Try setting it to boolean and simplify your script to this: (Get-Service -name <ServiceName>).Status -eq "Running" This will return a true if the statement is true, or false if the statement is false. Note, I've not done anything with Powershell and CI, so I can't say from experience that this will work. This is just how I'd approach it. On Tue, Jul 30, 2013 at 9:25 AM, Beardsley, James <[email protected]<mailto:[email protected]>> wrote: I never used DCM much in 2007 but in 2012, I want to use it a lot more. So I've been playing around with it and as a test, I set up a CI to check if a service is running by using a Powershell script. The script I'm using is this: If ( $(Get-Service -Name <servicename>).Status -eq "Running" ) { Write-Host "True" } Else { Write-Host "False" } I set the Data Type as "Script" and got it working but it got me thinking about using "Boolean" instead. If I were to use Boolean, would True/False be the current return value or would I need to use something else (like 0 and 1)? Is there any good documentation on each of the data types? Technet doesn't elaborate much on the different options. Like "Date and Time" for example, does it require a certain format? Or if my script was checking the version of a file and it returned "2013.1", would I use the Version data type or would I just use String? Also, I've used AutoIt a lot in the past for scripting. Is there any way to use that or maybe a .bat file as a discovery/remediation script? I'm assuming I'd have to use Jscript, VBScript, or Powershell to call the AutoIt script (which is compiled to an .exe) but just wanted to confirm that. Maybe there was a way through the SDK to add an additional scripting language. Thanks. ________________________________ IRS Compliance: Any tax advice contained in this communication (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties imposed under the Internal Revenue Code or applicable state or local tax law or (ii) promoting, marketing, or recommending to another party any transaction or matter addressed herein. ________________________________ Confidentiality Notice: This e-mail is intended only for the addressee named above. It contains information that is privileged, confidential or otherwise protected from use and disclosure. If you are not the intended recipient, you are hereby notified that any review, disclosure, copying, or dissemination of this transmission, or taking of any action in reliance on its contents, or other use is strictly prohibited. If you have received this transmission in error, please reply to the sender listed above immediately and permanently delete this message from your inbox. Thank you for your cooperation. ________________________________ IRS Compliance: Any tax advice contained in this communication (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties imposed under the Internal Revenue Code or applicable state or local tax law or (ii) promoting, marketing, or recommending to another party any transaction or matter addressed herein. ________________________________ Confidentiality Notice: This e-mail is intended only for the addressee named above. It contains information that is privileged, confidential or otherwise protected from use and disclosure. If you are not the intended recipient, you are hereby notified that any review, disclosure, copying, or dissemination of this transmission, or taking of any action in reliance on its contents, or other use is strictly prohibited. If you have received this transmission in error, please reply to the sender listed above immediately and permanently delete this message from your inbox. Thank you for your cooperation.

