Skip to content

Copy-LMDevice

Terminal window
Copy-LMDevice [-Name] <String> [[-DisplayName] <String>] [[-Description] <String>] [-DeviceObject] <Object>
[-ProgressAction <ActionPreference>] [<CommonParameters>]

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.

Terminal window
#Copy a device with basic settings
Copy-LMDevice -Name "NewDevice" -DeviceObject $deviceObject
Terminal window
#Copy a device with custom display name and description
Copy-LMDevice -Name "NewDevice" -DisplayName "New Display Name" -Description "New device description" -DeviceObject $deviceObject

The name for the new device. This parameter is mandatory.

Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The display name for the new device. If not specified, defaults to the Name parameter value.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: $Name
Accept pipeline input: False
Accept wildcard characters: False

An optional description for the new device.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The source device object to copy settings from. This parameter is mandatory.

Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.