Import-LMLogicModule
Syntax
Section titled “Syntax”FilePath
Section titled “FilePath”Import-LMLogicModule -FilePath <string> [-Type <string>] [-ForceOverwrite <bool>] [<CommonParameters>]Import-LMLogicModule -File <Object> [-Type <string>] [-ForceOverwrite <bool>] [<CommonParameters>]Description
Section titled “Description”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.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”#Import a datasource moduleImport-LMLogicModule -FilePath "C:\LogicModules\datasource.xml" -Type "datasource" -ForceOverwrite $trueEXAMPLE 2
Section titled “EXAMPLE 2”#Import a property rules moduleImport-LMLogicModule -File $fileData -Type "propertyrules"Parameters
Section titled “Parameters”The file data of the LogicModule to import.
Type: System.ObjectDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: File Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-FilePath
Section titled “-FilePath”The path to the file containing the LogicModule to import.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: FilePath Position: Named IsRequired: true ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-ForceOverwrite
Section titled “-ForceOverwrite”Whether to overwrite an existing LogicModule with the same name. Defaults to $false.
Type: System.BooleanDefaultValue: FalseSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''The type of LogicModule. Valid values are “datasource”, “propertyrules”, “eventsource”, “topologysource”, “configsource”, “logsource”, “functions”, “oids”. Defaults to “datasource”.
Type: System.StringDefaultValue: datasourceSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: Named IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “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.