Import-LMLogicModule
Syntax
Section titled “Syntax”FilePath
Section titled “FilePath”Import-LMLogicModule -FilePath <String> [-Type <String>] [-ForceOverwrite <Boolean>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Import-LMLogicModule -File <Object> [-Type <String>] [-ForceOverwrite <Boolean>] [-ProgressAction <ActionPreference>] [<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”-FilePath
Section titled “-FilePath”The path to the file containing the LogicModule to import.
Type: StringParameter Sets: FilePathAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseThe file data of the LogicModule to import.
Type: ObjectParameter Sets: FileAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseThe type of LogicModule. Valid values are “datasource”, “propertyrules”, “eventsource”, “topologysource”, “configsource”, “logsource”, “functions”, “oids”. Defaults to “datasource”.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: DatasourceAccept pipeline input: FalseAccept wildcard characters: False-ForceOverwrite
Section titled “-ForceOverwrite”Whether to overwrite an existing LogicModule with the same name. Defaults to $false.
Type: BooleanParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Section titled “Inputs”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”Returns a success message if the import is successful.
Section titled “Returns a success message if the import is successful.”DEPRECATED: This cmdlet will be removed in a future version. Use Import-LMLogicModuleFromFile instead.
You must run Connect-LMAccount before running this command. Requires PowerShell version 6.1 or higher.