Is it possible to install and import DSC resource in the same file


Is it possible to somehow use single powershell script to both install a module which contains DSC resources as well import those into DSC configuration block in the same file. Right now I have to do installation first and then call & “step2.ps1” file which contains Configuration block. I’d like to keep entire process in single file, is it possible somehow?

Nope. But, if you’ve configured the LCM to use a pull server (which can just be a file share), it can automatically download and install any needed resource modules.

Well it’s PIA since it precludes just sending configuration script in email or providing internal GitHub link to configuration file for people to use during imaging process.