Power WebPart 2010

Oct 29, 2013 at 6:32 PM
Does the Power WebPart 2013 work on Sharepoint 2013? I am getting an Error on Initialization so it may be that I do not have it configured correctly. Full error below.

Error on Initialization
Exception:
The type initializer for 'System.Management.Automation.SessionStateScope' threw an exception.
Stack:
at iLoveSharePoint.WebControls.PowerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at iLoveSharePoint.WebControls.PowerWebPartEditor.Render(HtmlTextWriter writer)
Dec 18, 2014 at 12:10 PM
Same thing with 2013.

But for 2010 Sharepoint it works for me.

I tried this code:
Add-PSSnapin Microsoft.SharePoint.PowerShell
$SpSite = New-Object -TypeName Microsoft.SharePoint.SPSite -ArgumentList "http://localhost";

function Render($writer)
{
$writer.Write("<h2>$SpSite</h2>")
}