< Back

Get-DSCConfigurationFromRegistry

Mon Jan 13, 2020 8:12 pm

NAME Get-DSCConfigurationFromRegistry



SYNOPSIS

This function converts a registry key and its values to the DSC Registry Resource format. If you want, it does

this recursively





SYNTAX

Get-DSCConfigurationFromRegistry [-RegPath] <Object> [-ExportPath] <Object> [-Recurse] [-ForceValueReplacement]

[-IgnoreDefault] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-RegPath <Object>

Path to the registry key. E.g. HKLM:\\SOFTWARE\\SomeSoftware



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ExportPath <Object>

Path to the file where the converted data will be stored. The data will be appended to the file if the file

already exists



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Recurse [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ForceValueReplacement [<SwitchParameter>]

Adds 'Force = $True' for each value in the output so that DSC will replace the data of the value if the value

already exists. For more information have a look at technet:

https://technet.microsoft.com/en-us/lib ... 82133.aspx



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-IgnoreDefault [<SwitchParameter>]

If parameter is set, the default values will be ignored and won't show up in you DSC registry configuration



Required? false

Position? named

Default value False

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

This function does not allow any input





OUTPUTS

This function exports data to a file. No output on the console.





NOTES





Source: https://github.com/DominikBritz





RELATED LINKS