Productivity Tools

Tools written by an IT business manager, a passionate developer.

Find Module Dependencies

It finds all modules which are dependent on given module.

It looks recursively in the directory to find all psd1 files, next it takes the RequiredModules key and writes it. If the DependencyName parameter is provided. It will write only those modules which require a given dependency to work.

Find-ModuleDependencies without any parameters will go through all directories in the given path and will search for psd1 files, next it will write on the screen value of the RequiredModules key.

Find-ModuleDependencies -Path d:\github |Out-GridView

FindAllDependencies

If you want to look for a particular dependency just use the parameter DependencyName then it will show just those modules which need provided dependency

Find-ModuleDependencies -Path d:\github -DependencyName ProductivityTools.MasterConfiguration -Verbose 
Find Equals

You can also use Like switch parameter if you are not sure how the dependency is named.

Find-ModuleDependencies -Path d:\github -DependencyName get -Like -Verbose
Find Equals

When using like switch module automatically adds * to the query.

if ($dependency -like "*$filter*") {     ...

The below diagram shows on a high level how the module works.

Find Equals
Close Bitnami banner
Bitnami