Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Solve PowerShell Dependency Within Function Problems

$
0
0

Q: I have a PowerShell file with a Desired State Configuration that relies on a module that I copy earlier in the script. When I try to run the file, I receive an error message saying the module isn't found. What should I do?

A: Typically, when a PowerShell script is executed, any functions found in the script are executed, and then the actual logic of the script executed. This might be a problem if you have Desired State Configurations (DSCs) that rely on modules that might not have been copied to the local machine but will cause the DSC to fail validation and the entire script to therefore also fail.

Read More


Viewing all articles
Browse latest Browse all 8583

Trending Articles