Created
June 11, 2018 01:57
-
-
Save techthoughts2/f628ccaf06540e3a7199328c6d397001 to your computer and use it in GitHub Desktop.
Azure Automation DSC is sensitive to how you zip up modules for upload. As shown below, to ensure your custom DSC module is properly uploaded zip it with the Publish-ModuleToPullServer cmdlet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#used for zipping up custom dsc resources prior to upload to Azure automation | |
#-------------------------------------------------------------------------------- | |
#install the required xPSDesiredStateConfiguration module if you haven't already: | |
#Install-Module xPSDesiredStateConfiguration | |
#-------------------------------------------------------------------------------- | |
#import the module | |
Import-Module xPSDesiredStateConfiguration | |
#-------------------------------------------------------------------------------- | |
#create the module .zip for Azure uploading | |
Publish-ModuleToPullServer -Name xNetworking -OutputFolderPath C:\DSC\Uploads ` | |
-ModuleBase 'c:\Program Files\WindowsPowerShell\Modules\xNetworking' -Version 5.6.0.0 | |
#-------------------------------------------------------------------------------- | |
#rename the zip file to not include the version number | |
#Rename-Item .\xNetworking_5.6.0.0.zip -NewName xNetworking.zip | |
#-------------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment