<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title> Sundar Narasiman's Random Musings on .NET and SharePoint : SharePoint Administration</title><link>http://msmvps.com/blogs/sundar_narasiman/archive/tags/SharePoint+Administration/default.aspx</link><description>Tags: SharePoint Administration</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Script to automate the installation of wsp and activation of features</title><link>http://msmvps.com/blogs/sundar_narasiman/archive/2009/12/04/script-to-install-wsp-and-activate-features.aspx</link><pubDate>Sat, 05 Dec 2009 03:28:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1743719</guid><dc:creator>lavssun</dc:creator><slash:comments>0</slash:comments><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/sundar_narasiman/commentapi.aspx?PostID=1743719</wfw:comment><comments>http://msmvps.com/blogs/sundar_narasiman/archive/2009/12/04/script-to-install-wsp-and-activate-features.aspx#comments</comments><description>&lt;p&gt;This post is regarding the usage of a simple script to automate the wsp installation and featue activation. Whenever we want to deploy components like custom web parts,&amp;nbsp; custom user control and custom application pages etc. we use sharepoint solution packages for deployment and then we activate the respective features manually. It is a tediou job to&amp;nbsp;install the wsps and&amp;nbsp; activate the features manually, if we have multiple solution packages to be deployed. To automate this, we can use the the following script to install wsp and activate features.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;pre class="csharpcode"&gt;:begin
@echo off


set &lt;strong&gt;solutionName&lt;/strong&gt;=SampleSolution
set &lt;strong&gt;featureSampleFeature1&lt;/strong&gt;=SampleFeature1




rem ** Replace this value with the URL of your site **
@set url=http://yourserver/sites/rootsite/subsite


@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH% 



stsadm -o retractsolution   -name %solutionName%.wsp -immediate
stsadm -o execadmsvcjobs 
stsadm -o deletesolution -name %solutionName%.wsp -override


echo Adding solution %solutionName% to solution store...
echo ----------------------------------------------------

stsadm -o addsolution -filename %solutionName%.wsp
if errorlevel == 0 goto :deploySolution


echo ### Error adding solution %solutionName%
echo .
goto end

:deploySolution
echo Deploying solution %solutionName%...
echo ----------------------------------------------------
stsadm -o deploysolution -name %solutionName%.wsp -url %url% -immediate -allowGacDeployment -allowCasPolicies  -force
stsadm -o execadmsvcjobs 


if errorlevel == 0 goto :activateFeature

echo ### Error deploying solution %solutionName%
echo .
goto end



:activateFeature


echo Activating features in solution %solutionName%...
echo ----------------------------------------------------

stsadm -o activatefeature -name %featureSampleFeature1% -url %url% -force

if errorlevel == 0 goto :success

echo ### Error activating features
echo .
goto end


:success
echo Successfully deployed solution and activated feature(s)..
echo .
goto end

