Thursday, January 31, 2013

PowerGUI and SharePoint

I recently upgraded my trusty copy of PowerGUI and then went about my buisness, until I tried to edit a Powershell SharePoint script, which I knew was working. As I tried to execute the script I was seeing an error
 “Microsoft SharePoint is not supported with version 4.0.30319.261 of the Microsoft .Net Runtime.”

Hmmm, closed PowerGUI and opened it back up same error, hmmmm. Head back over to the PowerGUI site and started to look around and found that based on the release notes of PowerGUI 3.2. it seems they added .NET 4.0 support natively. If you want to continue to run you SharePoint 2010 2.0 cmdlets in PowerGUI, you will have to update your config file.
This change works with x64 bit setups, if you want to use a x32 bit then you just need to change the path

Good practices say you should make a backup copy of this file
C:\Program Files (x86)\PowerGUI\ScriptEditor.exe.config

Once that is backed up lets start off by right clicking on Notepad and run it as an Administrator
As the file opens you should see a line of code

supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"

just be sure to wrap html comment tags around this line, save it and relaunch PowerGUI and you should be all set.




Access denied after adding SSRS webpart to SharePoint

We have our portal set up so that we can serve external customers as well as our intranet users, we are also using SSRS in SharePoint integrated mode. After adding an SSRS report webpart to our 500 or so dashboard sites, we started getting calls from our external customers saying they were getting access denied when they tried to access the dashboard pages. 3 of us spent several days of combing through error logs, adjusting SharePoint group permissions, restarting the Profile Import Service, restarting IIS, all to no avail.

What happened? Once I had finished creating the report and uploading it to the report library in SharePoint, I had not gone into the SharePoint library where the reports were, mouse over the report to get the sub-menu, and selected  Publish a major version of the report, so while our internal users are having no issues seeing the report our external users were not able to get there, but once that was done users were able to get to their dashboard pages without issues.

What made this issue hard to troubleshoot was the fact that we had several errors in our log files but nothing was saying access denied for this specific webpart, we started taking web parts off the page one at a time in order to see if we could pin point this to a specific web part.

If you are using SSRS and SharePoint be sure to PUBLISH YOUR SSRS REPORTS!!! :)