external help file: TeamViewerPS-help.xml Module Name: TeamViewerPS online version: https://github.com/teamviewer/TeamViewerPS/blob/main/Docs/Help/Set-TeamViewerDeviceCustomField.md schema: 2.0.0
Sets or updates a custom field value for a managed device.
Set-TeamViewerDeviceCustomField [-APIToken] <SecureString> [-ManagedDeviceId] <Object> [-FieldConfigurationId] <Guid> [-Value] <String> [-WhatIf] [-Confirm] [<CommonParameters>]Sets or updates the value of a custom field for a specific managed device. If the device already has a value for the specified custom field, the existing value is overwritten.
The TeamViewer API access token.
Type: SecureString
Required: TrueThe unique identifier of the managed device. Can be a device Id string or a TeamViewerPS.ManagedDevice object.
Type: Object
Aliases: Id, ManagedDevice, Device, DeviceId
Required: TrueThe unique identifier of the custom field definition (FieldKeyId).
Type: Guid
Aliases: FieldKeyId
Required: TrueThe value to set for the custom field.
Type: String
Required: TrueSet-TeamViewerDeviceCustomField -APIToken $apiToken -ManagedDeviceId 'd12345678' -FieldConfigurationId '00000000-0000-0000-0000-000000000001' -Value 'AssetTag001'Sets the value of a custom field for the specified managed device.
Set-TeamViewerDeviceCustomField -DeviceId 'd12345678' -FieldKeyId 'c0cb303a-8a85-4e54-b657-a4757c791aef' -Value 'Building A'Uses the DeviceId and FieldKeyId aliases to set a custom field value on the managed device.
Get-TeamViewerManagedDevice -Name 'Server01' | Set-TeamViewerDeviceCustomField -FieldConfigurationId 'c0cb303a-8a85-4e54-b657-a4757c791aef' -Value 'Rack 12'Sets a custom field value on the managed device object retrieved via Get-TeamViewerManagedDevice.
Returns the updated device custom field value object.