Copy-LMDevice
Syntax
Section titled “Syntax”Copy-LMDevice [-Name] <String> [[-DisplayName] <String>] [[-Description] <String>] [-DeviceObject] <Object> [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”The Copy-LMDevice function creates a new device based on an existing device’s configuration. It allows you to specify a new name, display name, and description while maintaining other settings from the source device.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”#Copy a device with basic settingsCopy-LMDevice -Name "NewDevice" -DeviceObject $deviceObjectExample 2
Section titled “Example 2”#Copy a device with custom display name and descriptionCopy-LMDevice -Name "NewDevice" -DisplayName "New Display Name" -Description "New device description" -DeviceObject $deviceObjectParameters
Section titled “Parameters”The name for the new device. This parameter is mandatory.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DisplayName
Section titled “-DisplayName”The display name for the new device. If not specified, defaults to the Name parameter value.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 2Default value: $NameAccept pipeline input: FalseAccept wildcard characters: False-Description
Section titled “-Description”An optional description for the new device.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 3Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DeviceObject
Section titled “-DeviceObject”The source device 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
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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
Section titled “Inputs”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”Returns the newly created device object.
Section titled “Returns the newly created device object.”Masked custom properties from the source device will need to be manually updated on the new device as they are not available via the API.