-
Notifications
You must be signed in to change notification settings - Fork 0
RESOURCE_TEMPLATE
Use this template to create documentation for AzureDevOpsDscNative resources. Copy this file and replace [ResourceName] with the actual resource name.
The [ResourceName] DSC resource is used to [describe what this resource does]. [Add any additional context about the resource's purpose and capabilities].
[ResourceName] [string] #ResourceName
{
KeyProperty1 = [Type] $KeyProperty1
[ KeyProperty2 = [Type] $KeyProperty2 ]
[ OptionalProperty1 = [Type] $OptionalProperty1 ]
[ Ensure = [String] {'Present', 'Absent'} ]
[ DependsOn = [String[]] ]
[ PsDscRunAsCredential = [PSCredential] ]
}-
KeyProperty1 [Type] - Description of the key property. [Additional details].
-
KeyProperty2 [Type] - [Optional second key property description].
-
OptionalProperty1 [Type] - [Description]. [Valid values if applicable].
-
OptionalProperty2 [Type] - [Description]. [Default value if applicable].
-
Ensure [String] - Desired state of the resource:
-
'Present'- (default) Resource should exist -
'Absent'- Resource should be removed
-
-
DependsOn [String[]] - Dependencies on other resources. Use this to control the order of resource execution.
-
PsDscRunAsCredential [PSCredential] - Credentials to run this resource under.
The resource returns the following properties:
- PropertyName1 - [Description]
- PropertyName2 - [Description]
- Ensure - Current state ('Present' or 'Absent')
Configuration [ExampleName] {
Import-DscResource -ModuleName 'AzureDevOpsDscNative'
Node localhost {
[ResourceName] '[ResourceInstance]' {
KeyProperty1 = 'value1'
OptionalProperty1 = 'value2'
Ensure = 'Present'
}
}
}
[ExampleName]
Start-DscConfiguration -Path ./[ExampleName] -Wait -VerboseConfiguration [ExampleName2] {
Import-DscResource -ModuleName 'AzureDevOpsDscNative'
Node localhost {
[ResourceName] '[ResourceInstance]' {
KeyProperty1 = 'value1'
OptionalProperty1 = 'value2'
OptionalProperty2 = 'value3'
Ensure = 'Present'
DependsOn = '[OtherResource]OtherInstance'
}
}
}
[ExampleName2]
Start-DscConfiguration -Path ./[ExampleName2] -Wait -Verbose# Get the current state
$properties = @{
KeyProperty1 = 'value1'
}
$result = Invoke-DscResource -Name '[ResourceName]' `
-Method Get `
-Property $properties `
-ModuleName 'AzureDevOpsDscNative'
$result | Select-Object KeyProperty1, OptionalProperty1, Ensure- [Point 1]
- [Point 2]
- [Prerequisite 1]
- [Prerequisite 2]
Cause: [Explanation of what causes this error]
Solution: [How to resolve this issue]
# Example troubleshooting code- RelatedResource1 - [Brief description]
- RelatedResource2 - [Brief description]