Skip to content

Set-StarrSonarrSeriesTag

SYNOPSIS

Adds or removes tags on Sonarr series.

SYNTAX

NamedById (Default)

Set-StarrSonarrSeriesTag -SeriesId <int[]> -TagId <int[]> -Action <string> [-InstanceName <string>]
 [-WhatIf] [-Confirm]

NamedByName

Set-StarrSonarrSeriesTag -SeriesId <int[]> -TagName <string> -Action <string>
 [-InstanceName <string>] [-WhatIf] [-Confirm]

ExplicitByName

Set-StarrSonarrSeriesTag -Url <string> -ApiKey <string> -SeriesId <int[]> -TagName <string>
 -Action <string> [-WhatIf] [-Confirm]

ExplicitById

Set-StarrSonarrSeriesTag -Url <string> -ApiKey <string> -SeriesId <int[]> -TagId <int[]>
 -Action <string> [-WhatIf] [-Confirm]

DESCRIPTION

This function adds or removes existing tags from selected series. It preserves unrelated tags, monitoring settings, and files. WhatIf prevents the change.

EXAMPLES

EXAMPLE 1

Set-StarrSonarrSeriesTag -InstanceName Main -SeriesId 42,43 -TagName reviewed -Action Add

EXAMPLE 2

Set-StarrSonarrSeriesTag -Url 'http://localhost:8989' -ApiKey 'example-api-key' -SeriesId 42 -TagId 7,8 -Action Remove -WhatIf

Previews removing tags without contacting Sonarr.

PARAMETERS

-Action

Add attaches the tags and Remove detaches them. Replacing all tags is intentionally unsupported.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- ApplyTags
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ApiKey

The API key used to authenticate.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ExplicitByName
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: ExplicitById
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-InstanceName

The optional saved Sonarr instance name. The matching instance is inferred when omitted.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Name
ParameterSets:
- Name: NamedByName
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: NamedById
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-SeriesId

The positive identifiers of the series to update.

Type: System.Int32[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-TagId

The positive identifiers of existing tags to add or remove. This function does not create tags.

Type: System.Int32[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ExplicitById
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: NamedById
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-TagName

The exact name of one existing tag to add or remove. Use either TagId or TagName.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ExplicitByName
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: NamedByName
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Url

The absolute Sonarr base URL.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ExplicitByName
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: ExplicitById
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

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

INPUTS

None.

You cannot pipe objects to this function.

OUTPUTS

PSStarr.Sonarr.Series

This function returns updated series response objects from Sonarr.

NOTES

https://psstarr.xyz/command-reference/commands/Set-StarrSonarrSeriesTag/

https://github.com/angrycuban13/PSStarr/blob/main/PSStarr/Source/Public/Sonarr/Set-StarrSonarrSeriesTag.ps1