Apr 25, 2009

Getting Started with SharePoint PowerWebPart 3.0

I’ve just released PowerWebPart 3.0 on my iLove SharePoint project at CodePlex. What can you do with PowerWebPart?

Write reusable SharePoint WebParts with PowerShell


  • Simple HTML Rendering
  • ASP.NET and SharePoint WebControls
  • Supports WebPart Connections (Row Provider/Consumer, Table Provider/Consumer)
  • AJAX enabled
  • jQuery enabled
  • Configurable parameters
  • SharePoint Object Model
  • NEW: PowerGUI Script Editor Integration
  • NEW: Script Signing
  • NEW: Custom Editor Parts written in PowerShell
  • NEW: Central Script Repository
  • NEW: Import and Export
  • NEW: Error Handling
  • NEW: Debugging
  • No compile, no packaging, no deploy, no iis reset deployment
  • Copy & Paste deployment
  • Anything PowerShell can do :-)

One of the major improvements is the automatically script signing. Only farm administrators are allowed to edit scripts in the UI. But what is when you export a web part, change the script and import it to a web part gallery again? The signature will be broken and the script will not run anymore. So exporting and importing is now secure. The script will automatically be signed when a farm administrator clicks on ‘Apply’ in the web part's editor panel. The signing key will generated randomly on installation, but can be changed anytime later. 

For installation and configuration see documentation.

Getting Started Screen Cast:

Soon I will post a PowerWebPart Tag Cloud example…


Jeremy Thake said...

Where is the script stored so that PowerGUI can edit it and save it back? Can you have more than one instance of the web part in one web part zone on a page?
Performance wise, if you had 1000 users hit the page, how does the server react?
Great idea! Loving the potential for all sorts of stuff with object model and server stuff.

Christian said...

The script is stored in a WebPart property, so it wil be persited in the SharePoint Content DB.
The PowerGUI integration is done via an ActiveX plugin and JavaScript. You can have as many instances on a page as you want.
Performance is good question, I haven't tested with 1000 users. We really used it in projects for small teams - works well. But I'm really curious how it will perform with 1000 users. I or maybe someone else have to do a performance test, but unfortunatley time is very limited ;-)

SPAdmWiki said...

Thanks for answering that so quickly. Great webpart, just need to get time to use it now ;-)

Гломозда said...

How can I use Powershell 2.0POwerWebPart3.0? I have script for working with Exchange mailboxes. This script work in PowerGui command shell , but when I save this script in PowerWebPart, I have received error.

Christian said...

Power WebPart 3.0 works with PowerShell 2.0. Maybe you can post your script to the codeplex forum, so I can have look at it...

Yuriy Glomozda said...

Thanks for reply.
I will send my script if it need for you. But it's my general problem: I have to run simple Exchange management script,but have received error because of Exchange cmdlets absent . I have Powershell CTP2 and Exchange management cmdlets. Script in power shell have run OK. But in PowerWebPart 3.0, I think, Exchange management cmdlets don't visible. Is any ideas?
1)Powershell variable $profile in PowerWebPart is empty.
2)Add-PSSnapin "*Exch*"
will do error: Failed to grant permission to execute.

Yuriy Glomozda

Christian said...

Hi Yuriy,

normally it should support Add-PSSnapin. Maybe the current user hasn't the right to load the snapin. Have you done the setting int asp.config described in the readme? If you have not the webpart runs under the apppool user which is usually a very ristricted account. You can verify the current principal with:
function render($writer)
$identiy = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name

