Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Commands/Taxonomy/RemoveTerm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public class RemoveTerm : PnPSharePointCmdlet
[Parameter(Mandatory = false, ParameterSetName = ParameterAttribute.AllParameterSets)]
public TaxonomyTermStorePipeBind TermStore;

[Parameter(Mandatory = false, ParameterSetName = ParameterAttribute.AllParameterSets)]
public SwitchParameter Force;

protected override void ExecuteCmdlet()
{
Expand All @@ -51,7 +53,7 @@ protected override void ExecuteCmdlet()
var termSet = TermSet.GetTermSet(termGroup);
term = Identity.GetTerm(ClientContext, termStore, termSet, false, null);
}
if (ShouldContinue($"Delete term {term.Name} with id {term.Id}", Properties.Resources.Confirm))
if (Force || ShouldContinue($"Delete term {term.Name} with id {term.Id}", Properties.Resources.Confirm))
{
term.DeleteObject();
termStore.CommitAll();
Expand Down
Loading