Skip to content

Commit e20be98

Browse files
Resolving changes by gautam sheth.
1 parent 72ef3c0 commit e20be98

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

documentation/Set-PnPPage.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Likes the page
113113

114114
### EXAMPLE 11
115115
```powershell
116-
Set-PnPPage -Identity "MyPage.aspx" -UnLike
116+
Set-PnPPage -Identity "MyPage.aspx" -Like:$false
117117
```
118118
Unlikes the page
119119

@@ -376,7 +376,7 @@ Accept wildcard characters: False
376376
```
377377
378378
### -Like
379-
Likes the page
379+
Likes the page, if parameter is set to false then it Unlikes the page
380380
381381
```yaml
382382
Type: SwitchParameter
@@ -389,19 +389,7 @@ Accept pipeline input: False
389389
Accept wildcard characters: False
390390
```
391391
392-
### -UnLike
393-
Likes the page
394-
395-
```yaml
396-
Type: SwitchParameter
397-
Parameter Sets: (All)
398392
399-
Required: False
400-
Position: Named
401-
Default value: None
402-
Accept pipeline input: False
403-
Accept wildcard characters: False
404-
```
405393
406394
## RELATED LINKS
407395

src/Commands/Pages/SetPage.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ public class SetPage : PnPWebCmdlet, IDynamicParameters
6767
[Parameter(Mandatory = false)]
6868
public SwitchParameter Like = false;
6969

70-
[Parameter(Mandatory = false)]
71-
public SwitchParameter UnLike = false;
7270

7371
private CustomHeaderDynamicParameters customHeaderParameters;
7472

@@ -185,12 +183,8 @@ protected override void ExecuteCmdlet()
185183
if (Like)
186184
{
187185
clientSidePage.Like();
188-
}
189-
}
190-
191-
if (ParameterSpecified(nameof(UnLike)))
192-
{
193-
if (UnLike)
186+
}
187+
else
194188
{
195189
clientSidePage.Unlike();
196190
}

0 commit comments

Comments
 (0)