< Back
Invoke-DscConfiguration
Post
NAME Invoke-DscConfiguration
SYNOPSIS
Invokes a specified configuration file with Desired State Configuration
SYNTAX
Invoke-DscConfiguration [-Path] <String> [-Repository <String>] [-Retry <Int32>] [-Delay <Int32>] [-WhatIf]
[<CommonParameters>]
Invoke-DscConfiguration [-InputObject] <Object[]> [-Repository <String>] [-Retry <Int32>] [-Delay <Int32>]
[-WhatIf] [<CommonParameters>]
DESCRIPTION
Prases the specified configuration file and extracts out unique Dsc resource
modules required and attempts to download them. Once the modules are obtained it converts
the configuration document to a PowerShell object which is passed to Invoke-Dsc to
invoke the resources.
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
-Repository <String>
Required? false
Position? named
Default value PSGallery
Accept pipeline input? false
Accept wildcard characters? false
-Retry <Int32>
Specifies the amount of times to rety when the Local Configuration Manager State is busy.
Required? false
Position? named
Default value 5
Accept pipeline input? false
Accept wildcard characters? false
-Delay <Int32>
Specifies the amount of seconds between retries when the Local Configuration Manager State is busy.
Required? false
Position? named
Default value 60
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
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
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Invoke-DscConfiguration -Path 'c:\\config\\NewFile.json'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Invoke-DscConfiguration -Path 'c:\\config\\NewFile.json' -Repository PSGallery
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Invoke-DscConfiguration -InputObject $json-object
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Invoke-DscConfiguration -InputObject $json-object -Retry 3 -Delay 30
RELATED LINKS
SYNOPSIS
Invokes a specified configuration file with Desired State Configuration
SYNTAX
Invoke-DscConfiguration [-Path] <String> [-Repository <String>] [-Retry <Int32>] [-Delay <Int32>] [-WhatIf]
[<CommonParameters>]
Invoke-DscConfiguration [-InputObject] <Object[]> [-Repository <String>] [-Retry <Int32>] [-Delay <Int32>]
[-WhatIf] [<CommonParameters>]
DESCRIPTION
Prases the specified configuration file and extracts out unique Dsc resource
modules required and attempts to download them. Once the modules are obtained it converts
the configuration document to a PowerShell object which is passed to Invoke-Dsc to
invoke the resources.
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
-Repository <String>
Required? false
Position? named
Default value PSGallery
Accept pipeline input? false
Accept wildcard characters? false
-Retry <Int32>
Specifies the amount of times to rety when the Local Configuration Manager State is busy.
Required? false
Position? named
Default value 5
Accept pipeline input? false
Accept wildcard characters? false
-Delay <Int32>
Specifies the amount of seconds between retries when the Local Configuration Manager State is busy.
Required? false
Position? named
Default value 60
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
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
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Invoke-DscConfiguration -Path 'c:\\config\\NewFile.json'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Invoke-DscConfiguration -Path 'c:\\config\\NewFile.json' -Repository PSGallery
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Invoke-DscConfiguration -InputObject $json-object
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Invoke-DscConfiguration -InputObject $json-object -Retry 3 -Delay 30
RELATED LINKS