Author Posts

July 14, 2017 at 3:39 pm

When we install a DSCresource (like install-module xSqlServer) it will install it to the folder Powershell\modules\xSqlServer\\

But then when we call Import-DscResource xSQLServer inside the configuration, it complains the module cannot be found. The only way to make it work is to copy all the files under to the root resource folder Powershell\modules\xSqlServer

Yet, when we zip that ressource to put it on the pull server, and it is transferred to the target node, it will install itself on the target node under Powershell\modules\xSqlServer\\ and it is working fine

Is this normal? On the development workstation, should we really put the resources at the root or are we doing something wrong?

To confuse things further, other resources, like xCertificate, do not create a [version] sub-folder, running install-module xCertificate will install it directly in WindowsPowerShell\Modules\xCertificate

July 21, 2017 at 5:51 pm

Have you tried explicitly stating a version when importing it?

July 21, 2017 at 6:00 pm

Indeed I saw that it is the right way to go when importing resources. Especially since resources don't seem to be consistent in the way they install themselves. I have added "always use the resource version when importing" to our internal rule document now 😛