< Back
ConvertTo-Dsc
Post
NAME ConvertTo-Dsc
SYNOPSIS
Converts json DSL files to PSCustomObject
SYNTAX
ConvertTo-Dsc [-Path] <String> [<CommonParameters>]
ConvertTo-Dsc [-InputObject] <Object[]> [<CommonParameters>]
DESCRIPTION
Converts json DSL files to PSCustomObjects that Invoke-DSCResource can consume. All property
objects will be converted to hashtables for the property cmdlet of Invoke-DSCResource. ModuleName
is discovered dynamically from the resource name provided in the json.
PARAMETERS
-Path <String>
Specifies the path to a .json file.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-InputObject <Object[]>
Specifies an InputObject containing json synatx
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>ConvertTo-Dsc -Path 'c:\\json\\example.json'
RELATED LINKS
SYNOPSIS
Converts json DSL files to PSCustomObject
SYNTAX
ConvertTo-Dsc [-Path] <String> [<CommonParameters>]
ConvertTo-Dsc [-InputObject] <Object[]> [<CommonParameters>]
DESCRIPTION
Converts json DSL files to PSCustomObjects that Invoke-DSCResource can consume. All property
objects will be converted to hashtables for the property cmdlet of Invoke-DSCResource. ModuleName
is discovered dynamically from the resource name provided in the json.
PARAMETERS
-Path <String>
Specifies the path to a .json file.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-InputObject <Object[]>
Specifies an InputObject containing json synatx
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>ConvertTo-Dsc -Path 'c:\\json\\example.json'
RELATED LINKS