-
Notifications
You must be signed in to change notification settings - Fork 133
Publish DscModuleAndMof
Package DSC modules and mof configuration document and publish them on an enterprise DSC pull server in the required format.
Publish-DscModuleAndMof [-Source] <String> [-Force] [[-ModuleNameList] <String[]>]
[<CommonParameters>]
Uses Publish-DscModulesAndMof function to package DSC modules into zip files with the version info. Publishes the zip modules on "$env:ProgramFiles\WindowsPowerShell\DscService\Modules". Publishes all mof configuration documents that are present in the $Source folder on "$env:ProgramFiles\WindowsPowerShell\DscService\Configuration"- Use $Force to overwrite the version of the module that exists in the PowerShell module path with the version from the $source folder. Use $ModuleNameList to specify the names of the modules to be published if the modules do not exist in $Source folder.
$ModuleList = @("xWebAdministration", "xPhp")
Publish-DscModuleAndMof -Source C:\LocalDepot -ModuleNameList $ModuleList
Publish-DscModuleAndMof -Source C:\LocalDepot -Force
Switch to overwrite the module in PSModulePath with the version provided in $Sources.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Package and publish the modules listed in $ModuleNameList based on PowerShell module path content.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The folder that contains the configuration mof documents and modules to be published on Pull server. Everything in this folder will be packaged and published.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.