-
Notifications
You must be signed in to change notification settings - Fork 0
Command Reference
- Overview
- New-DscAdaptedResourceManifest
- Import-DscAdaptedResourceManifest
- Import-DscResourceManifest
- New-DscPropertyOverride
- New-DscResourceManifest
- Update-DscAdaptedResourceManifest
This page lists the public commands in DscResource.Authoring. The SYNOPSIS
text matches the command help used by the module.
| Command | Synopsis |
|---|---|
New-DscAdaptedResourceManifest |
Creates adapted resource manifest objects from class-based PowerShell DSC resources. |
Import-DscAdaptedResourceManifest |
Imports adapted resource manifest objects from .dsc.adaptedResource.json files. |
Import-DscResourceManifest |
Imports a DSC resource manifest list from a .dsc.manifests.json file. |
New-DscPropertyOverride |
Creates a DscPropertyOverride object for use with Update-DscAdaptedResourceManifest. |
New-DscResourceManifest |
Creates a DSC resource manifests list for bundling multiple resources in a single file. |
Update-DscAdaptedResourceManifest |
Applies post-processing overrides to adapted resource manifest objects. |
Creates adapted resource manifest objects from class-based PowerShell DSC resources.
New-DscAdaptedResourceManifest [-Path] <String> [<CommonParameters>]Parses a .ps1, .psm1, or .psd1 file to find classes marked with
[DscResource()]. For each resource, the command returns a
DscAdaptedResourceManifest object that can be serialized to JSON with
.ToJson().
New-DscAdaptedResourceManifest -Path ./MyModule/MyModule.psd1Creates adapted resource manifest objects for all class-based DSC resources in the module.
Imports adapted resource manifest objects from .dsc.adaptedResource.json
files.
Import-DscAdaptedResourceManifest [-Path] <String> [<CommonParameters>]Reads one or more adapted resource manifest JSON files and returns
DscAdaptedResourceManifest objects. Use this command to inspect, update, or
bundle existing adapted resource manifests.
Get-ChildItem -Filter *.dsc.adaptedResource.json | Import-DscAdaptedResourceManifestImports all adapted resource manifest files in the current directory.
Imports a DSC resource manifest list from a .dsc.manifests.json file.
Import-DscResourceManifest [-Path] <String> [<CommonParameters>]Reads a DSC resource manifest list and returns a DscResourceManifestList
object. The object contains adapted resources, command-based resources, and
extensions defined in the manifest list.
$list = Import-DscResourceManifest -Path ./MyModule.dsc.manifests.json
$list.AdaptedResources.CountImports a manifest list and inspects the number of adapted resources.
Creates a DscPropertyOverride object for use with
Update-DscAdaptedResourceManifest.
New-DscPropertyOverride [-Name] <String> [[-Description] <String>] [[-Title] <String>] [[-JsonSchema] <Hashtable>] [[-RemoveKeys] <String[]>] [[-Required] <Nullable[Boolean]>] [<CommonParameters>]Creates an object that describes how to update a single property in an embedded JSON schema. Use property overrides to adjust descriptions, titles, required status, and JSON schema keywords.
New-DscPropertyOverride -Name 'Count' -JsonSchema @{ minimum = 0; maximum = 100 }Creates an override that adds numeric constraints to the Count property.
Creates a DSC resource manifests list for bundling multiple resources in a single file.
New-DscResourceManifest [[-AdaptedResource] <DscAdaptedResourceManifest[]>] [[-Resource] <Hashtable[]>] [<CommonParameters>]Builds a DscResourceManifestList object that can contain adapted resources and
command-based resources. Serialize the object with .ToJson() and save it as a
.dsc.manifests.json file.
New-DscAdaptedResourceManifest -Path ./MyModule/MyModule.psd1 |
New-DscResourceManifestCreates a manifest list from generated adapted resource manifests.
Applies post-processing overrides to adapted resource manifest objects.
Update-DscAdaptedResourceManifest [-InputObject] <DscAdaptedResourceManifest> [[-PropertyOverride] <DscPropertyOverride[]>] [[-Description] <String>] [<CommonParameters>]Updates the embedded JSON schema of a DscAdaptedResourceManifest object. Use
this command to refine schema descriptions, add JSON schema constraints, remove
schema keys, or update the required property list.
$override = New-DscPropertyOverride -Name 'Tags' -Required $false
$manifest | Update-DscAdaptedResourceManifest -PropertyOverride $overrideRemoves the Tags property from the schema required list.