The different types of tabs to add in Microsoft Teams when using PnP PowerShell
In this blog post, I wanted to talk about the different types of tabs you can add in Microsoft Teams when using PnP PowerShell. More specifically about the
-Type parameter which offers multiple values, but also because we have a dynamic parameter for the
The easy ones…
Most of them are pretty self explanatory. For instance,
-Type PowerPoint or
-Type WebSite. We also provide an example in the Add-PnPTeamsTab documentation for the PDF type.
Let’s go through a couple of them.
We have our website added using the
-ContentUrl parameter (remember that for later 😉)
Now let’s add a document library. We need to use the
We needed to provide the full path of the document library in question, using also the
The confusing one…
Amongst the list of values for the
-Type parameter, there’s one that might throw you off. What about the
-Type SharePointPageAndList ? Should it not be similar to the
DocumentLibrary value? We provide the full URL and off we pop! 🧐 Nope, we don’t.
Let’s try something…
Well if you run this, you will get an error. And it also means that you full typed the command without validating the parameters using the “tab” on your keyboard! 😜
Remember when I spoke earlier about the
-ContentUrl parameter? It’s a dynamic parameter. Meaning it’s only available for supported types… And it’s not available when using the
Why is that?
Because this tab type cannot be ‘pre-configured’. All the configuration must be done in the Microsoft Teams UI after running the command. Look below what happens when you click on the newly created tab:
If you still want to use it, just run the following:
Is there an alternative?
Yes! Use the
-Type WebSite and you should be good to go.
Thanks for reading!