File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Remove-PnPTermLabel
22
22
-Lcid <Int32>
23
23
[-TermStore <Guid>]
24
24
[-Connection <PnPConnection>]
25
- [-Confirm ]
25
+ [-Force ]
26
26
27
27
```
28
28
@@ -36,7 +36,7 @@ Remove-PnPTermLabel
36
36
-TermGroup <Name|Guid>
37
37
[-TermStore <Guid>]
38
38
[-Connection <PnPConnection>]
39
- [-Confirm]
39
+ [-Force]
40
40
41
41
```
42
42
@@ -60,13 +60,12 @@ Removes the Swedish label from the specified term.
60
60
61
61
## PARAMETERS
62
62
63
- ### -Confirm
64
- Prompts you for confirmation before running the cmdlet .
63
+ ### -Force
64
+ Specifying the Force parameter will skip the confirmation question .
65
65
66
66
``` yaml
67
67
Type : SwitchParameter
68
68
Parameter Sets : (All)
69
- Aliases : cf
70
69
71
70
Required : False
72
71
Position : Named
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ public class RemoveTermLabel : PnPSharePointCmdlet
32
32
[ Parameter ( Mandatory = false , ValueFromPipeline = true , ParameterSetName = ParameterAttribute . AllParameterSets ) ]
33
33
public TaxonomyTermStorePipeBind TermStore ;
34
34
35
+ [ Parameter ( Mandatory = false ) ]
36
+ public SwitchParameter Force ;
37
+
35
38
protected override void ExecuteCmdlet ( )
36
39
{
37
40
var taxonomySession = TaxonomySession . GetTaxonomySession ( ClientContext ) ;
@@ -67,7 +70,7 @@ protected override void ExecuteCmdlet()
67
70
if ( term != null )
68
71
{
69
72
term . EnsureProperties ( t => t . Name , t => t . Id ) ;
70
- if ( ShouldContinue ( $ "Delete label { Label } for language { Lcid } from Term { term . Name } with id { term . Id } ", Properties . Resources . Confirm ) )
73
+ if ( Force || ShouldContinue ( $ "Delete label { Label } for language { Lcid } from Term { term . Name } with id { term . Id } ", Properties . Resources . Confirm ) )
71
74
{
72
75
var labels = term . GetAllLabels ( Lcid ) ;
73
76
ClientContext . Load ( labels ) ;
You can’t perform that action at this time.
0 commit comments