Connect-PnPOnline problem after installing PnP.Powershell




I'm afraid this question lays bare a pretty huge gap in my PowerShell knowledge, so be gentle.


I'm keen to start using the PnP commands for managing Teams, so Get-PnPTeamsTeam etc. I already have SharePointPnPPowerShellOnline module installed and I use it occasionally with various scripts I have. However, to use Get-PnPTeamsTeam (for example) it appears I need to install PnP.Powershell. So I installed the module, was told it already had lots of commands already downloaded (by SharePointPnP I assume) and I should use -AllowClobber to continue. So I -AllowClobber and now PnP.Powershell installs. However, the Connect command I was using Connect-PnPOnline -Scopes "stuff" -Credentials $creds no longer works, and when I use type ahead I can see -Scopes is no longer an option with Connect-PnPOnline.


So... my question is, what I am doing that is stupid? I watched a video - - where Guru Erwin connects to PnP using -Scopes and then runs various PnPTeams commands. So I know it can be done. What am I missing?


I use PowerShell ISE, badly. Any help appreciated.




In this 12-minute Developer focused demo, Erwin van Hunen - shows several cmdlets for Microsoft Teams that are included with PnP PowerShell. Erwin steps thr...
3 Replies

@Paul Chapman 


These commands can be changed and update.

the easy way to see what are the command supported by your version is using Help



help Connect-PnPOnline -Examples


You will see the different methods and ways to connect.

Connect-PnPOnline -Url "" -Credentials (Get-Credential)

Hope this help




If this answer help, please mark it as Best Response 

@farismalaeb Thanks Faris. I'm a big fan of the -examples tag :)


In this case it looks like the module I had installed first (SharePointPnPPowerShell) has been superceded by an updated module (PnP.Powershell). I've uninstalled the earlier module, and now in the new module (PnP.Powershell) I no longer see a -scopes option. So I am working on the assumption that the video I watched (and referenced in my first post) was using an earlier version of PnP.Powershell that still had a -scopes option. But that may be wrong!

@Paul Chapman 

It's totally possible, Check this one

This link is for the PSGallary which includes all the previous versions of PnP.Powershell, you can try the old version, which is not a recommended thing to do.

I guess you need to tune the connection to be able to connect using the available parameters.




If the answer was helpful, Please click on Best Response.