Copy-LMReport
Syntax
Copy-LMReport [-Name] <String> [[-Description] <String>] [[-ParentGroupId] <String>] [-ReportObject] <Object> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
The Copy-LMReport function creates a new report based on an existing report’s configuration. It allows you to specify a new name, description, and parent group while maintaining other settings from the source report.
Examples
Example 1
#Copy a report with basic settingsCopy-LMReport -Name "New Report" -ReportObject $reportObject
Example 2
#Copy a report with all optional parametersCopy-LMReport -Name "New Report" -Description "New report description" -ParentGroupId 12345 -ReportObject $reportObject
Parameters
-Name
The name for the new report. This parameter is mandatory.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-Description
An optional description for the new report.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 2Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-ParentGroupId
The ID of the parent group for the new report.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 3Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-ReportObject
The source report object to copy settings from. This parameter is mandatory.
Type: ObjectParameter Sets: (All)Aliases:
Required: TruePosition: 4Default value: NoneAccept 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 the newly created report object.
Notes
You must run Connect-LMAccount before running this command.