:end
pause&lt;/pre&gt;
&lt;pre class="csharpcode"&gt;&lt;/pre&gt;
&lt;pre class="csharpcode"&gt;In the above mentioned script, you can replace the solutionName with the name of your WSP and SampleFeature1 with the name of your feature to be activated. In this example, i&amp;#39;m activating a single feature. &lt;/pre&gt;
&lt;pre class="csharpcode"&gt;You can also mention multiple features in the script, so that multiple feature gets activated using this script.&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1743719" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/sundar_narasiman/archive/tags/SharePoint+Administration/default.aspx">SharePoint Administration</category></item><item><title>Script to retract sharepoint solution package (wsp) and deactivate features</title><link>http://msmvps.com/blogs/sundar_narasiman/archive/2009/10/13/script-to-retract-sharepoint-solution-package-wsp-and-deactivate-features.aspx</link><pubDate>Tue, 13 Oct 2009 20:38:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1732216</guid><dc:creator>lavssun</dc:creator><slash:comments>1</slash:comments><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/sundar_narasiman/commentapi.aspx?PostID=1732216</wfw:comment><comments>http://msmvps.com/blogs/sundar_narasiman/archive/2009/10/13/script-to-retract-sharepoint-solution-package-wsp-and-deactivate-features.aspx#comments</comments><description>&lt;p&gt;The following snippet contains the script to retract sharepoint solution packages and de-activate features. This would be become handy to the sharepoint adminstrators, when they want to retract multiple solution packages (wsp) and de-activate multiple features.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;:begin&lt;br /&gt;@echo off&lt;/p&gt;
&lt;p&gt;rem **&amp;nbsp;declare the solution to be retracted&amp;nbsp;**&lt;br /&gt;set solutionName=SampleSolution&lt;/p&gt;
&lt;p&gt;rem **&amp;nbsp;declare the set of fetures to be de-activated&amp;nbsp;**&lt;br /&gt;set featureSampleFeature1=SampleFeature1&lt;br /&gt;set featureSampleFeature2=SampleFeature2&lt;br /&gt;set featureSampleFeature3=SampleFeature3&lt;/p&gt;
&lt;p&gt;rem ** Replace this value with the URL of your site **&lt;br /&gt;@set url=http://servername/sites/sitecollectioname/sitename&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH% &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;echo deactivating features in solution %solutionName%...&lt;br /&gt;echo ----------------------------------------------------&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;stsadm -o deactivatefeature -name %featureSampleFeature1% -url %url% -force&lt;br /&gt;stsadm -o deactivatefeature -name %featureSampleFeature2% -url %url% -force&lt;br /&gt;stsadm -o deactivatefeature -name %featureSampleFeature3% -url %url% -force&lt;/p&gt;
&lt;p&gt;echo Attempting to uninstallfeature and retract solution&lt;br /&gt;echo ---------------------------------------------------&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;echo Rectracting solution %solutionName% from solution store...&lt;/p&gt;
&lt;p&gt;stsadm -o retractsolution&amp;nbsp;&amp;nbsp; -name %solutionName%.wsp -immediate&lt;br /&gt;stsadm -o execadmsvcjobs &lt;/p&gt;
&lt;p&gt;echo Deleting solution %solutionName% from solution store...&lt;br /&gt;stsadm -o deletesolution -name %solutionName%.wsp -override &lt;br /&gt;echo.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;if errorlevel == 0 goto :success&lt;br /&gt;:success&lt;br /&gt;echo Successfully deployed solution and activated feature(s)..&lt;br /&gt;echo .&lt;br /&gt;goto end&lt;/p&gt;
&lt;p&gt;:end&lt;br /&gt;pause&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1732216" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/sundar_narasiman/archive/tags/SharePoint+Administration/default.aspx">SharePoint Administration</category></item><item><title>Catastrophic backup restore through stsadm </title><link>http://msmvps.com/blogs/sundar_narasiman/archive/2008/02/13/catastrophic-backup-restore-through-stsadm.aspx</link><pubDate>Wed, 13 Feb 2008 09:08:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1511957</guid><dc:creator>lavssun</dc:creator><slash:comments>0</slash:comments><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/sundar_narasiman/commentapi.aspx?PostID=1511957</wfw:comment><comments>http://msmvps.com/blogs/sundar_narasiman/archive/2008/02/13/catastrophic-backup-restore-through-stsadm.aspx#comments</comments><description>&lt;p&gt;&lt;b&gt;Scenario &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Is it possible to perform catastrophic backup and restore through stsadm command line utility?&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Yes, this can be performed with the help of stsadm command line utility itself. The following would do a complete farm-level catastrophic backup &lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;font style="BACKGROUND-COLOR:#ffffff;"&gt;stsadm -o backup -directory &lt;/font&gt;&lt;a&gt;&lt;font style="BACKGROUND-COLOR:#ffffff;"&gt;file://backupservernetbiosname/backupsharename&lt;/font&gt;&lt;/a&gt;&lt;font style="BACKGROUND-COLOR:#ffffff;"&gt; -backupmethod full&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="http://technet2.microsoft.com/Office/en-us/library/f01916b3-1fe8-4ddd-bade-d5d0fdaa1ffe1033.mspx?mfr=true" href="http://technet2.microsoft.com/Office/en-us/library/f01916b3-1fe8-4ddd-bade-d5d0fdaa1ffe1033.mspx?mfr=true"&gt;http://technet2.microsoft.com/Office/en-us/library/f01916b3-1fe8-4ddd-bade-d5d0fdaa1ffe1033.mspx?mfr=true&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="http://mindsharpblogs.com/ben/archive/2006/09/19/1292.aspx" href="http://mindsharpblogs.com/ben/archive/2006/09/19/1292.aspx"&gt;http://mindsharpblogs.com/ben/archive/2006/09/19/1292.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If the backup restore strategy needs to be comprehensive, the IIS Metabase also needs to be considered &lt;/p&gt;
&lt;p&gt;&lt;a title="http://blogs.msdn.com/joelo/archive/2007/01/02/relationship-between-the-iis-metabase-and-sharepoint-configuration-database.aspx" href="http://blogs.msdn.com/joelo/archive/2007/01/02/relationship-between-the-iis-metabase-and-sharepoint-configuration-database.aspx"&gt;http://blogs.msdn.com/joelo/archive/2007/01/02/relationship-between-the-iis-metabase-and-sharepoint-configuration-database.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1511957" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/sundar_narasiman/archive/tags/SharePoint+Administration/default.aspx">SharePoint Administration</category></item><item><title>Remove SharePoint 2003 from Server</title><link>http://msmvps.com/blogs/sundar_narasiman/archive/2008/02/13/remove-sharepoint-2003-from-server.aspx</link><pubDate>Wed, 13 Feb 2008 08:50:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1511947</guid><dc:creator>lavssun</dc:creator><slash:comments>0</slash:comments><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/sundar_narasiman/commentapi.aspx?PostID=1511947</wfw:comment><comments>http://msmvps.com/blogs/sundar_narasiman/archive/2008/02/13/remove-sharepoint-2003-from-server.aspx#comments</comments><description>&lt;p&gt;&lt;b&gt;Scenario&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;There is a server running SharePointPortalServer 2003. It has many web applications running SharePoint sites. &amp;nbsp;How to remove SharePoint from just one web application? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The unextend functionality of stsadm.exe can be used to remove SharePoint from the selected IIS web application&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;font style="BACKGROUND-COLOR:#c0c0c0;"&gt;stsadm.exe -o unextendvs -url &amp;lt;url&amp;gt; -deletecontent&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a title="http://technet2.microsoft.com/Office/en-us/library/f057d1e5-f8b7-4c92-bb98-3f983df2a2d11033.mspx?mfr=true" href="http://technet2.microsoft.com/Office/en-us/library/f057d1e5-f8b7-4c92-bb98-3f983df2a2d11033.mspx?mfr=true"&gt;http://technet2.microsoft.com/Office/en-us/library/f057d1e5-f8b7-4c92-bb98-3f983df2a2d11033.mspx?mfr=true&lt;/a&gt;&lt;br /&gt;&lt;a title="http://technet2.microsoft.com/windowsserver/WSS/en/library/c3314243-a583-4e62-a49a-baf706da97401033.mspx" href="http://technet2.microsoft.com/windowsserver/WSS/en/library/c3314243-a583-4e62-a49a-baf706da97401033.mspx"&gt;http://technet2.microsoft.com/windowsserver/WSS/en/library/c3314243-a583-4e62-a49a-baf706da97401033.mspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If SharePoint needs to be completely removed from the server, the SharePoint server needs to be un-installed and the other components like indexes, database also need to be removed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1511947" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/sundar_narasiman/archive/tags/SharePoint+Administration/default.aspx">SharePoint Administration</category></item></channel></rss>