< Back

Register-MonConfigSource

Sat Jan 18, 2020 4:22 pm

NAME Register-MonConfigSource



SYNOPSIS

Registers a custom monitoring configuration source.





SYNTAX

Register-MonConfigSource [-Name] <String> [-Description] <String> [-ImportScript] <ScriptBlock> [-ExportScript]

<ScriptBlock> [<CommonParameters>]





DESCRIPTION

Registers a custom monitoring configuration source.

Config sources are the configuration backend that define the data gathering behavior.

This includes the targets to monitor and any limits to apply in scenarios where the limit configuration is stored

in the module configuration itself.

For example, the 'Path' config source that comes with the module (and is the default source) will store the

configuration in file.

This command makes the actual configuration management freely extensible.





PARAMETERS

-Name <String>

The name of the source. Must be unique, otherwise the previous config source will be overwritten,



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Description <String>

A description of the config source.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ImportScript <ScriptBlock>

The scriptblock to execute to read configuration from the source.



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ExportScript <ScriptBlock>

The scriptblock to execute to write configuration to the source.



Required? true

Position? 4

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:\\>Register-MonConfigSource -Name 'Path' -Description 'Uses the filesystem as data backend for monitoring

configuration' -ImportScript $ImportScript -ExportScript $ExportScript



Registers the "Path" config source.











RELATED LINKS