Skip to content

Import-LMLogicModule

Terminal window
Import-LMLogicModule -FilePath <string> [-Type <string>] [-ForceOverwrite <bool>]
[<CommonParameters>]
Terminal window
Import-LMLogicModule -File <Object> [-Type <string>] [-ForceOverwrite <bool>] [<CommonParameters>]

DEPRECATED: This function uses legacy import endpoints and will be removed in a future version. Please use Import-LMLogicModuleFromFile instead, which uses the newer XML/JSON import endpoints with better error handling and additional features.

The Import-LMLogicModule function imports a LogicModule from a file path or file data. Supports various module types including datasource, propertyrules, eventsource, topologysource, configsource, logsource, functions, and oids.

Terminal window
#Import a datasource module
Import-LMLogicModule -FilePath "C:\LogicModules\datasource.xml" -Type "datasource" -ForceOverwrite $true
Terminal window
#Import a property rules module
Import-LMLogicModule -File $fileData -Type "propertyrules"

The file data of the LogicModule to import.

Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: File
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

The path to the file containing the LogicModule to import.

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

Whether to overwrite an existing LogicModule with the same name. Defaults to $false.

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

The type of LogicModule. Valid values are “datasource”, “propertyrules”, “eventsource”, “topologysource”, “configsource”, “logsource”, “functions”, “oids”. Defaults to “datasource”.

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

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.