Export-LMLogicModule
Syntax
Id (Default)
Export-LMLogicModule -LogicModuleId <Int32> -Type <String> [-DownloadPath <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Name
Export-LMLogicModule -LogicModuleName <String> -Type <String> [-DownloadPath <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
The Export-LMLogicModule function exports LogicModules from LogicMonitor. It supports exporting various types of modules including datasources, property rules, event sources, and more.
Examples
Example 1
#Export a LogicModule by IDExport-LMLogicModule -LogicModuleId 1907 -Type "eventsources"
Example 2
#Export a LogicModule by nameExport-LMLogicModule -LogicModuleName "SNMP_Network_Interfaces" -Type "datasources"
Parameters
-LogicModuleId
The ID of the LogicModule to export. This parameter is mandatory when using the Id parameter set.
Type: Int32Parameter Sets: IdAliases: Id
Required: TruePosition: NamedDefault value: 0Accept pipeline input: True (ByPropertyName)Accept wildcard characters: False
-LogicModuleName
The name of the LogicModule to export. This parameter is mandatory when using the Name parameter set.
Type: StringParameter Sets: NameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Type
The type of LogicModule to export. Valid values are: “datasources”, “propertyrules”, “eventsources”, “topologysources”, “configsources”, “logsources”, “functions”, “oids”.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DownloadPath
The path where the exported LogicModule will be saved. Defaults to current directory.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: (Get-Location).PathAccept 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 export is completed successfully.
Notes
You must run Connect-LMAccount before running this command.