Author Posts

November 5, 2014 at 3:00 am

Hello,

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?

November 5, 2014 at 6:46 am

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.

November 5, 2014 at 7:24 am

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

Thank you for the help!

November 5, 2014 at 2:46 pm

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. http://www.scriptrock.com/blog/guardrail-diary-post-1-connect-and-scan-linux-server-using-ssh