PnP Enable ResponsiveUI error

Brass Contributor

 

I am trying to enable responsiveUI using the pnp powershell and power tools.

 

Steps done

1) Powershell version : 5.1 

2) Installed Pnp Powershell exe

3) downloaded the Pnp Tool master.zip 

4) tried to connect to my online sharepoint tenant from powershell and enable responsive ui

 

I get the below error

 

.\Enable-SPResponsiveUI.ps1 -TargetSiteUrl $SiteUrl -Credentials $creds
.\Enable-SPResponsiveUI.ps1 : The term '.\Enable-SPResponsiveUI.ps1' 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.
At line:16 char:1
+ .\Enable-SPResponsiveUI.ps1 -TargetSiteUrl $SiteUrl -Credentials $cre ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (.\Enable-SPResponsiveUI.ps1:Str
ing) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

 

 

Tried to update the powershell , pnp powershell , but did not help. Can anyone help with this . Thanks 

4 Replies

Hi Just to be sure have you uninstalled older versions of PNP i had some issues in the past with this.

If yes i would recommend to report a but in the Github Repo

Are you trying to execute your script from the correct location? By calling ".\Enable-SPResponsiveUI.ps1" the file (Enable-SPResponsiveUI.ps1) needs to exist at the same location from where you are executing.

 

Please make sure you're executing your script from the folder where the script file is located or that you're pointing to the correct path where the file is located.

 

Below image is showing exactly the same error when trying to execute a file that doesn's exist at the current location (c:\windows\system32)

2017-03-07.png

 

Browsing to the correct location and then executing the script works just fine:

2017-03-07 (1).png

Is it maybe Enable-SPOResponsiveUI that you are looking for?

Thanks Mate for the reply , issue was my root site did not had style library. I created a new team site and then executed the command and it worked like charm.