powershell Zip自定义DSC模块,用于上传到Azure Automation DSC

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell Zip自定义DSC模块,用于上传到Azure Automation DSC相关的知识,希望对你有一定的参考价值。

#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
#--------------------------------------------------------------------------------

以上是关于powershell Zip自定义DSC模块,用于上传到Azure Automation DSC的主要内容,如果未能解决你的问题,请参考以下文章

Azure ARM-DSC VM配置

Azure ARM - DSC VM 配置

11.PowerShell DSC之安装PowerShell Module

PowerShell DSC学习资料

powershell 示例DSC

powershell DSC推动CIMSession