Skip to main content

Register-DMDomainData

SYNOPSIS

Registers a domain data gathering script.

SYNTAX

__AllParameterSets

Register-DMDomainData [-Name] <string> [-Scriptblock] <scriptblock> [[-ContextName] <string>]
[<CommonParameters>]

DESCRIPTION

Registers a domain data gathering script. These can be used to provide domain specific data (in contrast to the usual context specific data, which might be applied to multiple domains).

EXAMPLES

EXAMPLE 1

Import-PowerShellDataFile .\config.psd1 | ForEach-Object { Register-DMDomainData @_ }

Registers all configuration settings stored in config.psd1

PARAMETERS

-ContextName

The name of the context defining the setting. This allows determining the configuration set that provided this setting. Used by the ADMF, available to any other configuration management solution.

Type: System.String
DefaultValue: <Undefined>
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Name

Name under which to register the data gathering script. Can only contain letters, numbers and underscores.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Scriptblock

The scriptblock performing the actual gathering. Receives a hashtable containing Server and - possibly - Credentials.

Type: System.Management.Automation.ScriptBlock
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.