$writer.Write($identiy + "


Гломозда said...

Hi, Christian

My configuration/runtime in asp.config has:
1. legacyUnhandledExceptionPolicy with enabled=false
2. legacyImpersonationPolicy with enabled=false
3.alwaysFlowImpersonationPolicy with enabled=true
4.SymbolReadingPolicy with enabled=1
Your render-function from your reply returned my Domain Administrator.

I don't understand, why my script don't work in PowerWebPart. Is there some another ideas?

Anonymous said...


Tried to deploy the webpart on MOSS farm (Sp1). During install everything seems to be OK but after activating the feature at Site level and taking the webpart to the page a "File not found" error occures.

any advice?

Thanks, MaoT

Anonymous said...

Heya again,

So the error msg is:
Could not load file or assembly 'System.Management.Automation, Version=, Cluture=neutral, PublikKeyToken=... or one of its dependencies. The system cannot find the file specified.

Stack Trace:

[FileNotFoundException: Could not load file or assembly 'System.Management.Automation, Version=, Cluture=neutral, PublikKeyToken=... or one of its dependencies. The system cannot find the file specified.

IloveSharepoint.Webcontrols.Powercontrol..ctor() +0
IloveSharepoint.Webcontrols.PowerWebPart.CreateChildControls() +113
System.Web.UI.Control.EnsureChildControls +146
System.Web.UI.Control.PreRenderrecursiveInternal() +61
System.Web.UI.Control.PreRenderrecursiveInternal() +224
System.Web.UI.Control.PreRenderrecursiveInternal() +224
System.Web.UI.Control.PreRenderrecursiveInternal() +224
System.Web.UI.Control.PreRenderrecursiveInternal() +224System.Web.UI.Control.PreRenderrecursiveInternal() +224
System.Web.UI.Control.PreRenderrecursiveInternal() +224
System.Web.UI.Page.ProcessRequestMain(Boolean IncludeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394


Thanks so, MaoT

Christian said...


you have to install PowerShell on the server.


Anonymous said...


yes :( sorry for that... We have Farm wirh 3 FE and 1 Indexing. On Indexing and 2 of the FEs PWS was installed but not on the 3rd.

My request went to the 3rd one :( which had PWS feature not enabled (w2k8)

argh..... I was looking everything at this time with ProcMon but without luck...

once more, sorry for that silly mistake :( Anyway thanks for the Reply

Bye, MaoT

Anonymous said...

Hi Christian

I have installed PowerWebPart 3.0 on a DEV server, and when I go to add a web part, I receive this error:

Power WebPart 3.0
iLove SharePoint PowerShell WebPart 3.0
Power WebPart 3.0

Error on Initialization
Script is not signed!
at iLoveSharePoint.WebControls.PowerControl.Render(HtmlTextWriter writer) at iLoveSharePoint.WebControls.PowerWebPart.Render(HtmlTextWriter writer)

Any ideas?

Memo said...

Hello Christian:

I am having problems running your PowerWebPart. The steps I followed were:

1. Runned setup in my server
2. iisreset
3. Went to a site
4. Site Settings
5. Site Features

And there I can't find the PowerWebPart.

Did I miss something?

BTW: I use the PowerActivity and it's great!

Christian said...

Hi Memo,
you should see the feature under site collection features.

Bye, Christian

Anonymous said...

I install pwp by dbl click setup.exe
go to sharepoint.. activate ilovesharepoint powerwebpart

goto add web part.. and can't find pwp in list.

then i go to add web-parts and see this:

Error on Initialization
Script is not signed!
в iLoveSharePoint.WebControls.PowerControl.Render(HtmlTextWriter writer) в System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) в System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) в System.Web.UI.Control.RenderControl(HtmlTextWriter writer) в iLoveSharePoint.WebControls.PowerWebPart.Render(HtmlTextWriter writer)

Christian said...

works as designed. the script that y will enter will be signed when you save it the first time (farm admin rights required)

Anonymous said...

I try to use a script in the library defined in the administration page.
The script was tested before in the webparts self.
I copy the script into a file, stored in the library and call this script by the import command.
It doesn't work.
I try to make the simplest example

function Render($writer)
$writer.Write("May the power be with you!")

and I get the error "
Error on render
PowerShell Exception:
The term 'render' 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 iLoveSharePoint.WebControls.PowerControl.Render(HtmlTextWriter writer) at iLoveSharePoint.WebControls.PowerWebPart.RenderContents(HtmlTextWriter writer)"

And idea?

BGM said...

Aaaaawww! I actually *want* to watch a video this time! It says "no videos were found." I'd really like to see the demo of this addon in action.

electronic signature pdf said...

Hi there! glad to drop by your page and found these very interesting and informative stuff. Thanks for sharing, keep it up!

maymay said...

Like with just about any substantial greenback object, anyone iwc replica sale consider having continuously you'll want to become knowledgeable regarding the different types, a brief history of such types along with Rolexes normally, along with which in turn style ideal accommodates your financial allowance along with manner impression. Nothing at all reduces your delight involving control similar to potential buyer's rolex replica, along with by simply rehearsing tolerance, anyone not simply make sure you happen to be seeking the excellent style in your case, you happen to be in addition making sure that you'll not expertise just about any regret following simple fact. Certification? Obtaining a pre-owned Rolex consists of ready for, along with tightly checking, the right breitling replica certification to ensure authenticity. Because market place pertaining to pre-owned Rolexes features heated up way up, consequently features products you can Rolex reproductions. The truth is, the top false Rolexes are incredibly challenging for you to for the people not in the necklaces organization for you to find, consequently a respected breitling replica sale marketer include your certification as being a subject naturally inside financial transaction. Standard Rolex qualifications must be consist of the main field along with scenario. The state qualifications involves crucial data, for example the serial variety, call data, activity variety, along with style situation. Legitimate certs will likely incorporate Rolex extended warranty fake rolex, the official Chronometer Qualifications, and also a exclusive crimson seal off at the bottom level using frayed guitar strings jogging by way of the idea.

Hug Day said...

happy hug day 2016 SMS
hug day 2016 Wishes cards greetings
Hug day Date 2016
hug day sms

Libin Huang said...

20160426libinferragamo outlet
pandora outlet
ferragamo shoes
nike air max
ferragamo shoes
hermes belt for sale
michael kors factory outlet
swarovski crystal
ferragamo shoes
michael kors outlet
louis vuitton handbags
louis vuitton handbags outlet
swarovski outlet
beats by dre
cazal outlet
mont blanc pens
longchamp solde
fitflops outlet
cartier sunglasses for men
michael kors outlet
louis vuitton outlet
swarovski crystal
cheap nfl jerseys
adidas outlet store
tory burch outlet
cheap oakley sunglasses
mulberry bags
rolex watches,rolex watches,swiss watches,watches for men,watches for women,omega watches,replica watches,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex
oakley sunglasses
tory burch outlet
ray ban sunglasses
louis vuitton outlet
polo ralph lauren
michael kors uk
tiffany outlet

Yuanyuan Lin said...

7.14llllllyuan"timberland shoes"
"soccer jerseys wholesale"
"longchamp pliage"
"cheap oakley sunglasses"
"true religion jeans"
"louis vuitton pas cher"
"rolex orologi"
"christian louboutin shoes"
"michael kors clearance"
"cheap nba jerseys"
"oakley sunglasses wholesale"
"tory burch shoes"
"tory burch outlet"
"chicago blackhawks jerseys"
"longchamp outlet"
"omega watches"
"adidas trainers"
"cheap nike shoes"
"nike outlet store online"
"michael kors outlet clearance"
"michael kors uk"
"montblanc pens"
"michael kors canada"
"longchamp handbags"
"ray ban sunglasses"
"abercrombie and fitch"
"mcm outlet"
"puma shoes"
"ralph lauren uk"
"nike air max 90"
"rolex watches,rolex watches,swiss watches,watches for men,watches for women,omega watches,replica watches,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex"
"mulberry outlet"
"air max 90"
"ferragamo outlet"
"christian louboutin outlet"

Fangyaya said...

louis vuitton handbags
tory burch shoes
adidas trainers
christian louboutin sneakers
nike roshe flyknit
louis vuitton handbags
toms wedges
concord 11
asics shoes for women
oakley outlet
coach outlet
adidas shoes
basketball shoes
michael kors outlet
michael kors outlet
christian louboutin outlet
michael kors outlet
jordan shoes
kate spade outlet
coach outlet online
coach outlet store
beats by dre
oakley vault
celine outlet
michael kors outlet online
ray ban sunglasses outlet
jordan concords
michael kors outlet online
gucci outlet online
christian louboutin sale
toms wedges
abercrombie clothing
michael kors outlet online
toms outlet
rolex watches
red bottom shoes
celine handbags
michael kors outlet online
abercrombie & fitch outlet
louis vuitton purses

dada24 Xu said...

toms shoes outlet
ugg outlet
celine outlet store
red bottoms
moncler jackets
adidas nmd
longchamp bags
cheap jordans
ugg outlet
christian louboutin shoes

chenlina said...

coach outlet
uggs outlet
ray ban wayfarer
ralph lauren uk
louis vuitton paris
ugg boots clearance
toms shoes
ralph lauren outlet
ray ban sunglasses

Meiqing Xu said...

pandora uk
true religion jeans
michael kors handbags
adidas nmd
true religion jeans
ugg australia
birkenstock shoes
michael kors canada
pandora bracelet
ray ban sunglasses

huali10 Cai said...

rolex watches for sale
louis vuitton
cheap jordans for sale
air max 90
longchamp outlet
nike outlet store online
tory burch outlet online
futbol baratas
cheap oakley sunglasses
michael kors outlet clearance

Unknown said...

cartier outlet
fitflops sale clearance
sac louis vuitton pas cher
longchamp outlet online
mulberry uk
thomas sabo charms
cheap oakley sunglasses
cheap nike shoes
ray-ban sunglasses
ralph lauren

dong dong23 said...

supra footwear
oakley sunglasses sale
cheap ray ban sunglasses
nike roshe 1
puma sneaker
cheap nfl jerseys wholesale
converse outlet
rolex replica watches
adidas yeezy
nike air max 90

xjd7410@gmail.com said...

polo ralph lauren outlet
michael kors handbags
mlb jerseys
cheap nfl jerseys
asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano
foamposite shoes
louis vuitton outlet
chrome hearts
oakley sunglasses sale
fitflops uk

raybanoutlet001 said...

nike air huarache
cheap basketball shoes
hugo boss suits
nike air huarache
new orleans saints jerseys
ray ban sunglasses
pandora outlet
nike huarache
armani exchange
rolex replica

Home Improvement NYC said...

Ajrin Construction Inc. is a licensed New York general construction firm working as General Contractors in NYC, truly devoted to our services and remain firm until our Clients’ purposes are served to satisfaction. We feel much concerned of the value of your property, safety and security more than our profit or anything else.
Home Improvement NYC

Games 2 Girls said...

The article you have shared here very awesome. I really like and appreciated your work. I read deeply your article, the points you have mentioned in this article are useful

Sankar lp said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.
or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

اميرة زماني said...

نقدم افضل خدمات تنظيف الكنب بالرياض فنحن نملك افضل اجهزة التنظيف بالبخار لاننا افضل شركة تنظيف كنب بالرياض
وبالمملكة واسعارنا في متناول الجميع
افضل شركة تنظيف بالمدينة المنورة
شركة شراء اثاث مستعمل بالرياض - شراء اثاث مستعمل
شركة تسليك مجاري بالدمام

اميرة زماني said...

شركة تسليك مجاري بالرياض
افضل شركة تنظيف منازل بالرياض
اسعار غسيل السجاد بالرياض
فك و تركيب باركيه بالرياض

khairy said...

شركة تنظيف فلل بالمدينة المنورة
شركة تنظيف سجاد بالمدينة المنورة
شركة تنظيف خزانات بالمدينة المنورة
شركة عزل اسطح بالمدينة المنورة
شركة تسليك مجاري بالمدينة المنورة
شركة تنظيف وصيانة مسابح بالمدينة المنورة
شركة تنظيف الاثاث بالمدينة المنورة

Obat Panas Demam said...

Thanks for sharing information :)

Cara Mengobati Peradangan Telinga
Cara Mengobati Gangguan Fungsi Lambung
Obat Luka Operasi Caesar
Obat Tradisional Untuk Penyakit Gerd
Cara Mengobati Masalah Peru-Paru
Pengobatan Eksim Dermatitis

kian santang said...

I can only express a word of thanks. Because with the content on this blog I can add knowledge I, thank has been sharing this information. Do not forget to visit our website to share information and knowledge about health.
cara mengobati fibroadenoma
obat kaki bengkak karena asam urat
Cara Mengobati Penyakit Splenomegali

obat kista coklat alami said...

I can only express a word of thanks. Because with the content on this blog I can add knowledge I, thank has been sharing this information. Do not forget to visit our website to share information and knowledge about health
cara mengobati kista coklat
khasiat walatra gamat emas kapsul

Pengobatan Atasi Benjolan Di Leher said...

There are times when you suffer the disease being treated immediately, before things got worse. Thank you for the information:)

Pengobatan Penyumbatan Pembuluh Darah Di Otak
Obat Hepatitis Alami
Pengobatan Kencing Manis Secara Alami
Obat Atasi Daya Tahan Tubuh Menurun Dan Mudah Lemah
Cara Mengobati Campak Pada Anak
Pengobatan Stroke Pada Wajah

Alyson ning said...

Journey Jewelry Debeers made the Rolex Replica Watches notion of Journey Jewellery a couple of decades ago but it took a while to catch on. Recently, Saint Laurent Outlet became 1 in the most popular diamond jewellery presents available. Journey Jewellery is established by using a assortment of diamonds growing in size from smallest to largest, these Louboutin Outlet Online symbolize the growth of love that men and women have for just one another. As your love grows so should your diamonds, at least that's what Debeers believes. Journey variations have been shown mostly in white gold set with Swiss Replica Watches princess or round diamonds. The thought is based loosely about the Previous, Present, & Future 3-stone jewellery that was also designed by Debeers, These charm bracelets make fantastic presents and most people invest in a single for themselves in addition as for good friends. The Replica Designer Handbags on the jewellery is the capability to make bracelets jointly with friends and family, as soon as created they appear incredible and very trendy.

Cara menyembuhkan kista ovarium said...

thank you very useful information admin, and pardon me permission to share articles here may help :

Cara menghilangkan tumit kaki pecah pecah
Cara mengatasi infeksi saluran kencing
Obat jantung bocor mujarab
Obat infeksi ginjal
Cara menyembuhkan radang gusi
Obat tradisional miom
Obat gabagen

Cara mengatasi babak said...

thank you very useful information admin, and pardon me permission to share articles here may help :

Obat herbal mata lelah
Obat asam lambung naik ampuh
Obat herbal malaria
Obat batuk rejan ampuh
Cara mengatasi kerutan di wajah
Cara menyembuhkan kanker serviks
Cara menyembuhkan ginjal bengkak

Obat dan Suplemen Kesehatan Tulang said...

If you have a history of illness that is difficult to recover, maybe our next article will help you to recover

Obat Radang Amandel Paling Ampuh
Cara mengatasi perut kembung
Cara Mengobati Radang Sendi
Obat Untuk Menghilangkan Benjolan Bernanah
Obat Penghancur Batu Empedu

Jelly Gamat Qnc said...

Really impressive post. I read it whole and going to share it with my social circules. I enjoyed your article and planning to rewrite it on my own blog.
pengobatan tumor
cara mengatasi perut begah
pengobatan liver bengkak
obat keloid
obat ginjal bengkak
obat thalasemia
obat benjolan di kepala
obat benjolan di payudara

Cara menyembuhkan polip hidung said...

may be useful for all, helpful article once and pardon me permission to share also here :

Obat miom alami
Cara mengobati infeksi saluran kencing
Obat sinusitis herbal
Obat herbal panu menahun
Obat herbal kurap
Cara mengobati sinusitis secara alami
Cara mengobati osteoarthritis

Anonymous said...

Obat sinusitis ampuh

Obat Tradisional Konjungtivitis said...

Thank you for sharing an interesting and very useful article. And let me share an article about health here I believe this is useful. Thank you :)

Cara Menghilangkan Benjolan di Langit Mulut
Cara Menghilangkan ambeien/Wasir Secara Permanen
Inilah Penyebab Mual dan Muntah secara Tiba-tiba
Obat Asma Alami (untuk semua usia),Terbukti Ampuh
Obat Diabetes Herbal, Pengobatan Alami Diabetes
Obat Penghancur Kista, Pengobatan Kista Tanpa Operasi

Inma Maulana said...

If you have a history of illness that is difficult to recover, maybe our next article will help you to recover

Cara menghilangkan Benjolan di Leher
Cara Melacarkan Haid
Obat pengapuran tulang
Cara menghilangkan keputihan yang tidak normal
Walatra Propolis Brazil
Obat Luka Diabetes

Cara menyembuhkan jantung bocor said...

given article is very helpful and very useful for my admin, and pardon me permission to share articles here hopefully helped :

Cara menyembuhkan darah manis
Cara menyembuhkan hemoptisis
Obat batuk rejan alami
Cara menyembuhkan gondongan
Obat ablasio retina tanpa operasi
Cara mengatasi penyakit dompo

Cara menyembuhkan abses payudara said...

thank you very useful information admin, and pardon me permission to share articles here may help :

Cara menghilangkan darah manis
Obat herbal kista coklat ampuh
Obat osteoarthritis ampuh
Cara menyembuhkan candidiasis
Cara menghilangkan bau tidak sedap pada kemaluan wanita
Obat kanker tenggorokan ampuh
Cara menghilangkan gabagen