Import-LMLogicModule
Syntax
FilePath
Import-LMLogicModule -FilePath <String> [-Type <String>] [-ForceOverwrite <Boolean>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
File
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
#Import a datasource moduleImport-LMLogicModule -FilePath "C:\LogicModules\datasource.xml" -Type "datasource" -ForceOverwrite $true
Example 2
#Import a property rules moduleImport-LMLogicModule -File $fileData -Type "propertyrules"
Parameters
-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: False
-File
The file data of the LogicModule to import.
Type: ObjectParameter Sets: FileAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Type
The 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
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
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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.