Skip to content

Import-LMLogicModule

Terminal window
Import-LMLogicModule -FilePath <String> [-Type <String>] [-ForceOverwrite <Boolean>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Terminal window
Import-LMLogicModule -File <Object> [-Type <String>] [-ForceOverwrite <Boolean>]
[-ProgressAction <ActionPreference>] [<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 path to the file containing the LogicModule to import.

Type: String
Parameter Sets: FilePath
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The file data of the LogicModule to import.

Type: Object
Parameter Sets: File
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

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

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Datasource
Accept pipeline input: False
Accept wildcard characters: False

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

Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

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

None. You cannot pipe objects to this command.

Section titled “None. You cannot pipe objects to this command.”

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.