Can i use DSC to just get values?

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Greg Pollock Greg Pollock 2 years, 7 months ago.

  • Author
  • #20336
    Profile photo of Marcus


    I just started to look at DSC and i was wondering if i can use the DSC resources and commands to just get some values, and put them into a txt file?
    What i want to acomplish by this is to look on a machine which applications it have installed. I know i can run with the wmi commands to do this, but of what I can understand DSC is supposed to be a simpler script language to use? might be wrong in that prospective, I am quite new to powershell.
    So my question is can I for example call the "package resource" and get the values of a application into a txt file, without having to either install the application or no do nothing if the application exists? Or get values from the registry to see if the application is installed?
    Or is DSC used for deploying and configure applications or adding things if it doesn't find it?

  • #20344
    Profile photo of Dave Wyatt
    Dave Wyatt

    Technically you might be able to accomplish this, but I don't think it would be any easier than writing the equivalent PowerShell script. The DSC resources that exist today all configure the system in some way; there's no concept of a "Read-only" DSC configuration or resource.

  • #20349
    Profile photo of Marcus

    Okey, my thoughts exactly after googling around about the topic!

    Thank you for the help!

  • #20372
    Profile photo of Greg Pollock
    Greg Pollock

    If you'll excuse the self-promotion, I work at ScriptRock on an application that does exactly what you describe. It reads the state of a machine and tells you what's installed (and it's free for up to five servers). This post describes how to connect a linux box but it's almost exactly the same if you're working in Windows.

You must be logged in to reply to this topic.