Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in module DSC #34

Open
spawluk opened this issue Mar 31, 2017 · 9 comments
Open

Error in module DSC #34

spawluk opened this issue Mar 31, 2017 · 9 comments
Labels

Comments

@spawluk
Copy link

spawluk commented Mar 31, 2017

According to Microsoft documentation you should use .psm1 extensions instead of .psd1 in module manifest file in NestedModules section (https://msdn.microsoft.com/en-us/powershell/reference/4.0/microsoft.powershell.core/new-modulemanifest#-nestedmodules)

Because of .psd1 extensions i got error during configuration of my ServiceBus server

Cannot find module SBFarm_0.10.0.0 from the server http://[PULLSERVER]/PSDSCPullServer.svc/Module(ConfigurationId='8230F4D0-EC13-4B8F-BA99-90F859D5DBF1',ModuleName='SBFarm',ModuleVersion='0.10.0.0')/ModuleContent. + CategoryInfo : ResourceUnavailable: (root/Microsoft/...gurationManager:String) [], CimException + FullyQualifiedErrorId : WebDownloadManagerModuleNotFound,Microsoft.PowerShell.DesiredStateConfiguration.Commands.GetDscModuleCommand + PSComputerName : [COMPUTERNAME]

@ryanspletzer
Copy link
Owner

Thanks, I will change this.

@ryanspletzer
Copy link
Owner

Hey @spawluk, I added #35 to dev branch which increments the module to 0.10.1, and might fix your issue with the pull server, can you test it out and let me know? (I don't have a local lab pull server handy at the moment.) If it works I'll merge this up to master and do a release to PowerShell Gallery.

@spawluk
Copy link
Author

spawluk commented Apr 3, 2017

It looks great. I can partially test it because I'm waiting for Windows Server 2016 VM's. Unfortunately class based resources can't work on my WS2k12R2 machines.

@ryanspletzer
Copy link
Owner

Ah yes, not out-of-the-box, have to add WMF 5 / WMF 5.1 on 2012 R2.

@spawluk
Copy link
Author

spawluk commented Apr 3, 2017

Even after adding it i have exceptions like ClassInitializationFailedException
Same code work on WS2016 and W10

@ryanspletzer
Copy link
Owner

Ok so it does work on WS2016 and W10? Can you paste the full error message you're seeing? That's happening when it's trying to pull the resources on WS2k12R2 or is that error happening at a new point?

@spawluk
Copy link
Author

spawluk commented Apr 3, 2017

It happens during configuration when DSC engine try to create Resource class to invoke Test method.

Job {E467AE44-1884-11E7-80D9-001DD8B71D42} : Message Cannot find type [SBFarm]: verify that the assembly containing this type is loaded. HResult -2146233087 StackTrack

Job {E467AE44-1884-11E7-80D9-001DD8B71D42} : MIResult: 1 Error Message: Failed to create an object of PowerShell class SBFarm. Message ID: InstantiatePSClassObjectFailed Error Category: 7 Error Code: 1 Error Type: MI

@ryanspletzer
Copy link
Owner

Ok I need to do some deeper testing with this... This will be a good excuse for me to finally make a local lab with a pull server. :)

@spawluk
Copy link
Author

spawluk commented Apr 4, 2017

It's super easy using DSC. Than it's better to have nice script to compile and rename files for PullServer standards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants