Question) How do I get a DSC script resource to wait until the code has completed before moving on? (The code is invoke-expression "path\file.exe")
Details) I am using powershell version 5 and am trying to get DSC setup to handle our sql server installations. My manager has asked me to use the out of the box DSC components. i.e. no downloading of custom modules which may help. I have built up the config file that handles the base server build - everything is good. The script resource that installs sql server is good. It executes, and waits until it has installed completely, before moving on. When I get up to the script resource that installs the sql server cumulative update, I have issues. The executable gets called and it starts installing (it should take 10-15 minutes), but the dsc configuration doesn't wait until it has installed, and moves on after a second. This means that the DependsOn for future steps, gets called, before the installation is complete. How can I make the script resource wait until it has finished?