Posts

Showing posts with the label power shell
Error while running the power shell script file You may be facing the following error while running the power shell script file. xxx.ps1 cannot be loaded because the execution of scripts is disabled on this system Resolution: Run the following command on your power shell script console and enjoy running the script file. Set-ExecutionPolicy “bypass” *If you get “ Access denied or unauthorized error ” make sure that you are running power shell console in administration mode.

SharePoint 2010 PowerShell commands

Windows PowerShell is better command tool and SharePoint leverages it most to send powerful commands to the product. I was really impressed with this tool. The commands are very explanatory. Easy to remember. Easy to work on as well. When I did execute my first command I had to bite a bullet. I got the following error. Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application . The reason i got this error is that I got my solution as a  gobal solution. So don't mention any targeted web application to deploy this kind of solutions Here are few major commands of SharePoint PowerShell //Add solution Add-SPSolution C:\Test\test.wsp //Deploy solution to web app Install-SPSolution –Identity test.wsp –WebApplication http://sharepoint2010:1111 -GACDeployment //Retract solution from web app Uninstall-SPSolution –Identity test.wsp –WebApplication http://sharepoint2010:1111 ...