I use DSC, and try to read txt file and get it output to the console, and frankly - futile.
I have tried to use Script resource, but neither GetScript no SetScript helped to me.
Maybe do you guys know any way, how to read any text file and sent content to the console?
Sorry if similar question has been already discussed.
Many thanks to all
The
Scriptresource is indeed the way to perform ad-hoc tasks such as reading a text file and sending its content to the console. However, keep in mind that DSC is primarily designed to ensure system configurations rather than typical scripting tasks like console output.Here's a basic example of how you can use the
Scriptresource in DSC to read a file and print its contents: