3

Currently I'm using this git hub article.

I'm using this for SharePoint online. So I have installed SharePointPnPPowerShellOnline.msi from this.

After that I have try to run script Enable-SPResponsiveUI.ps1. But It will show

error:

The term 'Connect-PnPOnline' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

  • What is you PowerShell version? Check by running $PSVersionTable – Sergei Sergeev Jan 4 '17 at 7:42
  • Name Value ---- ----- PSVersion 3.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.17929 BuildVersion 6.2.9200.16384 PSCompatibleVersions {1.0, 2.0, 3.0} PSRemotingProtocolVersion 2.2 – Akshay Dattatray Nangare Jan 4 '17 at 8:28
  • 4
    Just Found solution here sharepoint.stackexchange.com/questions/199756/… By running Install-Module SharePointPnPPowerShellOnline Thanks – Akshay Dattatray Nangare Jan 4 '17 at 8:29
  • It works fine but show another error like "Apply-PnPProvisioningTemplate : Value cannot be null" – Akshay Dattatray Nangare Jan 4 '17 at 8:33
  • Value cannot be null that's another story...something wrong with pnp provisioning.. Ideally stacktrace might help a log – Sergei Sergeev Jan 4 '17 at 8:52
1

There are multiple ways to install the PnP cmdlets. As you discovered in your comment the tools can be installed "...By running Install-Module SharePointPnPPowerShellOnline" which is what Microsoft recommends1. It's possible the other option you tried with the .msi file failed because there was an open instance of PowerShell that needed restarting?

Installation options

1. Install from PowerShell Gallery

If you main OS is Windows 10, or if you have PowerShellGet installed, you can run the following commands to install the PowerShell cmdlets:

  • SharePoint Online: Install-Module SharePointPnPPowerShellOnline
  • SharePoint 2016: Install-Module SharePointPnPPowerShell2016
  • SharePoint 2013: Install-Module SharePointPnPPowerShell2013

2. Install from setup files

You can download setup files from the releases section of the PnP PowerShell repository. These files will up be updated on a monthly basis. Run the install and restart any open instances of PowerShell to use the cmdlets.

3. Using an installation script

This is an alternative for installation on machines that have at least PowerShell v3 installed. You can find the version of PowerShell by opening PowerShell and running $PSVersionTable.PSVersion. The value for Major should be above 3.

To install the cmdlets you can run the below command which will install PowerShell Package Management and then install the PowerShell Modules from the PowerShell Gallery.

Invoke-Expression (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/sharepoint/PnP-PowerShell/master/Samples/Modules.Install/Install-SharePointPnPPowerShell.ps1')

Footnotes

  1. Microsoft Docs, PnP PowerShell overview, Installation "We recommend, where possible, to install them from the PowerShell Gallery."

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.