4

From my client PC I'm trying to use PnP cmdlets to run against my SharePoint Online environment.

To try and learn how to use the PnP cmdlets I visited the link below https://channel9.msdn.com/blogs/officedevpnp/introduction-to-pnp-powershell-cmdlets.

I downloaded the relevant cmdlets from the following URL (which is different to what the link above directed but their URL was out of date): https://github.com/sharepoint/pnp-powershell/releases/tag/2.17.1708.1

The cmdlets have installed at the following location C:\Program Files\WindowsPowerShell\Modules\SharePointPnPPowerShellOnline

Following the video in the 1st link above they open Powershell and run the SPOnline command, however when I try to do so I get the error message 'ConnectSPOnline: the term Connect-SPOnline' is not recognized as the name of a cmdlet, function, script file, or operable program.

The full list of commands that I'm trying to run as part of my script is as follows:

Import-Module 'C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell'

Import-Module 'C:\Program Files\WindowsPowerShell\Modules\SharePointPnPPowerShellOnline'

Connect-SPOnline -url https://tenant.sharepoint.com/teams/teamsite

This brings up the above error message, and now I'm not sure where I'm going wrong

3

Connect-SPOnline command was replaced with Connect-PnPOnline

1

Afaik Connect-SPOnline is part of the specific SharePoint Online Management Shell, not the standard SharePoint Client Components SDK (the latter contains pretty much everything else). Have you tried running the script from inside that specific shell?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.