I’m starting to use the script resource quite a bit, and after writing a few resources I realize that there is no “Ensure = Present/Absent”
My question is, how are people handling this?
I’m trying to write my DSC script so that I can set a variable at the top:
The idea being that I can use the same script to generate a mof to build a server, and also to generate a mof to revert a server.
Has anyone else tackled this already?
I’m thinking I could use my $Action as a switch statement in both the Test and Set actions to either ensure the result is present or absent.
Q: In general are people doing this, or is this a waste of time?