There are two parts to this PowerShell script – the first part is fairly straightforward as it simply adds and installs a solution file into the farm. I have added a line to the end of the script to wait until the solution has fully deployed before continuing:
#Set up Web Application variable
#Only needed if solution contains Web Application scoped resources
$webApp = Get-SPWebApplication -Identity http://portal#Add solution file to the farm
$solution = Add-SPSolution -LiteralPath "C:\Install\Solution.wsp"#Deploy solution
#Add -WebApplication $webApp to the line below if solution contains Web Application scoped resources
Install-SPSolution $solution -Force -GACDeployment#Wait for solution to be deployed
do {Start-Sleep -s 1} while ($solution.Deployed -eq $false)
If you have multiple solution files to deploy, then it is worth checking out this script from Gary Lapointe, which enables you to install and deploy solution files in bulk using an XML configuration file.
The second part of the script activates a site or site collection feature, which is also pretty standard, except that I have provided four scenarios:
- Activate site scoped feature in one site collection
$site = Get-SPSite http://portal
Enable-SPFeature -Identity "FeatureName" -Url $site.Url
$site.Dispose()
- Activate site scoped feature for all site collections in a Web Application
$webApp = Get-SPWebApplication -Identity http://portal
$webApp | Get-SPSite -limit all | ForEach-Object {Enable-SPFeature -Identity "FeatureName" -Url $_.Url}
- Activate web scoped feature in one site
$web = Get-SPWeb http://portal
Enable-SPFeature -Identity "FeatureName" -Url $web.Url
$web.Dispose()
- Activate web scoped feature for all sites in a site collection
$site = Get-SPSite http://portal
$site | Get-SPWeb -limit all | ForEach-Object {Enable-SPFeature -Identity "FeatureName" -Url $_.Url}
$site.Dispose()
Hello,
ReplyDeleteThank for sharing all these articles...
I have a question about an error occurred when executing enable-spfeature for a feature with a event receiver attached: "Enable-SPFeature : Failed to load receiver assembly... ..System.IO.FileNotFoundExeception...". I make the build again without attached event receiver and this error disappear. What is strange is the fact that I can enable the feature from web without problems (with the event receiver)
Did you ever solve this? I am having the same issue and would like to see if you were able to fix it and how.
DeleteThanks! Is there a way to configure the parameters that my feature needs to connect to a external server? It is a form in the configuration of the site and is empty in every new site, i have a lot of sites. Im glad for your help.
ReplyDeleteGreat stuff dude!
ReplyDeleteI used the bulk activation of web scoped features and added to a complete deployment script. Funny thing is, that the server memory fills up to 1,5GB per web scoped feature that is activated. And I activate several, so you can imagine I'm having performance issues. :)
Any thoughts on how to clear memory after each run of activating a web scoped feature without killing the powershell.exe process
Hi Mark - Are you disposing of the web object after activating features?
ReplyDeleteHi Phil - Yep
ReplyDelete2015-12-7 xiaozhengm
ReplyDeletecanada goose outlet
tory burch outlet
tiffany jewelry
adidas outlet store
instyler max
michael kors outlet online
new balance outlet
moncler jackets
ghd straighteners
kate spade outlet
polo outlet
rolex replica watches
prada outlet
coach factory outlet
jordan 3
moncler outlet
nike sb
air max 95
michael kors handbags
toms outlet
nike tn
tommy hilfiger outlet
ugg outlet
louis vuitton
mont blanc pens
michael kors
louis vuitton
ghd hair straighteners
canada gooses outlet
oakley sunglasses
michael kors
kate spade
coach outlet store online
cheap oakley sunglasses
uggs outlet
cheap jordan shoes
michael kors uk
adidas shoes
fitflops
mont blanc pens
Great Article..
ReplyDeleteOnline DotNet Training
.Net Online Training
Dot Net Training in Chennai
IT Training in Chennai
gucci sunglasses uk
ReplyDeletelongchamp pliage
nike air force 1
longchamp handbags
football shirts
tory burch outlet online
cartier watches
jordan pas cher
oakley sunglasses
cheap soccer jerseys
chrome hearts outlet
ralph lauren polo
hermes outlet
true religion jeans
versace sunglasses on sale
michael kors outlet online
ray ban sunglasses
fitflops clearance
rolex watches
cartier outlet store
prada sneakers
chrome hearts outlet
rolex watches
cheap jordans
ralph lauren outlet
tiffany and co
louis vuitton outlet store
ferragamo shoes
polo ralph lauren
dior outlet
cai20160519
louis vuitton
ReplyDeletecoach factory outlet
ray ban sunglasses outlet
coach factory outlet
rolex submariner watches
louis vuitton handbags
louis vuitton outlet
toms outlet
jordans
ray ban sunglasses
ralph lauren polo
cartier watches
oakley sunglasses
rolex watches
louis vuitton handbags
pandora jewelry
ralph lauren uk
true religion jeans
ray ban sunglasses
burberry outlet
jordan 3 infrared
cheap jordans
michael kors handbags
fitflops
coach outlet online
cheap ray ban sunglasses
abercrombie outlet
louis vuitton outlet
basketball shoes
jordan shoes
longchamp handbags
michael kors handbags
true religion outlet
burberry outlet online
michael kors handbags
adidas trainers
adidas originals
abercrombie and fitch
adidas outlet
tods shoes
20168.8wengdongdong
ugg boots
ReplyDeletecoach outlet
fitflops sale
celine outlet
beats by dr dre
jordan shoes
nike trainers
michael kors handbags
nike free run
chrome hearts
chanyuan1011
It sensual massage in london not simply relaxes your head, legs, arms,
ReplyDeleteand elbows as well.
Thanks regarding delivering this type of awesome post
ReplyDeleteشركة طيور الجنة افضل شركة تنظيف بالدمام شركة متخصصة فى تنظيف المنازل بالدمام والخبر حيث لدينا طرق خاصة عن باقى شركات التنظيف وعندنا افضل عمال التنظيف حيث انهم متخصصون فى اعمال النظافة حيث اننا نعمل على رضاء العميل حيث نعطية مايرضية من اعمل التنظيف فنحن شركة تنظيف فلل بالدمام والخبر نتخصص فى نظافة الفلل بالدمام فتنظيف الفلة من الاعلى الى الاسفل حتى الحوش ونقوم ايضا كــ شركة تنظيف شقق بالدمام والخبر بنظافة الشقة من ارضيات وجدران وحمامات ومطابخ فهناك اشكال مختلفة من الشقق بالدمام ولكن الشقة التى نقوم بتنظيفها لابد وان تكون مختلفة فشركة طيور الجنة تعطيك ما يرضيك ولدينا كــ شركة تنظيف منازل بالدمام افضل طرق نظافة المنازل بالدمام والخبر وهناك شركة تنظيف موكيت بالدمام والخبر حيث اننا نقوم بغسيل الموكيت بافضل طرق التنظيف وافضل ماكينات التنظيف وهذا ما يميز شركتنا عن باقى شركات الرياض لاننا افضل شركة تنظيف بالخبر والخبر وعندنا تجد شركة تنظيف مجالس بالدمام والخبر حيث غسيل المجالس بطرقنا الخاصة ولدينا فرع شركة تنظيف كنب بالدمام ونقدم لكم فرع شركة جلى بلاط بالدمام للقيام بخدمات الجلى
شركة مكافحة حشرات بالدمام تقدم افضل مكافحة للحشرات باستخدام افضل المبيدات الحشرية القوية والقادرة على مكافحة كافة انواع الحشرات والقضاء عليها نهائيا تعبر شركة طيور الجنه افضل شركة رش مبيدات بالدمام
نقدم لكم خدماتنا المميزة بطبعها فقط في شركة تسليك مجارى بالدمام الخدمة الاكثر جودة و الاقل ثمنا الان و لاول مرة احصل على مجاري نظيفة و ليست بها اية روائح كريهة فنحن عبارة عن فريق دو خبرة سنوات في تسليك المجاري بالدمام باحدث الطرق و التقنيات التي لم يسبق لاحد تجربتها
louis vuitton outlet
ReplyDeletemcm bags
beats by dre
louis vuitton
michael kors handbags
toms shoes
louis vuitton handbags
louis vuitton outlet
michael kors outlet
polo ralph lauren
20173.9chenjinyan
swarovski crystal
ReplyDeleterolex watches
nike store uk
louis vuitton outlet
coach factory outlet
burberry outlet
rolex watches
oakley sunglasses
coach outlet online
cheap jordans
20170323lck
Oh my goodness! Incredible article dude! Thanks, However I
ReplyDeleteam going through problems with your RSS. I don’t understand the reason why I cannot join it.
Is there anyone else having the same RSS problems?
Anyone who knows the answer will you kindly respond? Thanx!!
Hi mates, its fantastic article about cultureand entirely explained, keep it up all the time.
ReplyDelete20170327 junda
ReplyDeletelouis vuitton outlet
louis vuitton
oakley sunglasses
ferragamo shoes
gucci outlet
cheap ray ban sunglasses
hermes bags
michael kors outlet stores
oakley sunglasses
gucci outlet
cheap oakley sunglasses
ReplyDeletenhl jerseys
vans store
ralph lauren outlet
ed hardy shirts
michael kors handbags
true religion outlet
air jordan shoes
ray ban eyeglasses
air jordan shoes
2017.5.15chenlixiang
giuseppe zanotti outlet
ReplyDeleteralph lauren polo
oakley sunglasses wholesale
ralph lauren outlet
ray ban sunglasses outlet
valentino outlet
coach outlet
wanglili21070524
Its like you learn my thoughts! You appear to understand a
ReplyDeletelot approximately this, like you wrote the book
in it or something. I think that you just can do with a few percent to drive the message house a bit, however
instead of that, that is excellent blog. A great read.
I will certainly be back.
Hey there are using WordPress for your site platform?
ReplyDeleteI’m new to the blog world but I’m trying to get started and set up
my own. Do you need any coding expertise to make your own blog?
Any help would be greatly appreciated!
coach outlet online
ReplyDeletecoach handbags outlet
prada sunglasses for women
nba jerseys wholesale
michael kors outlet online
mulberry outlet
louis vuitton handbags
oakley sunglasses
cheap football shirts
fitflops uk
chanyuan2017.06.08
canada goose outlet
ReplyDeleteralph lauren polo shirts
coach outlet online
fitflops shoes
adidas trainers
burberry outlet
longchamp solde
canada goose outlet
coach outlet
cartier outlet
chanyuan2017.10.14
20180115 junda
ReplyDeletepandora outlet
nike trainers
ugg outlet
michael kors outlet clearance
nike air sko
coach outlet online
ecco outlet
air jordan shoes
cheap oakley sunglasses
adidas wings shoes
Hopefully today is exciting, very interesting article once to read and hopefully useful for everything
ReplyDeletePengobatan Ampuh Luka Operasi Caesar
Cara Mengobati Liver
Obat Kista Bartholin Ampuh
Pengobatan Iritasi Lambung
Pengobatan Atasi Kista Ganglion
Pengobatan Atasi Kejang Demam Pada Anak
ReplyDeleteشركة رش مبيدات بالرياض
رش مبيدات بالرياضlevel
شركة رش دفان بالرياض
شركة مكافحة النمل الابيض بالرياض
شركة مكافحة فئران بالرياض
شركة مكافحة الصراصير بالرياض
شركة مكافحة الحمام بالرياض
شركة رش مبيدات بالخرج
ReplyDeleteI don't apperceive what it is about the bendable blow and matte finish, but I accept a anemic atom for printed suede Christisn Louboutin Outlet. One of the best brands to cull this off is YSL Wallet Outlet. I accept to acquaint you about a backpack attraction of mine. I am in fact mad at myself that I did not splurge on the Ralph Lauren Polo Outlet Croc Muse Two which has two colors that I admire with a sueced croc pattern. To see a formed suede accomplishment off a Red Bottoms Outlet that I already adore, my affection melts. Replica Watches are additionally pretty reflective of their user's persona. Amazing furthermore multi-colored Replica Watches are commonly worn because of the younger. Conversely, exquisite dress Swiss Rolex Replica are regularly sported by highly developed gentlemen. And then usually there's the luxurious Swiss Replica Watches worn by the individuals who're properly to complete. Check out observing your mates furthermore you can before long see how the layouts are actually ranging.
1、
ReplyDeletecheap jordan shoes
golden goose sneakers
golden goose
fitflops clearance
coach outlet
basketball shoes
cheap jordans
reebok outlet store
cheap basketball shoes
cheap air jordans
20180601xiaoke
ReplyDeleteuggs on sale
cheap air jordans
christian louboutin
cheap ray bans
isabel marant outlet
bulgari jewelry
kyrie 4
fitflops shoes
nike outlet online
kate spade outlet online
The information which you people are given are really good, These look really great.
ReplyDeletecara menyembuhkan tipes
obat radang paru paru
obat polip hidung
obat sembelit
obat flek paru paru
Thanks for the information, this is very useful. Allow me to share a health article here, which gods are beneficial to us. Thank you :)
ReplyDeleteCara Memesan QnC Jelly Gamat
Cara Mengobati kista Bartholin tanpa Operasi
Biaya dan Efek Samping Operasi Kista Bartholin
Obat ISPA paling Ampuh
Vitamin Penguat Tulang dan sendi
Cara Mengobati Kencing yang Tersendat
También puede visitar una tienda de ladrillo y mortero de Michael Kors o su sitio web y comprar directamente un bolso Michael Kors desde allí. Usar un bolso de Michael Kors les permite a los demás reconocer que el habitante urbano educado toma la moda realmente con seriedad. Los bolsos de hombro son particularmente refinados y elegantes.
ReplyDelete{Bolsas Michael Kors Precios | Bolsos Michael Kors Outlet | Michael Kors Rebajas}
En vacker konstnärlig skapelse av vävt läder, som ger ett skalskaligt utseende - liknar en snakeskin eller fiskhud, linjer utsidan av påsen. Läderens bältros är små läderringar. Det finns också gyllene accenter på väskan. Slutresultatet är svagt liknar kedjepost.
{Michael Kors Rea | Michael Kors Väska Rea | Michael Kors Plånbok}
His article is very helpful at all thanks
ReplyDeleteCara Mengobati bisul
Cara Mengobati Benjolan Pada Mata
Cara Mengobati Penyakit Gondongan
Obat Asam Urat Paling Ampuh
Cara Menghilangkan Keputihan
Cara Mengobati Hematuria
At this time I will share articles about health hopefully can be useful for everyone.
ReplyDeleteCara Mengobati Demam Pada Anak
Obat Difteri Paling Ampuh
Cara Mengobati Kram Dan Kesemutan
Tips Paling Jitu Untuk Mengatasi Penyakit Demam Berdarah Dengue
Khasiat dan Manfaat Sayuran
Obat Balas Bogo Pada Tubuh
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 :)
ReplyDeleteCara Mengobati Penyakit Tipes Super Ampuh
Cara Mengatasi Jantung Koroner secara Alami
Obat Tradisional Penurun Asam Urat
Permission to share friends, articles about health and hopefully useful for all Cara Melancarkan Haid Cara Mengatasi Susah Kencing Cara Mengatasi Glaukoma Cara Menyembuhkan Polip Hidung
ReplyDeleteThis article is interesting and useful
ReplyDeleteObat Paling Manjur Untuk ISK
Obat Herbal Untuk Penyakit Encok
Bahaya Keringat Dingin
His article is very helpful at all thanks
ReplyDeleteCara Mengobati bisul
Cara Mengobati Benjolan Pada Mata
Cara Mengobati Penyakit Gondongan
Obat Asam Urat Paling Ampuh
Cara Menghilangkan Keputihan
Cara Mengobati Hematuria
When you were injured when you were upset, I would take care of you and sleep
ReplyDeleteObat Bisul Alami
Obat Kanker Darah Alami
Cara Mengatasi Sembelit Pada Ibu Hamil
Obat Usus Buntu Alami
Mengobati Kaligata Pada Ibu Hamil
Herbal Solusi Sehat
This article is interesting and useful. Thank you for sharing. And let me share an article about health that God willing will be very useful. Thank you :)
ReplyDeleteObat Alami Menurunkan tekanan Darah Tinggi
Obat Benjolan Di Ketiak
Cara Mengobati Kencing Tersendat
Thank you for joining us. his article is very helpful
ReplyDeleteObat Herbal Paling Ampuh Untuk Mengobati Penyakit Hipotiroid
Manfaat Buah-Buahan Untuk Kesehatan
Obat Untuk Mengobati penyakit osteoarthritis
Bahaya Penyakit Muntaber
Obat Penyakit Jantung Bengkak
Cara Mengobati Penyakit Leukimia
A beautiful purse or handbag from Coach Outlet Online can last for many years, and represent a great overall value.
ReplyDeleteThere are Michael Kors Bags Outlet in a large number of shopping malls located throughout the country.
Cheap Michael Kors Bags is a great way to determine which models best suit your needs.
Official Coach Factory Outlet Online all strive to provide comfort and convenience for their owners and the seams are double-stitched for maximum durability.
Michael Kors Factory Store, has one of the most popular handbag and accessory lines on the market today.
Coach Handbags Wholesale says a lady is classy, elegant and sophisticated.
Coach Store Near Me trends come and go, but a Coach stands the test of time.
The official Michael Kors Handbags On Sale Outlet regularly posts various handbags being offered for sale.
Compare your Coach Bags On Sale Outlet to the logo provided on the website to make sure it is similar.
All Michael Kors Outlet Online Store have serial numbers.
No matter what type of Michael Kors Bags Outlet each individual got, they all had one thing in common. We all know that getting something on sale is like winning a mini lottery, but to find a name brand handbag like Michael Kors Black Friday Sale for instance, discounted is like a slice of heaven on earth. I have personally attacked my husband with hugs and kisses when finding Official Coach Outlet Online at discounted prices.
ReplyDeleteMichael Kors Factory Outlet stores can be found in malls all over. MK Outlet and other Coach merchandise can also be found in some boutiques. Inspired by the same material baseball gloves are made from, these Coach Bags On Sale Online are versatile and stylish. Since it's conception, the Michael Kors Handbags Outlet has been produced into a variety of designs, colors, shapes, and styles that have won top pick of millions of women the world over.
New Michael Kors Bags are the most sought after handbag. Since Coach Outlet Online is one of the most recognized name brands in the world of fashion, you will find A-list celebrities down to small girls wearing them.
tags:Coach Outlet|Coach Bags Factory Outlet|Coach Purses Outlet
Thanks for sharing the article...You write very well...If you need backlinks please reach me on genuinehotelescorts@gmail.com
ReplyDeleteCall Girls in Jaipur
Call Girls in Jaipur
Call Girls in Jaipur
Call Girls in Delhi
Call Girls in Guwahati
Call Girls in Guwahati
Call Girls in Guwahati
Call Girls in Guwahati
Call Girls in Aerocity
Call Girls in Lucknow