pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
987 stars 665 forks source link

[BUG] Remove-PnPTeamsTab not working #2794

Closed zapftho closed 4 years ago

zapftho commented 4 years ago

Reporting an Issue or Missing Feature

I have tried to use the new cmdlet Remove-PnPTeamsTab as shown in the documentation of it (https://docs.microsoft.com/de-de/powershell/module/sharepoint-pnp/remove-pnpteamstab?view=sharepoint-ps) but it is not working for me. Depending on how I use the parameters I get an error message "Cannot find tab" or "Object reference not set to an instance of an object"

Expected behavior

The cmdlet should work as described in the documentation and should delete the Tab in the team / channel which I provide in my parameters

Actual behavior

The cmdlet does not work for me an returns different results when using display names or IDs for the different parameters.

Steps to reproduce behavior

Connect-PnPOnline -ClientId $AppId -ClientSecret $clientSecret -AADDomain '.onmicrosoft.com' $team = Get-PnPTeamsTeam -Identity "Test Provisioning PnP Powershell 2" $channel = Get-PnPTeamsChannel -Team $team.GroupId -Identity "General" $tab = Get-PnPTeamsTab -Channel $channel.DisplayName -Team $team.GroupId -Identity "Wiki" Remove-PnPTeamsTab -Team $team.DisplayName -Channel $channel.DisplayName -Identity "Wiki"

--> Results in the following (checked all placeholders and they are properly filled):

image

Connect-PnPOnline -ClientId $AppId -ClientSecret $clientSecret -AADDomain '.onmicrosoft.com' $team = Get-PnPTeamsTeam -Identity "Test Provisioning PnP Powershell 2" $channel = Get-PnPTeamsChannel -Team $team.GroupId -Identity "General" $tab = Get-PnPTeamsTab -Channel $channel.DisplayName -Team $team.GroupId -Identity "Wiki" Remove-PnPTeamsTab -Team $team.GroupId -Channel $channel.DisplayName -Identity $tab.Id

-->Results in the following (again: checked all placeholders and they are properly filled again):

image

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

3.23.2007.0

How did you install the PnP-PowerShell Cmdlets?

erwinvanhunen commented 4 years ago

You're correct. A last minute addition causes this issue. We will work on a fix.

erwinvanhunen commented 4 years ago

We will release a new version within a few days which fixes this issue.