Skip to content

Import-LMLogicModule

Syntax

FilePath

Terminal window
Import-LMLogicModule -FilePath <String> [-Type <String>] [-ForceOverwrite <Boolean>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

File

Terminal window
Import-LMLogicModule -File <Object> [-Type <String>] [-ForceOverwrite <Boolean>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

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

Example 1

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

Example 2

Terminal window
#Import a property rules module
Import-LMLogicModule -File $fileData -Type "propertyrules"

Parameters

-FilePath

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

-File

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

-Type

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

-ForceOverwrite

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

-ProgressAction

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

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

None. You cannot pipe objects to this command.

Outputs

Returns a success message if the import is successful.

Notes

You must run Connect-LMAccount before running this command. Requires PowerShell version 6.1 or higher.