<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.dotnetmafia.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>Corey Roth [MVP] : PowerShell</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx</link><description>Tags: PowerShell</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Installing SharePoint 2013 apps with PowerShell</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/28/installing-sharepoint-2013-apps-with-powershell.aspx</link><pubDate>Thu, 28 Feb 2013 17:00:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6216</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=6216</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/28/installing-sharepoint-2013-apps-with-powershell.aspx#comments</comments><description>&lt;p&gt;My PowerShell posts always prove to be the most popular.&amp;#160; I showed all sorts of cool PowerShell tricks in my talk back at SPC12.&amp;#160; One of the things I covered was how to install and manage apps using PowerShell.&amp;#160; Since there is a corporate catalog and SharePoint store, you might not think you need to install apps with PowerShell, but your developers may choose to the app model for a future internal project, so as an IT Pro you need to know how to install the thing.&amp;#160; There are a lot of similarities to working with solution packages but there are several differences to be aware of.&amp;#160; The documentation on TechNet is pretty good, but putting it all together can be tricky. &lt;/p&gt;  &lt;p&gt;Specific to PowerShell, there is some terminology to familiarize yourself with.&amp;#160; You’ll see these for parameter names so you need to know what they are otherwise you’ll find yourself confused.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;App Package – physical file containing the app (.app file)&lt;/li&gt;    &lt;li&gt;App – an instance of an app installed on a particular subsite&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Along with the App, you’ll find an Id property that refers to a GUID of that particular app instance.&amp;#160; We’ll talk about that more when it comes to updates.&lt;/p&gt;  &lt;p&gt;To begin installing app, we first install the .app file into a site collection and then we deploy the app to an individual subsite.&amp;#160; To install the app package, we use &lt;a href="http://technet.microsoft.com/en-us/library/jj219734(v=office.15).aspx"&gt;Import-SPAppPackage&lt;/a&gt;.&amp;#160; Specify the path to your app package (.app file) with the &lt;em&gt;–Path &lt;/em&gt;parameter.&amp;#160; You’ll also need to specify which Site Collection will contain the app using the –&lt;em&gt;Site&lt;/em&gt; parameter.&amp;#160; Finally, the &lt;em&gt;Source&lt;/em&gt; parameter tells SharePoint where the app came from (SharePoint Store, Corporate Catalog, or Object Model).&amp;#160; I always specify a value of &lt;em&gt;ObjectModel&lt;/em&gt; for my custom apps.&amp;#160; Here’s what the command looks like.&amp;#160; Assign the results of the command to variable so that you can use it in the next step.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$spapp = Import-SPAppPackage -Path .\spcdemoapp.app -Site &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://server/sitecollection&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt; –Source ObjectModel&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppImportSPAppPackage_5C8C8D2E.png"&gt;&lt;img title="PowerShellAppImportSPAppPackage" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppImportSPAppPackage" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppImportSPAppPackage_thumb_7A8A9B22.png" width="592" height="124" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can always add &lt;em&gt;–confirm:$false &lt;/em&gt;to avoid getting prompted.&lt;/p&gt;  &lt;p&gt;Now you have the AppPackage installed, you can deploy an instance of it to a subsite using &lt;a href="http://technet.microsoft.com/en-us/library/jj219537(v=office.15).aspx"&gt;Install-SPApp&lt;/a&gt;.&amp;#160; You’ll need to provide a URL to the subsite using the –&lt;em&gt;Web&lt;/em&gt; parameter and a reference to the imported app package.&amp;#160; That’s why we saved the results of the last command into $spapp.&amp;#160; Use the following command.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$instance = Install-SPApp -Web &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="http://server/sitecollection/site"&gt;http://server/sitecollection/site&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt; -Identity $spapp&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppInstallApp_519F8619.png"&gt;&lt;img title="PowerShellAppInstallApp" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppInstallApp" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppInstallApp_thumb_17441038.png" width="591" height="65" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Like always with PowerShell, no news is good news.&amp;#160; At this point, you should find the app installed on the Site Contents pages.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/NewAppInstalled_7C97741E.png"&gt;&lt;img title="NewAppInstalled" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="NewAppInstalled" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/NewAppInstalled_thumb_4D658887.png" width="244" height="116" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here’s what it looks like it is running.&amp;#160; This is mainly for reference when we start talking about updates.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/NewAppDefaultPage_4BB4BCB3.png"&gt;&lt;img title="NewAppDefaultPage" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="NewAppDefaultPage" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/NewAppDefaultPage_thumb_713E3A14.png" width="360" height="258" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;To determine what apps are installed on a particular subsite use &lt;a href="http://technet.microsoft.com/en-us/library/jj219678(v=office.15).aspx"&gt;Get-SPAppInstance&lt;/a&gt;.&amp;#160; This cmdlet can be executed three different ways.&amp;#160; You need the id of the App Instance to update, export, or remove it.&amp;#160;&amp;#160; So often you combine it with a Where-Object command to get a reference to an app instance by name instead of by id.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$instance = Get-SPAppInstance -web http://server/sitecollection/site | Where-Object { $_.Title -eq &amp;quot;MyApp&amp;quot; }&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppGetSPAppInstance_4F726183.png"&gt;&lt;img title="PowerShellAppGetSPAppInstance" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppGetSPAppInstance" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppGetSPAppInstance_thumb_06D872B2.png" width="592" height="271" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you have a reference to the App Instance, removing the app from a subsite is easy with &lt;a href="http://technet.microsoft.com/en-us/library/jj219643.aspx"&gt;Uninstall-SPAppInstance&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Uninstall-SPAppInstance -Identity $instance&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppUninstallSPAppInstance_72067A31.png"&gt;&lt;img title="PowerShellAppUninstallSPAppInstance" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppUninstallSPAppInstance" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppUninstallSPAppInstance_thumb_42685BA5.png" width="596" height="117" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One nice feature of PowerShell is that you have the ability to export an installed app to a .app file using &lt;a href="http://technet.microsoft.com/en-us/library/jj219603(v=office.15).aspx"&gt;Export-SPAppPackage&lt;/a&gt;.&amp;#160; It takes a parameter named &lt;em&gt;-App&lt;/em&gt;.&amp;#160; It expects the value from an instance called .App (so use Get-SPAppInstance as shown above).&amp;#160; You also want to specify where to save the file using the &lt;em&gt;–Path&lt;/em&gt; parameter.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Export-SPAppPackage –App $instance.App –Path .\ExportApp.app&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppExportSPAppPackage_209C8314.png"&gt;&lt;img title="PowerShellAppExportSPAppPackage" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppExportSPAppPackage" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppExportSPAppPackage_thumb_46260075.png" width="599" height="187" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When it comes to updating apps, that’s where things get a bit tricky.&amp;#160; Here is what you need to do:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Get a reference to the existing installed instance using Get-SPAppInstance shown earlier&lt;/li&gt;    &lt;li&gt;Import the new app package with Import-SPAppPackage&lt;/li&gt;    &lt;li&gt;Use &lt;a href="http://technet.microsoft.com/en-us/library/jj219631(v=office.15).aspx"&gt;Update-SPAppInstance&lt;/a&gt; with a reference to the imported app package and the existing instance&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Here are the commands&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$instance = Get-SPAppInstance -web http://server/sitecollection/site | Where-Object { $_.Title -eq &amp;quot;MyApp&amp;quot; }&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$spappv2 = Import-SPAppPackage -Path .\myapp.app -Site http://server/sitecollection/site -Source ObjectModel&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Update-SPAppInstance – Identity $instance –App $spappv2&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppUpdateSPAppInstance_7D1FDEAE.png"&gt;&lt;img title="PowerShellAppUpdateSPAppInstance" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellAppUpdateSPAppInstance" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAppUpdateSPAppInstance_thumb_425835D8.png" width="602" height="156" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One thing you might have noticed by now is that there is no way to retrieve which app packages are installed nor is there any way to remove them using PowerShell.&amp;#160; This is a bit different than the way we deal with solution packages.&amp;#160; I suspect it cleans itself up, but I’m really not sure.&amp;#160; I hope these PowerShell commands prove to be useful to you.&amp;#160; Let me know if you run into any issues.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6216" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Apps/default.aspx">Apps</category></item><item><title>How to: Perform a SharePoint 2013 site collection upgrade with PowerShell</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/04/how-to-perform-a-sharepoint-2013-site-collection-upgrade-with-powershell.aspx</link><pubDate>Mon, 04 Feb 2013 23:11:30 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6153</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=6153</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/02/04/how-to-perform-a-sharepoint-2013-site-collection-upgrade-with-powershell.aspx#comments</comments><description>&lt;p&gt;At &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/26/speaking-at-sharepoint-conference-2012.aspx"&gt;SPC12&lt;/a&gt;, I gave a talk about PowerShell in SharePoint 2013.&amp;#160; In that talk I upgraded a SharePoint 2010 site collection to SharePoint 2013.&amp;#160; I wanted to follow-up with a blog post showing the steps involved.&amp;#160; To begin the process, I have restored a copy of my content database from my SharePoint 2010 environment on the SQL Server for my SharePoint 2013 environment.&amp;#160; The first thing we need to do is mount the content database with &lt;a href="http://technet.microsoft.com/en-us/library/ff607581.aspx"&gt;Mount-SPContentDatabase&lt;/a&gt;. In SharePoint 2010, this process would actually update the database and perform the upgrade.&amp;#160; Now, it actually just attaches the database but leaves the site running in SharePoint 2010 mode.&amp;#160; Effectively you are running a full copy of SharePoint 2010 inside SharePoint 2013.&amp;#160; You can do this and upgrade each site collection one at a time to make the transition process a bit easier.&amp;#160; &lt;/p&gt;  &lt;p&gt;Typically, when you are doing this, you’ll execute &lt;a href="http://technet.microsoft.com/en-us/library/ff607941.aspx"&gt;Test-SPContentDatabase&lt;/a&gt; first and resolve any reported issues.&amp;#160; Just like in SharePoint 2010, you need to install all of your customizations via solution package prior to mounting.&amp;#160; &lt;em&gt;Test-SPContentDatabase&lt;/em&gt; can help you find some of these customizations if they are missing.&amp;#160; For simplicity, I am going to leave that out of my example today.&amp;#160; &lt;em&gt;Mount-SPContentDatabase&lt;/em&gt; typically takes two parameters:&amp;#160; the name of the database and the URL of the Web Application to bind it to.&amp;#160; Here is what the command looks like.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Mount-SPContentDatabase –Name DatabaseName –WebApplication &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://server&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When it runs, you’ll see a progress indicator.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MountSPContentDatabaseProgress_1A34E577.png"&gt;&lt;img title="MountSPContentDatabaseProgress" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MountSPContentDatabaseProgress" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MountSPContentDatabaseProgress_thumb_07EC1EB5.png" width="506" height="82" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When it finishes, you’ll likely have errors.&amp;#160; You can track them down and re-mount.&amp;#160; More than likely you’ll always have some kind of error regardless of how hard you try.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MountSPContentDatabaseCompleteWithErrors_19C8B282.png"&gt;&lt;img title="MountSPContentDatabaseCompleteWithErrors" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="MountSPContentDatabaseCompleteWithErrors" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/MountSPContentDatabaseCompleteWithErrors_thumb_2BA5464F.png" width="510" height="183" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now you can go to the site in your web browser.&amp;#160; You’ll see your existing site running in SharePoint 2010 mode along with a banner prompting to start the site collection upgrade process.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradeSharePoint2010Mode_4B542017.png"&gt;&lt;img title="UpgradeSharePoint2010Mode" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="UpgradeSharePoint2010Mode" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradeSharePoint2010Mode_thumb_66F8AC0D.png" width="617" height="352" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can start the upgrade process right there in the browser, but we want to use PowerShell.&amp;#160;&amp;#160; We can see the upgrade status of our site collections using &lt;a href="http://technet.microsoft.com/en-us/library/ff607950.aspx"&gt;Get-SPSite&lt;/a&gt;.&amp;#160; This cmdlet has been updated to show you the current version (ComaptibilityLevel) of the site collection.&amp;#160; A value of 14 represents SharePoint 2010 while a value of 15 represents SharePoint 2013.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPSite&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPSite_1FA3561B.png"&gt;&lt;img title="PowerShellGetSPSite" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellGetSPSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPSite_thumb_317FE9E8.png" width="512" height="254" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To upgrade a site collection, test it out first using &lt;a href="http://technet.microsoft.com/en-us/library/fp161259.aspx"&gt;Test-SPSite&lt;/a&gt;.&amp;#160; Like &lt;em&gt;Test-SPContentDatabase&lt;/em&gt;, this command can help you identify any particular issues.&amp;#160; In my case, I am going to upgrade my root site collection.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Test-SPSite &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://server/sitecollection&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellTestSPSite_3832F36B.png"&gt;&lt;img title="PowerShellTestSPSite" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellTestSPSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellTestSPSite_thumb_5F0109AB.png" width="511" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;SharePoint 2013 has a new concept for the upgrade evaluation site collection.&amp;#160; Effectively this process schedules a job to copy your site collection, upgrade it, and then optionally notify you (if you add the –email parameter).&amp;#160; You don’t have to use this, but it’s a good way to test things out if you have a tricky site with a lot of customizations.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Request-SPUpgradeEvaluationSite http://server/sitecollection&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Executing the command simply returns you to a command prompt.&amp;#160; Later a job will fire off and create the upgrade evaluation site collection.&amp;#160; This appears to be controlled by the &lt;em&gt;Create Upgrade Evaluation Site Collections job&lt;/em&gt;.&amp;#160; It only executes once a day so if you want to get your upgrade evaluation site faster, you can go manually run it.&amp;#160; After it completes, you can visit your site by appending –eval to your site collection name (i.e.: http://server/sitecollection-eval).&amp;#160; When you visit the site you’ll notice the warning bar at the top telling users that this is only temporary.&amp;#160; After 30 days or so the site will get deleted automatically.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradeEvaluationSiteCollection_37C6C076.png"&gt;&lt;img title="UpgradeEvaluationSiteCollection" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="UpgradeEvaluationSiteCollection" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradeEvaluationSiteCollection_thumb_7E43B07E.png" width="595" height="346" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you see I have an error in a web part that I need to correct.&amp;#160; This is why upgrade site collections can be useful in finding issues before cutting over.&lt;/p&gt;  &lt;p&gt;Let’s upgrade out site collection directly now.&amp;#160; I only received warnings from &lt;em&gt;Test-SPSite &lt;/em&gt;so I am going to proceed with the upgrade and assume everything is going to work fine. :)&amp;#160; We use &lt;a href="http://technet.microsoft.com/en-us/library/fp161257.aspx"&gt;Upgrade-SPSite&lt;/a&gt; to make this happen.&amp;#160; Pass the URL to the site collection and be sure and include &lt;em&gt;–VersionUpgrade&lt;/em&gt;.&amp;#160; It won’t upgrade to the new version if you leave off that parameter.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Upgrade-SPSite &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://server/sitecollection&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt; –VersionUpgrade&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUpgradeSPSiteInProgress_16D34DCF.png"&gt;&lt;img title="PowerShellUpgradeSPSiteInProgress" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellUpgradeSPSiteInProgress" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUpgradeSPSiteInProgress_thumb_0FB41157.png" width="521" height="64" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Depending on the size of your site collection, it may take some time.&amp;#160; When it finishes, you’ll see something similar to the screen below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUpgradeSPSiteComplete_646F7A4F.png"&gt;&lt;img title="PowerShellUpgradeSPSiteComplete" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="PowerShellUpgradeSPSiteComplete" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUpgradeSPSiteComplete_thumb_485EBB64.png" width="525" height="61" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, we can visit our upgraded site in the browser.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradedSiteCollection_6F2CD1A4.png"&gt;&lt;img title="UpgradedSiteCollection" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="UpgradedSiteCollection" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpgradedSiteCollection_thumb_5CE40AE2.png" width="596" height="391" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Site Collections Upgrades are a powerful new feature in SharePoint 2013 which I believe will really make the process smoother.&amp;#160; Keep in mind, you can also use the new &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/10/21/copying-site-collections-with-powershell-in-sharepoint-2013-preview.aspx"&gt;Copy-SPSite&lt;/a&gt; cmdlet to make a copy of your site collection and perform some tests there.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6153" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+Upgrade/default.aspx">SharePoint Upgrade</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category></item><item><title>How to: Use PowerShell with SharePoint Online Preview</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/11/29/how-to-use-powershell-with-sharepoint-online-preview.aspx</link><pubDate>Thu, 29 Nov 2012 13:59:00 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:6037</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=6037</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/11/29/how-to-use-powershell-with-sharepoint-online-preview.aspx#comments</comments><description>&lt;p&gt;I recently spoke about &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/26/speaking-at-sharepoint-conference-2012.aspx"&gt;PowerShell&lt;/a&gt; at SharePoint Conference 2012 (&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/26/speaking-at-sharepoint-conference-2012.aspx"&gt;SPC195&lt;/a&gt;).&amp;#160; It turns out PowerShell support slipped into SharePoint Online Preview without a lot of people noticing.&amp;#160; In my session at SPC12, I walked users through a lot of common scenarios of using PowerShell with SPO that I wanted to share with you.&amp;#160; This post will show you how to get connected to your SharePoint Online tenant and how to do work with sites.&amp;#160; In a follow-up post, I’ll show you how to work with users and groups.&amp;#160; Keep in mind this only work with SharePoint Online Preview right now.&amp;#160; When your existing V14 tenants get upgraded to V15, you will be able to use it then.&lt;/p&gt;  &lt;p&gt;To get started, you need to install the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=35588"&gt;SharePoint Online Management Shell&lt;/a&gt;.&amp;#160; Since this is based on PowerShell 3.0, you need to have that installed.&amp;#160; If you have Windows 8 or you are running this on a machine with SharePoint 2013 already, you’re ready to go.&amp;#160; However, if you are running Windows 7, you’ll need to install &lt;a href="http://go.microsoft.com/fwlink/p/?LinkID=244693"&gt;Windows Management Framework 3.0&lt;/a&gt;.&amp;#160; After you have installed it, simply launch SharePoint Online Management Shell from the start menu.&amp;#160; You shouldn’t need to run it as Administrator.&lt;/p&gt;  &lt;h2&gt;&lt;/h2&gt;  &lt;h3&gt;Connecting to SharePoint Online&lt;/h3&gt;  &lt;p&gt;Before you connect to SharePoint Online, you’ll need to have the username and password for an account with global administrator permissions.&amp;#160; You’ll also need to know your tenant admin URL (i.e.: &lt;a href="https://mytenant-admin.sharepoint.com"&gt;https://mytenant-admin.sharepoint.com&lt;/a&gt;).&amp;#160;&amp;#160; When connecting to SharePoint Online, don’t forget to reference all URLs securely using https.&amp;#160; If you try and use http, you will get an error.&lt;/p&gt;  &lt;p&gt;To connect to SharePoint Online, use the &lt;strong&gt;Connect-SPOService&lt;/strong&gt; command.&amp;#160; It takes the URL to your tenant admin and a username.&amp;#160; When you connect, you’ll be prompted for your password.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Connect-SPOService –Url https://mytenant-admin.sharepoint.com –Credential admin@mytenant.onmicrosoft.com&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPPowerShellConnectSPOServiceCredentials_5F237449.png"&gt;&lt;img title="SPOPPowerShellConnectSPOServiceCredentials" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPPowerShellConnectSPOServiceCredentials" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPPowerShellConnectSPOServiceCredentials_thumb_48812602.png" width="532" height="266" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you connect successfully, you will be returned to the command prompt without error.&amp;#160; To see what commands are available, we can use &lt;strong&gt;Get-Command&lt;/strong&gt; and pass it the module &lt;strong&gt;Microsoft.Online.SharePoint.PowerShell.dll&lt;/strong&gt;.&amp;#160; You can get the full list on &lt;a href="http://technet.microsoft.com/en-us/library/fp161364(v=office.15).aspx"&gt;TechNet&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-Command –Module Microsoft.Online.SharePoint.PowerShell&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPPowerShellGetCommand_745179F1.png"&gt;&lt;img title="SPOPPowerShellGetCommand" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPPowerShellGetCommand" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPPowerShellGetCommand_thumb_44B35B65.png" width="531" height="366" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Getting Site Collections&lt;/h3&gt;  &lt;p&gt;To work with Site Collections, use &lt;strong&gt;Get-SPOSite&lt;/strong&gt; (&lt;a href="http://technet.microsoft.com/en-us/library/fp161380(v=office.15).aspx"&gt;TechNet&lt;/a&gt;).&amp;#160; It can return a single site with the &lt;em&gt;–Identity&lt;/em&gt; parameter or it can filter a list of them with the –&lt;em&gt;Filter&lt;/em&gt; parameter.&amp;#160; The Filter parameter does server side filtering and can be used with the case sensitive operators (-like, –notlike, –eq, and –ne).&amp;#160; You can also run it without any parameters to return all site collections.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPOSite&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOSite_227B4FDF.png"&gt;&lt;img title="SPOPowerShellGetSPOSite" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPowerShellGetSPOSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOSite_thumb_2855F378.png" width="534" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This doesn’t return the data in the greatest format though.&amp;#160; It would be nice to see the full URL and when thinking about upgrades it would nice to see the &lt;em&gt;CompatibilityLevel &lt;/em&gt;(either 14 or 15).&amp;#160; We can do this by piping the output to Format-Table (ft) and specifying the desired fields.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPOSite | ft Url, CompatibilityLevel&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOSiteFT_1F85EB2C.png"&gt;&lt;img title="SPOPowerShellGetSPOSiteFT" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPowerShellGetSPOSiteFT" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOSiteFT_thumb_39E5DE43.png" width="540" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You’ll notice that the &lt;em&gt;CompatibilityLevel &lt;/em&gt;came back as 0 here.&amp;#160; This is because, Get-SPOSite uses CSOM under the hood and it does not request all values by default.&amp;#160; To get this data, you need to add the &lt;em&gt;–Detailed&lt;/em&gt; parameter.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPOSite –Detailed | ft Url, CompatibilityLevel&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;      &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOSiteDetailedFT_57E3EC37.png"&gt;&lt;img title="SPOPowerShellGetSPOSiteDetailedFT" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPowerShellGetSPOSiteDetailedFT" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOSiteDetailedFT_thumb_687BE725.png" width="543" height="204" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The syntax of the server side filtering can be a bit tricky.&amp;#160; The key thing to remember is that the operators are case sensitive so they must be lower-case.&amp;#160; In the example, below I do a server-side filter looking for any site with the word “Contoso” in the URL.&amp;#160; Put the expression you are searching for in braces.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPOSite –Filter {Url -like “*term*} | Ft Url&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOSiteFiltered_749D614C.png"&gt;&lt;img title="SPOPowerShellGetSPOSiteFiltered" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPowerShellGetSPOSiteFiltered" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOSiteFiltered_thumb_7763163F.png" width="542" height="123" /&gt;&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;One thing you may have noticed is that there are not any commands to create subsites.&amp;#160; Currently only site collections are supported.&lt;/p&gt;  &lt;h3&gt;Creating Site Collections&lt;/h3&gt;  &lt;p&gt;Site Collections can be created using the &lt;strong&gt;New-SPOSite &lt;/strong&gt;(&lt;a href="http://technet.microsoft.com/en-us/library/fp161370(v=office.15).aspx"&gt;TechNet&lt;/a&gt;) cmdlet.&amp;#160; This cmdlet takes a heap of parameters.&amp;#160; Note that you still have to use the preset managed paths available to you in SharePoint Online.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;-Url – full URL of the site collection (don’t forget to use https)&lt;/li&gt;    &lt;li&gt;-Owner – full user name of site owner (i.e.: admin@mytenant.onmicrosoft.com)&lt;/li&gt;    &lt;li&gt;-StorageQuota – in MB&lt;/li&gt;    &lt;li&gt;-ResourceQuota – number of resources to allocate&lt;/li&gt;    &lt;li&gt;-Template (Optional) – i.e.: STS#0 – Use &lt;strong&gt;Get-SPOWebTemplate&lt;/strong&gt; to view a list of available templates&lt;/li&gt;    &lt;li&gt;-Title (Optional) – name of site collection&lt;/li&gt;    &lt;li&gt;-NoWait – instructs PowerShell not to wait until the cmdlet is finished&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;New-SPOSite -Url &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="https://mytenant.sharepoint.com/sites/sitename"&gt;https://mytenant.sharepoint.com/sites/sitename&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt; -Owner &amp;quot;admin@mytenant.onmicrosoft.com&amp;quot; -StorageQuota &amp;quot;500&amp;quot; -NoWait -ResourceQuota &amp;quot;500&amp;quot; -Template &amp;quot;STS#0&amp;quot; -Title &amp;quot;Site Title&amp;quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellNewSite_3171E31F.png"&gt;&lt;img title="SPOPowerShellNewSite" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPowerShellNewSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellNewSite_thumb_470C1BBC.png" width="542" height="71" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As mentioned above, you can run &lt;strong&gt;Get-SPOWebTemplate&lt;/strong&gt; to return a list of available site templates.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPOWebTemplate&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOWebTemplate_31AE6654.png"&gt;&lt;img title="SPOPowerShellGetSPOWebTemplate" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPowerShellGetSPOWebTemplate" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellGetSPOWebTemplate_thumb_44EF1CF3.png" width="547" height="257" /&gt;&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;h3&gt;Deleting Site Collections&lt;/h3&gt;  &lt;p&gt;To delete a site collection simply, use &lt;strong&gt;Remove-SPOSite &lt;/strong&gt;(&lt;a href="http://technet.microsoft.com/en-us/library/fp161377(v=office.15).aspx"&gt;TechNet&lt;/a&gt;) and pass it the URL in the Identity parameter.&amp;#160; It can also optionally take the –NoWait parameter was well.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Remove-SPOSite –Identity https://mytenant.sharepoint.com/sites/sitename –NoWait&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellRemoveSPOSite_22B7116D.png"&gt;&lt;img title="SPOPowerShellRemoveSPOSite" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPowerShellRemoveSPOSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellRemoveSPOSite_thumb_4C4ADCA0.png" width="548" height="63" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Restoring Site Collections&lt;/h3&gt;  &lt;p&gt;Deleted site collections get moved to the site collection recycle bin.&amp;#160; To restore a site collection that you have deleted, use &lt;strong&gt;Restore-SPODeletedSite&lt;/strong&gt; (&lt;a href="http://technet.microsoft.com/en-us/library/fp161400(v=office.15).aspx"&gt;TechNet&lt;/a&gt;).&amp;#160; It takes the same parameters as Remove-SPOSite.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Restore-SPODeletedSite –Identity https://mytenant.sharepoint.com/sites/sitename –NoWait&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellRestoreSPODeletedSite_2A7F040F.png"&gt;&lt;img title="SPOPowerShellRestoreSPODeletedSite" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SPOPowerShellRestoreSPODeletedSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SPOPowerShellRestoreSPODeletedSite_thumb_70238E2D.png" width="559" height="66" /&gt;&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;h3&gt;Upgrading Site Collections&lt;/h3&gt;  &lt;p&gt;SharePoint Online also has the concept of deferred site collection upgrades.&amp;#160; This means you can upgrade the site collections one-by-one or in batch using PowerShell.&amp;#160; To run the Site Collection health check first, use &lt;strong&gt;Test-SPOSite &lt;/strong&gt;(&lt;a href="http://technet.microsoft.com/en-us/library/fp161367.aspx"&gt;TechNet&lt;/a&gt;) and pass it the URL in the identity parameter.&amp;#160; Once you are ready to upgrade use &lt;strong&gt;Upgrade-SPOSite &lt;/strong&gt;(&lt;a href="http://technet.microsoft.com/en-us/library/fp161395(v=office.15).aspx"&gt;TechNet&lt;/a&gt;).&amp;#160; Be sure and pass the &lt;em&gt;–V2VUpgrade&lt;/em&gt; parameter or it won’t upgrade it.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Test-SPOSite -Identity &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://mytenant.sharepoint.com/sites/sitename&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Upgrade-SPOSite -Identity http://mytenant.sharepoint.com/sites/sitename -V2VUpgrade&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Unfortunately, I don’t have a tenant that can be upgraded yet, so I can’t provide a screenshot of this procedure.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hopefully, you found these PowerShell cmdlets useful.&amp;#160; I think they will help a lot when it comes to working with SharePoint Online.&amp;#160; In the next post, we’ll cover how to work with users and groups.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=6037" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+Online/default.aspx">SharePoint Online</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365/default.aspx">Office 365</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+365+Grid/default.aspx">Office 365 Grid</category></item><item><title>Copying Site Collections with PowerShell in SharePoint 2013 Preview</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/10/21/copying-site-collections-with-powershell-in-sharepoint-2013-preview.aspx</link><pubDate>Mon, 22 Oct 2012 03:44:06 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:5962</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=5962</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/10/21/copying-site-collections-with-powershell-in-sharepoint-2013-preview.aspx#comments</comments><description>&lt;p&gt;I’m working on my &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/26/speaking-at-sharepoint-conference-2012.aspx"&gt;PowerShell for SharePoint 2013&lt;/a&gt; (SPC195) talk for SPC12 and I find this new cmdlet so useful I thought I would share it immediately.&amp;#160; The cmdlet is &lt;strong&gt;Copy-SPSite&lt;/strong&gt; and it’s easy to use.&amp;#160; Just run it and before you know it, you’ll have a duplicate of a site collection on a fresh new URL.&amp;#160; You can even optionally specify a new content database.&amp;#160; Here is what it looks like:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Copy-SPSite http://server/sitecollection –DestinationDatabase MyContentDb –TargetUrl http://server/sitecollection2&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A successful execution will return nothing at the command prompt.&amp;#160; This is a great cmdlet for developers and IT pros that often need to quickly clone site collections and tear them down. It will take longer for bigger site collections of course.&amp;#160; Try it out today.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=5962" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013+Preview/default.aspx">SharePoint 2013 Preview</category></item><item><title>How to: Seed Search Suggestions in SharePoint 2013 Preview</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/18/how-to-seed-search-suggestions-in-sharepoint-2013-preview.aspx</link><pubDate>Tue, 18 Sep 2012 20:17:53 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:5915</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=5915</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/09/18/how-to-seed-search-suggestions-in-sharepoint-2013-preview.aspx#comments</comments><description>&lt;p&gt;I was digging through some new PowerShell cmdlets for one of my talks coming up at SharePoint Conference 2012 (SPC12), and I stumbled upon the new cmdlet &lt;a href="http://technet.microsoft.com/en-US/library/jj219665(v=office.15).aspx"&gt;Import-SPEnterpriseSearchPopularQueries&lt;/a&gt;.&amp;#160; I found this cmdlet to be interesting since it can be used to easily seed what shows up in the search suggestions on a given site.&amp;#160; I took the example there and did some tweaking and thought I would share my results.&amp;#160; &lt;/p&gt;  &lt;p&gt;We first, need to get a reference to the Search Service Application Proxy using &lt;strong&gt;Get-SPEnterpriseSearchServiceApplicationProxy&lt;/strong&gt;.&amp;#160; Sorry, the cmdlets for search a bit wordy so that is what the Tab key is for. :)&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;$ssap = Get-SPEnterpriseSearchServiceApplicationProxy&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Search suggestions are actually specific to the result source and site that hosts the search box.&amp;#160; This means you could have different suggestions depending on which part of the site you are on.&amp;#160; To achieve that, we need to get a reference to the web hosting the search center and ultimately a result source object.&amp;#160; Let’s get the web first.&amp;#160; Change the URL to match your server’s search center.&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;$searchWeb = Get-SPWeb -Identity http://myserver/search&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Now, we will use the Federation Manager to get a result source.&amp;#160; However, we need a Search Object Owner first.&amp;#160; The example on TechNet requires a lot more typing.&amp;#160; I luckily found the cmdlet &lt;strong&gt;Get-SPSearchObjectOwner&lt;/strong&gt;.&amp;#160; It takes a scope (Level) and an SPWeb object.&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;$owner = Get-SPEnterpriseSearchOwner -Level SPWeb -SPWeb $searchWeb&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Unfortunately, I couldn’t find a command to directly get a result source so that means we actually have to go through the API to get a Federation Manager first.&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;$mgr = new-object Microsoft.Office.Server.Search.Administration.Query.FederationManager -ArgumentList $ssap&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Once we have the manager object, we use the &lt;em&gt;GetSourceByName&lt;/em&gt; method passing it the name of the result source and $owner.&amp;#160; In this case, we use “Local SharePoint Results&amp;quot; as the result source name.&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;$source = $mgr.GetSourceByName(&amp;quot;Local SharePoint Results&amp;quot;, $owner)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;As far as the query suggestions themselves, we will need to create a CSV file with the data.&amp;#160; The format is simple: Query Text,Query Count,Click Count,LCID.&amp;#160; For example: &lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;SharePoint Conference,500,300,1033&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Setting these values allows you to control the order in which items appear in the query suggestions.&amp;#160; For suggestions to appear in the search box, the click count must be at least 5.&amp;#160; 1033 is the LCID value for English.&amp;#160; Here is what my file looks like:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchQuerySuggestionsCSV_235EB010.png"&gt;&lt;img title="SearchQuerySuggestionsCSV" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchQuerySuggestionsCSV" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchQuerySuggestionsCSV_thumb_7C2466DA.png" width="398" height="221" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, we run the &lt;strong&gt;Import-SPEnterpriseSearchPopularQueries&lt;/strong&gt; cmdlet.&amp;#160; It needs the SearchApplicationProxy, Filename, and ResultSource parameters which we retrieved with the previous lines of script.&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;Import-SPEnterpriseSearchPopularQueries -SearchApplicationProxy $ssap -Filename .\suggestions.csv -ResultSource $source -Web $searchWeb&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;If all commands execute successfully, you should not see anything returned at the command prompt.&amp;#160; Now, you can begin using your suggestions right away.&amp;#160; You do not need to recrawl.&amp;#160; Go to the search center that you specified in your $searchWeb object.&amp;#160; Start typing some of the values from your suggestions and you will see them beneath the search box.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchQuerySuggestions_69DBA018.png"&gt;&lt;img title="SearchQuerySuggestions" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="SearchQuerySuggestions" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchQuerySuggestions_thumb_62BC63A0.png" width="421" height="186" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This new PowerShell cmdlet makes it so easy to seed your search suggestions.&amp;#160; I think I will start recommending this on new deployments to really improve the immediate value of search.&amp;#160; Try it out today.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=5915" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013/default.aspx">SharePoint 2013</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2013+Preview/default.aspx">SharePoint 2013 Preview</category></item><item><title>Adding and Deploying Sandboxed Solutions Using PowerShell</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/05/21/adding-and-deploying-sandboxed-solutions-using-powershell.aspx</link><pubDate>Tue, 22 May 2012 02:09:27 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:5703</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=5703</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/05/21/adding-and-deploying-sandboxed-solutions-using-powershell.aspx#comments</comments><description>&lt;p&gt;One of my most popular posts on &lt;a href="http://www.dotnetmafia.com"&gt;DotNetMafia.com&lt;/a&gt; is my post on using &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/12/02/adding-and-deploying-solutions-with-powershell-in-sharepoint-2010.aspx"&gt;PowerShell&lt;/a&gt; to add and deploy SharePoint solution packages (.wsp files).&amp;#160; However, in that post, I never went in detail in deploying sandboxed solutions.&amp;#160; Today, I want to talk about that and show you what you need to know.&amp;#160; I started by using Visual Studio 11 to build a sandboxed solution using the new &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/01/12/a-look-at-visual-web-parts-in-visual-studio-11.aspx"&gt;Visual Web Part&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;To get started with PowerShell, run the SharePoint 2010 Management Console located in your Microsoft SharePoint 2010 Products folder on your start menu.&amp;#160; This automatically loads the Microsoft.SharePoint.PowerShell snappin so that we can execute SharePoint commands.&amp;#160; To install a solution we will use the &lt;em&gt;Add-SPUserSolution&lt;/em&gt; command. It takes two parameters.&amp;#160; Specify &lt;em&gt;–literalpath&lt;/em&gt;, which is the path to the solution file.&amp;#160; One thing that is different is that you must specify the full path to the file for some reason.&amp;#160; You then need to specify the URL to the site collection with the –&lt;em&gt;site&lt;/em&gt; parameter.&amp;#160; Here is an example.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Add-SPUserSolution –LiteralPath c:\code\SandboxedSolutionProject.wsp –Site &lt;/em&gt;&lt;em&gt;http://sp2010/sites/sandbox&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;It looks like this in PowerShell.&amp;#160; If it executes successfully, you’ll just be returned to the command prompt.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAddSPUserSolution_7843F499.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellAddSPUserSolution" border="0" alt="PowerShellAddSPUserSolution" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellAddSPUserSolution_thumb_3DE87EB8.png" width="657" height="72" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We can now see our .wsp file in the solution gallery.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SolutionGalleryNotActivated_3CA3E5D9.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SolutionGalleryNotActivated" border="0" alt="SolutionGalleryNotActivated" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SolutionGalleryNotActivated_thumb_5B7A59B7.png" width="658" height="220" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We can see the solution package but note that it is not activated.&amp;#160; For that, we need &lt;em&gt;Install-SPUserSolution&lt;/em&gt;.&amp;#160; It’s parameters are similar.&amp;#160; We use &lt;em&gt;–Identity &lt;/em&gt;with the name of the solution package (minus the path) and the –&lt;em&gt;Site&lt;/em&gt; parameter with the URL of the site collection again.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Install-SPUserSolution –Identity SandboxedSolutionProject.wsp –Site http://sp2010/sites/sandbox &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellInstallSPUserSolution_4139F093.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellInstallSPUserSolution" border="0" alt="PowerShellInstallSPUserSolution" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellInstallSPUserSolution_thumb_1FDA4AF7.png" width="562" height="118" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once activated you can confirm it in the solutions gallery.&amp;#160; You can now activate features as desired (using &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/01/04/activating-and-deactivating-features-with-powershell-in-sharepoint-2010.aspx"&gt;PowerShell&lt;/a&gt; if you want).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SolutionGalleryActivated_3869E847.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SolutionGalleryActivated" border="0" alt="SolutionGalleryActivated" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SolutionGalleryActivated_thumb_7E7AA55A.png" width="571" height="47" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At some point, you might want to remove your solution.&amp;#160; We can do that with PowerShell as well.&amp;#160; First, we need to deactivate the solution using &lt;em&gt;Uninstall-SPUserSolution&lt;/em&gt;.&amp;#160; It takes the exact same parameter as &lt;em&gt;Install-SPUserSolution&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Uninstall-SPUserSolution –Identity SandboxedSolutionProject.wsp –Site http://sp2010/sites/sandbox &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUninstallSPUserSolution_7D360C7B.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellUninstallSPUserSolution" border="0" alt="PowerShellUninstallSPUserSolution" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellUninstallSPUserSolution_thumb_0310B015.png" width="573" height="130" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Many of these commands may prompt you with an “Are you sure?” type prompt.&amp;#160; You can skip this prompt by adding a –&lt;em&gt;confirm&lt;/em&gt; parameter.&amp;#160; Now, the last step is to remove the .wsp file from the solution store.&amp;#160; For that, we’ll use &lt;em&gt;Remove-SPUserSolution&lt;/em&gt;.&amp;#160; It uses the –&lt;em&gt;Identity&lt;/em&gt; and –&lt;em&gt;Url&lt;/em&gt; parameters like the other commands.&amp;#160; Just pass the name of the solution package along with the URL of the site collection.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Remove-SPUserSolution –Identity SandboxedSolutionProject.wsp –Site &lt;a href="http://sp2010/sites/sandbox"&gt;http://sp2010/sites/sandbox&lt;/a&gt; &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellRemoveSPUserSolution_68D046F0.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellRemoveSPUserSolution" border="0" alt="PowerShellRemoveSPUserSolution" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellRemoveSPUserSolution_thumb_79D474D3.png" width="580" height="134" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now the solution is gone from the Solutions gallery.&amp;#160; I like to automate everything that I can so these simple PowerShell commands should help if you are working with sandboxed solutions.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=5703" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Sandboxed+Solution/default.aspx">Sandboxed Solution</category></item><item><title>How to: Make Windows 7 PowerShell look like the SharePoint Management Shell</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/05/21/how-to-make-windows-7-powershell-look-like-the-sharepoint-management-shell.aspx</link><pubDate>Mon, 21 May 2012 20:54:03 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:5702</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=5702</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/05/21/how-to-make-windows-7-powershell-look-like-the-sharepoint-management-shell.aspx#comments</comments><description>&lt;p&gt;I love me some PowerShell.&amp;#160; I use it a lot in the context of SharePoint 2010, but I use it just as much on my own laptop.&amp;#160; If you have been administering and configuring SharePoint enough, you have become accustomed to the shape and size of the PowerShell window that you get when you run the SharePoint Management Shell.&amp;#160; That’s just the way I prefer things to look when I am in the command prompt now.&amp;#160; However, by default, when you run PowerShell in Windows 7, you get this huge window that is just cumbersome.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7DefaultWindow_311D53A5.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellWindows7DefaultWindow" border="0" alt="PowerShellWindows7DefaultWindow" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7DefaultWindow_thumb_7FCE6944.png" width="503" height="323" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s why I thought I would share these quick configuration settings to make your PowerShell experience in Windows 7 just like in SharePoint.&amp;#160; Start by finding PowerShell in the start menu, right click and go to &lt;em&gt;Properties&lt;/em&gt;.&amp;#160; Jump over the &lt;em&gt;Layout&lt;/em&gt; tab and you will find the first settings we need to change.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7Default_11CA8705.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellWindows7Default" border="0" alt="PowerShellWindows7Default" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7Default_thumb_25B3F3CE.png" width="373" height="515" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Let’s compare it to the settings on the SharePoint Management Shell.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellSharePointDefault_5C317945.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellSharePointDefault" border="0" alt="PowerShellSharePointDefault" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellSharePointDefault_thumb_32DA3147.png" width="370" height="512" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;From the screenshots, you can tell there are a few differences in the Screen buffer size and the Window Size.&amp;#160; Let’s talk about Window size first.&amp;#160; Start by reducing the Window size width from &lt;strong&gt;120&lt;/strong&gt; to &lt;strong&gt;80&lt;/strong&gt;.&amp;#160; You then want to change the Window size height from &lt;strong&gt;50&lt;/strong&gt; to &lt;strong&gt;25&lt;/strong&gt;.&amp;#160; You then want to adjust the Screen buffer size.&amp;#160; I set the Width to match with a new value of &lt;strong&gt;80&lt;/strong&gt;.&amp;#160; However, I leave the height at &lt;strong&gt;3000&lt;/strong&gt;, because having a bigger screen buffer is nice when you want to scroll back and look at something.&amp;#160; Here are what my modified settings look like.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7LayoutModified_27ED2A32.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellWindows7LayoutModified" border="0" alt="PowerShellWindows7LayoutModified" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7LayoutModified_thumb_786E9598.png" width="361" height="497" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you’ve changed the layout, you may want to also change the color back to black instead of the Windows 7 default color.&amp;#160; That’s easy to do by going to the Colors tab.&amp;#160; Just click on the black box with Screen background selected.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7ColorsModified_18E5AF7E.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellWindows7ColorsModified" border="0" alt="PowerShellWindows7ColorsModified" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7ColorsModified_thumb_3A352F4D.png" width="361" height="497" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s all there is to it.&amp;#160; Click OK and then open a new PowerShell window.&amp;#160; Your new command prompt will look just like the one in SharePoint 2010.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7ModifiedWindow_62E06EC9.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellWindows7ModifiedWindow" border="0" alt="PowerShellWindows7ModifiedWindow" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellWindows7ModifiedWindow_thumb_6631E0A4.png" width="482" height="245" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So it’s kind of weird tip for today but I find it useful because I like it when PowerShell looks this way. :)&amp;#160; Try it out and see for yourself.&amp;#160; You can customize other value as well.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=5702" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Windows+7/default.aspx">Windows 7</category></item><item><title>Error: Update-SPProfilePhotoStore : Object reference not set to an instance of an object</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/05/02/error-update-spprofilephotostore-object-reference-not-set-to-an-instance-of-an-object.aspx</link><pubDate>Wed, 02 May 2012 22:48:01 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:5684</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=5684</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/05/02/error-update-spprofilephotostore-object-reference-not-set-to-an-instance-of-an-object.aspx#comments</comments><description>&lt;p&gt;I like blogging about errors and their resolutions.&amp;#160; Sometimes the answer is simple, but I think there is a lot of value in posting the details of an error so that users can find answers in the search engines.&amp;#160; After doing a My Sites upgrade from SharePoint 2007, you will have a whole heap of user photos that you need to beat into submission.&amp;#160; This command goes through all of the existing user photos and creates thumbnails.&amp;#160; This is often useful when a user has uploaded a giant image of themselves and you need to fix it.&amp;#160; To do this, you may be familiar with the PowerShell command &lt;em&gt;Update-SPProfilePhotoStore&lt;/em&gt;.&amp;#160; You call it by passing the URL to your My Sites host.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Update-SPProfilePhotoStore &lt;a href="http://mysitehosturl"&gt;http://mysitehosturl&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;If you don’t have the right permissions, you will find yourself with the following error:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Update-SPProfilePhotoStore : Object reference not set to an instance of an object.     &lt;br /&gt;At line:1 char:27      &lt;br /&gt;+ Update-SPProfilePhotoStore &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;#160; -MySiteHostLocation &lt;/em&gt;&lt;a href="http://mysites"&gt;&lt;em&gt;http://mysites&lt;/em&gt;&lt;/a&gt;    &lt;br /&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160; + CategoryInfo&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : InvalidData: (Microsoft.Offic...ofilePhotoStore:     &lt;br /&gt;&amp;#160;&amp;#160; SPCmdletUserProfilePhotoStore) [Update-SPProfilePhotoStore], NullReference      &lt;br /&gt;&amp;#160; Exception      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; + FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.      &lt;br /&gt;&amp;#160;&amp;#160; SPCmdletUserProfilePhotoStore&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpdateSPProfilePhotoStoreError_5248662D.png"&gt;&lt;img title="UpdateSPProfilePhotoStoreError" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="UpdateSPProfilePhotoStoreError" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/UpdateSPProfilePhotoStoreError_thumb_5C2D5798.png" width="516" height="104" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now clearly to you that means you don’t have the right permissions, correct?&amp;#160; Of course not.&amp;#160; To run this command, you need the permissions as defined in this post on &lt;a href="http://blogs.msdn.com/b/spsocial/archive/2011/01/07/photo-management-in-sharepoint-2010.aspx"&gt;MSDN blogs&lt;/a&gt;.&amp;#160; Now, you could take the easy way out and just run PowerShell as the farm account.&amp;#160; However, I know you know better.&amp;#160; Just go set up the right permissions and you’ll be set.&amp;#160; The post on MSDN summarizes them as follows:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Go to Service Applications, select your User Profile Service Application, and then click &lt;em&gt;Permissions&lt;/em&gt;.&amp;#160; Add your account and check the &lt;em&gt;Full Control&lt;/em&gt; checkbox.&lt;/li&gt;    &lt;li&gt;Select the User Profile Service Application, and then click the &lt;em&gt;Administrators&lt;/em&gt; button.&amp;#160; Add your account there and check the &lt;em&gt;Manage Profiles&lt;/em&gt; checkbox and nothing else.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Note that you can add groups on the &lt;em&gt;Administrators&lt;/em&gt; section but you can’t on the &lt;em&gt;Permissions &lt;/em&gt;section.&amp;#160; Once you do that, run PowerShell with the &lt;em&gt;Run as Administrator&lt;/em&gt; option and run Update-SPProfile again.&amp;#160; It should execute without an object reference error.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=5684" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Error/default.aspx">Error</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>How to: Activate a feature on multiple site collections using PowerShell</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/02/09/how-to-activate-a-feature-on-multiple-site-collections-using-powershell.aspx</link><pubDate>Fri, 10 Feb 2012 02:40:37 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:5530</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=5530</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2012/02/09/how-to-activate-a-feature-on-multiple-site-collections-using-powershell.aspx#comments</comments><description>&lt;p&gt;A lot of times we have a need to activate a feature on multiple site collections.&amp;#160; This could be a custom feature to do branding or you may simply be activating publishing on multiple site collections.&amp;#160; PowerShell makes tasks like these easy.&amp;#160; We’ll take what we learned from my original &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/01/04/activating-and-deactivating-features-with-powershell-in-sharepoint-2010.aspx"&gt;Activating Features with PowerShell&lt;/a&gt; post and use some common techniques to iterate through the site collections and activate the desired feature.&amp;#160; &lt;/p&gt;  &lt;p&gt;For this example, we’ll activate the &lt;em&gt;SharePoint Server Publishing Infrastructure&lt;/em&gt;.&amp;#160; The internal name of that feature is actually &lt;em&gt;PublishingSite&lt;/em&gt; so we’ll start by using PowerShell to get a reference to that feature.&amp;#160; We’ll assign the result of that value to a variable.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$feature = Get-SPFeature PublishingSite&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If this is your first time working with this feature, be sure and test it by typing it into PowerShell to ensure that you are getting the reference to the feature correctly.&amp;#160; Once you have the feature we can get a list of site collections.&amp;#160; Retrieving site collections is simple.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$siteCollections = Get-SPSite&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;However, this will return every site collection from every web application.&amp;#160; You probably want to limit it to a single web application using the &lt;em&gt;–WebApplication&lt;/em&gt; parameter like this:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$siteCollections = Get-SPSite –WebApplication http://sp2010&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We can then just use &lt;em&gt;ForEach-Object &lt;/em&gt;to iterate through each site collection and then activate the feature.&amp;#160; I use a pipe bind with the &lt;em&gt;$siteCollections&lt;/em&gt; variable.&amp;#160; Then I just use the &lt;em&gt;Enable-SPFeature &lt;/em&gt;command passing it $feature for the feature and the Url to the site collection which we can get from the &lt;em&gt;Url &lt;/em&gt;property of the &lt;em&gt;$_ &lt;/em&gt;object.&amp;#160; I also wrote some output to the screen so we could see which site collection was activating.&amp;#160; Here is what the whole script looks like.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$feature = Get-SPFeature PublishingSite       &lt;br /&gt;$siteCollections = Get-SPSite –WebApplication &lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;http://sp2010&lt;/em&gt;&lt;/strong&gt;    &lt;br /&gt;&lt;strong&gt;&lt;em&gt;$siteCollections | foreach-object {       &lt;br /&gt;&amp;#160;&amp;#160; Write-Host &amp;quot;Activating&amp;quot; $feature.DisplayName &amp;quot;on&amp;quot; $_.Url        &lt;br /&gt;&amp;#160;&amp;#160; Enable-SPFeature $feature -Url $_.Url        &lt;br /&gt;}&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellSiteCollectionFeatureActivate_1A2AEA9E.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellSiteCollectionFeatureActivate" border="0" alt="PowerShellSiteCollectionFeatureActivate" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellSiteCollectionFeatureActivate_thumb_0775F0E7.png" width="516" height="81" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Of course this works with deactivation as well too.&amp;#160; I just updated the script to use &lt;em&gt;Disable-SPFeature &lt;/em&gt;instead.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;$feature = Get-SPFeature PublishingSite       &lt;br /&gt;$siteCollections = Get-SPSite –WebApplication http://sp2010        &lt;br /&gt;$siteCollections | foreach-object {        &lt;br /&gt;&amp;#160;&amp;#160; Write-Host &amp;quot;Deactivating&amp;quot; $feature.DisplayName &amp;quot;on&amp;quot; $_.Url        &lt;br /&gt;&amp;#160;&amp;#160; Disable-SPFeature $feature -Url $_.Url -confirm:$false        &lt;br /&gt;}&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellSiteCollectionFeatureDeactivate_264C64C5.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellSiteCollectionFeatureDeactivate" border="0" alt="PowerShellSiteCollectionFeatureDeactivate" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellSiteCollectionFeatureDeactivate_thumb_653DE560.png" width="512" height="78" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Note that I added &lt;em&gt;–confrim:$false&lt;/em&gt; to the &lt;em&gt;Disable-SPFeature&lt;/em&gt; line to prevent being prompted by the script.&lt;/p&gt;    &lt;p&gt;This is a simple script that makes it easy to activate and deactivate features in bulk.&amp;#160; This same logic could be applied to site scoped features as well if you had the need.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=5530" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Feature/default.aspx">Feature</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>Configuring Site Collection Search Settings with PowerShell</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/12/21/configuring-site-collection-search-settings-with-powershell.aspx</link><pubDate>Wed, 21 Dec 2011 16:28:11 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:5395</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=5395</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/12/21/configuring-site-collection-search-settings-with-powershell.aspx#comments</comments><description>&lt;p&gt;I’m always looking for a way to automate things and configuring the search settings of a site collection is no exception.&amp;#160; I’ve talked about the Search Settings page &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/12/09/configuring-contextual-search-to-use-search-center.aspx"&gt;before&lt;/a&gt; and how important it is for configuring contextual search and the scope drop down on your master page.&amp;#160; Wouldn’t it be nice to be able to automate these changes instead of having to manually set it on every site collection?&lt;/p&gt;  &lt;p&gt;To configure these settings, we first must understand where they are.&amp;#160; It turns out that they can be found in the &lt;em&gt;AllProperties &lt;/em&gt;collection of the root &lt;em&gt;SPWeb&lt;/em&gt; object in a site collection.&amp;#160; On a new site collection or on one where you have never configured the search settings, no values will exist in the property bag for search.&amp;#160; However, one you go to the search settings page and click save, it will write the values into the property bag.&amp;#160; As you may know, the search settings page has three configurable fields.&amp;#160; These values on the search settings page map to the values below in the property bag.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;strong&gt;Setting&lt;/strong&gt;&lt;/td&gt;        &lt;td&gt;&lt;strong&gt;Property Bag Name&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Site Collection Search Center&lt;/td&gt;        &lt;td&gt;SRCH_ENH_FTR_URL&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Site Collection Search Dropdown Mode&lt;/td&gt;        &lt;td&gt;SRCH_SITE_DROPDOWN_MODE&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Site Collection Search Results Page&lt;/td&gt;        &lt;td&gt;SRCH_TRAGET_RESULTS_PAGE&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;Now what goes in each value?&amp;#160; &lt;em&gt;SRCH_ENH_FTR_URL &lt;/em&gt;typically takes a relative URL (i.e. /search/pages).&amp;#160; However, it can take full URL as well.&amp;#160; &lt;em&gt;SRCH_SITE_DROPDOWN_MODE&lt;/em&gt; requires you pass a special string based upon what you want the drop down to display (i.e.: Show Scopes, Don’t Show Scopes, Default to s parameter, etc.)&amp;#160; How do you know what string to pass?&amp;#160; Well the easiest way to determine this is to go to the Search Settings page of the site collection and view source.&amp;#160; Search for the drop down mode you want and you will find the string in the value parameter of an option element.&amp;#160; Here is what it looks like.&lt;/p&gt;  &lt;div style="border-bottom:#000080 1px solid;border-left:#000080 1px solid;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;color:#000;font-size:10pt;border-top:#000080 1px solid;border-right:#000080 1px solid;"&gt;   &lt;div style="padding-bottom:2px;background-color:#ffffff;padding-left:5px;width:719px;padding-right:5px;height:164px;overflow:auto;padding-top:2px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;selected&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;selected&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;HideScopeDD_DefaultContextual&amp;quot;&amp;gt;&lt;/span&gt;Do not show scopes      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; dropdown, and default to contextual scope&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;      &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;HideScopeDD&amp;quot;&amp;gt;&lt;/span&gt;Do not show scopes dropdown, and default to target results      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; page&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;      &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ShowDD&amp;quot;&amp;gt;&lt;/span&gt;Show scopes dropdown&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;      &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ShowDD_DefaultURL&amp;quot;&amp;gt;&lt;/span&gt;Show, and default to &amp;#39;s&amp;#39; URL parameter&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;      &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ShowDD_DefaultContextual&amp;quot;&amp;gt;&lt;/span&gt;Show and default to contextual scope&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;      &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ShowDD_NoContextual&amp;quot;&amp;gt;&lt;/span&gt;Show, do not include contextual scopes&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;      &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;value&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;ShowDD_NoContextual_DefaultURL&amp;quot;&amp;gt;&lt;/span&gt;Show, do not include contextual scopes,      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; and default to &amp;#39;s&amp;#39; URL parameter&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;option&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;For example, I typically use the option &lt;em&gt;Show and default to contextual scope, &lt;/em&gt;so I would choose &lt;em&gt;ShowDD_DefaultContextual&lt;/em&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;The last value, &lt;em&gt;SRCH_TRAGET_RESULTS_PAGE&lt;/em&gt; cracks me up.&amp;#160; Note how the word &lt;em&gt;target&lt;/em&gt; is misspelled.&amp;#160; It looks like something slipped past QA there.&amp;#160; This value specifies the URL to the contextual search page.&amp;#160; Typically, I change this to use the URL to my search center as I have mentioned &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/12/09/configuring-contextual-search-to-use-search-center.aspx"&gt;before&lt;/a&gt;.&amp;#160; Anyhow, if you want to set this value be sure and misspell it. &lt;/p&gt;  &lt;p&gt;Now that we know what values we need to set, how do we put it all together with PowerShell?&amp;#160; It’s pretty simple.&amp;#160; First we need access to the &lt;em&gt;SPWeb&lt;/em&gt; object of the root web of the site collection we want to change.&amp;#160; You can use &lt;em&gt;Get-SPSite&lt;/em&gt; first to do this, but if you know the URL, then you can just use &lt;em&gt;Get-SPWeb.&lt;/em&gt;&amp;#160; Either way you do it, get yourself an SPWeb object.&amp;#160; Here is an example:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;$web = Get-SPWeb &lt;/em&gt;&lt;em&gt;http://server/sitecollection&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;If you have the right permissions, you should get a blank prompt back without error.&amp;#160; If you get an access denied error, then you need to go make use of &lt;em&gt;Add-SPShellAdmin&lt;/em&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;Now that you have the SPWeb object, you can see if any values have been set for search by using the &lt;em&gt;AllProperties &lt;/em&gt;collection.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;$web.AllProperties&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchSettingsPowerShellAllProperties_03E9D2F4.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SearchSettingsPowerShellAllProperties" border="0" alt="SearchSettingsPowerShellAllProperties" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchSettingsPowerShellAllProperties_thumb_76A349E0.png" width="436" height="218" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In my case, no properties have been set yet.&amp;#160; Now I can set my values.&amp;#160; You can set one or more of these in your script.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;$web.AllProperties[&amp;quot;SRCH_ENH_FTR_URL&amp;quot;] = &amp;quot;/search/pages&amp;quot;;     &lt;br /&gt;$web.AllProperties[&amp;quot;SRCH_SITE_DROPDOWN_MODE&amp;quot;] = &amp;quot;ShowDD_DefaultContextual&amp;quot;;      &lt;br /&gt;$web.AllProperties[&amp;quot;SRCH_TRAGET_RESULTS_PAGE&amp;quot;] = &amp;quot;http://server/search/pages/results.aspx&amp;quot;;&lt;/em&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;After you set your values, don’t forget to call .Update() just like you would when working directly with the object model.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;$web.Update();&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Executing the script should just return you to the PowerShell prompt if everything worked.&amp;#160; You can verify your settings, by looking in the &lt;em&gt;AllProperties&lt;/em&gt; collection.&amp;#160; For example.&amp;#160; Just make sure you get a new instance of the &lt;em&gt;SPWeb&lt;/em&gt; object first or you won’t see the changes.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;$web = Get-SPWeb &lt;/em&gt;&lt;em&gt;http://server/sitecollection&lt;/em&gt;    &lt;br /&gt;&lt;em&gt;$web.AllProperties[&amp;quot;SRCH_ENH_FTR_URL&amp;quot;]&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchSettingsPowerShellPropertySet_4698F85F.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="SearchSettingsPowerShellPropertySet" border="0" alt="SearchSettingsPowerShellPropertySet" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/SearchSettingsPowerShellPropertySet_thumb_7341B238.png" width="438" height="65" /&gt;&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;As you can see it’s really simple.&amp;#160; Now what if you wanted to set these settings on all site collections?&lt;/p&gt;  &lt;p&gt;$webApp = Get-SPWebApplication http://server;   &lt;br /&gt;$siteCollections = $webApp | Get-SPSite –limit all;    &lt;br /&gt;$siteCollections | ForEach-Object {    &lt;br /&gt;$web = $_.RootWeb    &lt;br /&gt;$web.AllProperties[&amp;quot;SRCH_ENH_FTR_URL&amp;quot;] = &amp;quot;/search/pages&amp;quot;;    &lt;br /&gt;$web.AllProperties[&amp;quot;SRCH_SITE_DROPDOWN_MODE&amp;quot;] = &amp;quot;ShowDD_DefaultContextual&amp;quot;;    &lt;br /&gt;$web.AllProperties[&amp;quot;SRCH_TRAGET_RESULTS_PAGE&amp;quot;] = &amp;quot;http://server/search/pages/results.aspx&amp;quot;;    &lt;br /&gt;$web.Update();    &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;Try that out and see if that works for you.&amp;#160; &lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=5395" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>How to: Enable Clip Art with PowerPoint Web App SP1</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/09/27/how-to-enable-clip-art-with-powerpoint-web-app-sp1.aspx</link><pubDate>Tue, 27 Sep 2011 16:38:32 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:5153</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=5153</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/09/27/how-to-enable-clip-art-with-powerpoint-web-app-sp1.aspx#comments</comments><description>&lt;p&gt;When SharePoint 2010 Service Pack 1 came out, I noticed the following line in the &lt;a href="http://support.microsoft.com/kb/2460073"&gt;release notes&lt;/a&gt; regarding Office Web Apps.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“Lets you insert clip art in PowerPoint Web App. (By default clip art support is disabled. An administrator can decide to enable it.)”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;However, it didn’t say &lt;em&gt;how&lt;/em&gt; to enable it.&amp;#160; I looked all over the Internet multiple times and never found a solution.&amp;#160; I knew it had to be some property I could set with PowerShell but guessing the right one and how to set it was the question.&amp;#160; On a recent search, I came across this support &lt;a href="http://www.symantec.com/business/support/index?page=content&amp;amp;id=TECH166772"&gt;article&lt;/a&gt; on Symantec web site where someone was having an issue and it was then I discovered the property name, &lt;em&gt;EnableClipArt&lt;/em&gt;.&amp;#160; On a whim, I decided to give it a try. &lt;/p&gt;  &lt;p&gt;Here is what your ribbon bar looks like before you enable clip art:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppClipArtDisabled_626D44CD.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerPointWebAppClipArtDisabled" border="0" alt="PowerPointWebAppClipArtDisabled" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppClipArtDisabled_thumb_41E6051B.png" width="285" height="202" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To enable it, we can build a simple PowerShell script.&amp;#160; You will need to determine the name to your PowerPoint Service Application’s proxy.&amp;#160; In my case, mine is &lt;em&gt;PowerPoint Service Application Proxy&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointServiceApplication_287E01E1.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerPointServiceApplication" border="0" alt="PowerPointServiceApplication" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointServiceApplication_thumb_2F310B64.png" width="510" height="50" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now for the script.&amp;#160; Remember to change the name of your proxy to match your environment.&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;$proxy = Get-SPServiceApplicationProxy | Where-Object { $_.DisplayName -eq &amp;quot;PowerPoint Service Application Proxy&amp;quot; }     &lt;br /&gt;$proxy.EnableClipart=1      &lt;br /&gt;$proxy.Update()&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;When it completes successfully, PowerShell will just return you a new prompt without an error.&amp;#160; Now, edit your PowerPoint document again in the browser and you should see the Clip Art ribbon button enabled.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppClipArtEnabled_67DBB571.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerPointWebAppClipArtEnabled" border="0" alt="PowerPointWebAppClipArtEnabled" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppClipArtEnabled_thumb_0E3D98BD.png" width="244" height="182" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Select a valid region in a slide to do an Insert and click the Clip Art button.&amp;#160; It will then let you search the online library of clip art for use in your slides.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppClipArtDialog_5FE4130F.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerPointWebAppClipArtDialog" border="0" alt="PowerPointWebAppClipArtDialog" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppClipArtDialog_thumb_65BEB6A8.png" width="706" height="411" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Select the image you like and you will see it in your slide deck.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppClipArtInserted_529D89FC.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerPointWebAppClipArtInserted" border="0" alt="PowerPointWebAppClipArtInserted" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppClipArtInserted_thumb_640DEAD4.png" width="525" height="338" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It’s simple to enable this support.&amp;#160; I wish I could have found this documented sooner.&amp;#160; I hope you enjoy this functionality.&amp;#160; I was curious to see if this functionality was present in SharePoint Online (Office 365), but unfortunately it doesn’t look like it is there yet.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppSPONoClipArt_313DE460.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerPointWebAppSPONoClipArt" border="0" alt="PowerPointWebAppSPONoClipArt" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerPointWebAppSPONoClipArt_thumb_69E88E6D.png" width="244" height="182" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s not a deal breaker though for Office 365.&amp;#160; Maybe we will see it in the future.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=5153" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Office+Web+Apps/default.aspx">Office Web Apps</category></item><item><title>SharePoint PowerShell Error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/07/12/sharepoint-powershell-error-the-local-farm-is-not-accessible-cmdlets-with-featuredependencyid-are-not-registered.aspx</link><pubDate>Tue, 12 Jul 2011 14:05:59 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:4856</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=4856</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/07/12/sharepoint-powershell-error-the-local-farm-is-not-accessible-cmdlets-with-featuredependencyid-are-not-registered.aspx#comments</comments><description>&lt;p&gt;Sometimes when you try to run a SharePoint 2010 Management Shell (PowerShell), you might encounter the error below.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellPermissionsError_59489CEA.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellPermissionsError" border="0" alt="PowerShellPermissionsError" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellPermissionsError_thumb_38C15D38.png" width="566" height="88" /&gt;&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Although, the answer is not obvious given the error message, the answer is quite simple.&amp;#160; You tried to run PowerShell with a user account that is not an administrator in SharePoint.&amp;#160; In this case, I had ran it with my personal account which is not an admin and does not have access to the underlying SharePoint databases.&amp;#160; Hopefully, you used a “setup” account when you created SharePoint.&amp;#160; Execute PowerShell with that account instead.&amp;#160; You can do this either by logging in as that user.&amp;#160; You can also hold down the &lt;em&gt;Shift&lt;/em&gt; key and right click on the SharePoint 2010 Management Shell icon and choose the &lt;em&gt;Run as different user&lt;/em&gt; menu item.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellRunAsDifferentUser_4D46ACB6.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellRunAsDifferentUser" border="0" alt="PowerShellRunAsDifferentUser" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellRunAsDifferentUser_thumb_2D2B9FF9.png" width="173" height="115" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you don’t have a setup account, things might be a bit trickier.&amp;#160; You can also resolve this by running it as the farm account, but you really want to try and avoid this.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=4856" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Error/default.aspx">Error</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>FAST Search for SharePoint PowerShell Error: Failed to communicate with the WCF service</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/06/20/fast-search-for-sharepoint-powershell-error-failed-to-communicate-with-the-wcf-service.aspx</link><pubDate>Mon, 20 Jun 2011 20:22:31 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:4791</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=4791</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/06/20/fast-search-for-sharepoint-powershell-error-failed-to-communicate-with-the-wcf-service.aspx#comments</comments><description>&lt;p&gt;One day when I wasn’t thinking, I encountered the following error when trying to execute a FAST Search for SharePoint PowerShell command such as Get-FASTSearchContentCollection.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Get-FASTSearchContentCollection : Failed to communicate with the WCF service.      &lt;br /&gt;At line:1 char:32       &lt;br /&gt;+ Get-FASTSearchContentCollection &amp;lt;&amp;lt;&amp;lt;&amp;lt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; + CategoryInfo&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; : OperationStopped: (:) [Get-FASTSearchContentCollection], AdminException       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; + FullyQualifiedErrorId : e107: Failed to communicate with the WCF service       &lt;br /&gt;&amp;#160;&amp;#160; .,Microsoft.SharePoint.Search.Extended.Administration.Commandlets.GetCollectionCommand&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Searching on the Internet yields the following &lt;a href="http://support.microsoft.com/kb/981297"&gt;KB article&lt;/a&gt;.&amp;#160; However, this article did not resolve my issue.&amp;#160; In fact, the cause was actually a much simpler solution.&amp;#160; I realized I was running the PowerShell window with my personal account.&amp;#160; Obviously, this account does not have the required permissions needed inside FAST.&amp;#160; To correct the issue, I just did &lt;em&gt;Run as Different User &lt;/em&gt;(hold down shift while right clicking on the icon), to run PowerShell with my &lt;em&gt;fastuser&lt;/em&gt; account.&amp;#160; Once I did that, I could execute the commands I needed.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=4791" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Error/default.aspx">Error</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/FAST+Search+for+SharePoint/default.aspx">FAST Search for SharePoint</category></item><item><title>An easier way to enable Managed Metadata site columns when using the Blank Site template</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/04/19/an-easier-way-to-enabled-managed-metadata-site-columns-when-using-the-blank-site-template.aspx</link><pubDate>Tue, 19 Apr 2011 21:24:30 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:4625</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=4625</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/04/19/an-easier-way-to-enabled-managed-metadata-site-columns-when-using-the-blank-site-template.aspx#comments</comments><description>&lt;p&gt;Whenever you use the Blank Site template for a site collection, a lot of supporting features that you may want are not activated.&amp;#160; One of these is the feature for Managed Metadata site columns.&amp;#160; When you pick one, you might see the following error.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The required feature is not enabled for this column type.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_00EC143E.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_thumb_445415A0.png" width="321" height="206" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s nice, but why don’t you actually tell me the feature name that I need to activate?&amp;#160; I’ve seen a lot of posts on this, and they state to activate the required feature using PowerShell using the GUID of the feature.&amp;#160; Some even, dare I say it, recommend you use stsadm.&amp;#160; Tsk. Tsk.&amp;#160; I don’t know about you, but I can’t remember the GUID off the top of my head.&amp;#160; I got tired of having to look up a post every time I need to activate this feature on a new site collection so I decided to figure out what the name was.&amp;#160; &lt;/p&gt;  &lt;p&gt;If you’ve read my previous PowerShell posts, you know that we can figure this out with &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/01/04/activating-and-deactivating-features-with-powershell-in-sharepoint-2010.aspx"&gt;Get-SPFeature&lt;/a&gt;.&amp;#160; This told me that the feature name was actually &lt;em&gt;TaxonomyFieldAdded&lt;/em&gt;.&amp;#160; Now all we have to do to activate is use the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/01/04/activating-and-deactivating-features-with-powershell-in-sharepoint-2010.aspx"&gt;Enable-SPFeature&lt;/a&gt; command as you see below.&amp;#160; In my case, I am activating it at the site collection located at &lt;em&gt;http://sp2010/sites/deployment&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Enable-SPFeature -Id TaxonomyFieldAdded –Url http://sp2010/sites/deployment&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_3FDD94D9.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_thumb_51BA28A6.png" width="447" height="69" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If all goes well, you’ll get a blank prompt back indicating success.&amp;#160; Now when you try to create your managed metadata site column, it should work successfully.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_2A7FDF71.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_thumb_3F052EEF.png" width="324" height="207" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Even if you’re not great with PowerShell, I find that this command is pretty easy to remember.&amp;#160; Try it out.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=4625" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Error/default.aspx">Error</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category></item><item><title>Activating and Deactivating Features with PowerShell in SharePoint 2010</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/01/04/activating-and-deactivating-features-with-powershell-in-sharepoint-2010.aspx</link><pubDate>Tue, 04 Jan 2011 21:53:08 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:4309</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>26</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=4309</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/01/04/activating-and-deactivating-features-with-powershell-in-sharepoint-2010.aspx#comments</comments><description>&lt;p&gt;I was looking at the analytics of the site the other day and I noticed that my post, &lt;em&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/12/02/adding-and-deploying-solutions-with-powershell-in-sharepoint-2010.aspx"&gt;Adding and Deploying Solutions with PowerShell&lt;/a&gt;&lt;/em&gt;, currently has the most traffic on the site.&amp;#160; I had always intended to write a follow up post on this, so here it is.&amp;#160; Today I’m going to talk about how to enable and disable features using PowerShell.&amp;#160; It’s great that you know how to deploy solutions now with PowerShell, but now you want to activate your features.&lt;/p&gt;  &lt;p&gt;In SharePoint 2007 to activate a feature from the command line you might have used a statement like the one below.&amp;#160; I’ll use the &lt;em&gt;Reporting &lt;/em&gt;feature on my server named &lt;em&gt;sp2010 &lt;/em&gt;as an example.&amp;#160; The value specified in the &lt;em&gt;name&lt;/em&gt; parameter refers to the actual folder name of the feature that is in your SharePoint Root folder (14 hive).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;stsadm.exe –o activatefeature –name Reporting&lt;/em&gt; –&lt;em&gt;url http://sp2010&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To get started with PowerShell, run the SharePoint 2010 Management Console located in your Microsoft SharePoint 2010 Products folder on your start menu.&amp;#160; This automatically loads the Microsoft.SharePoint.PowerShell snapin so that we can execute SharePoint commands.&amp;#160;&amp;#160;&amp;#160; You might have noticed earlier that I said we will talk about enabling and disabling features.&amp;#160; The words enable and disable are key here because PowerShell uses those verbs to activate and deactivate features.&amp;#160; To issue the same command above but with PowerShell, we use the &lt;em&gt;Enable-SPFeature&lt;/em&gt; command.&amp;#160; The rest of the syntax is pretty similar as you can see below.&amp;#160; Just use –&lt;em&gt;Identity&lt;/em&gt; to specify the name of the feature.&amp;#160; You can even pass the &lt;em&gt;–Force &lt;/em&gt;command like you could with stsadm.exe.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Enable-SPFeature –Identity Reporting –url http://sp2010&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If your command worked successfully, you will see nothing and just get a blank prompt back.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellEnableSPFeatureNoOutput_3287798D.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellEnableSPFeatureNoOutput" border="0" alt="PowerShellEnableSPFeatureNoOutput" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellEnableSPFeatureNoOutput_thumb_38621D26.png" width="462" height="67" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you would like to get some feedback from the command, you can have it return the SPFeature object back to you by specifying the –&lt;em&gt;PassThru &lt;/em&gt;parameter.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellEnableSPFeaturePassThru_37F5EA31.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellEnableSPFeaturePassThru" border="0" alt="PowerShellEnableSPFeaturePassThru" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellEnableSPFeaturePassThru_thumb_7BCA1E88.png" width="668" height="131" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We can confirm that the feature did in fact activate successfully using the SharePoint UI.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellReportingFeatureEnabledUI_62621B4E.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellReportingFeatureEnabledUI" border="0" alt="PowerShellReportingFeatureEnabledUI" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellReportingFeatureEnabledUI_thumb_3B27D219.png" width="691" height="47" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Can we confirm that the feature is enabled with PowerShell?&amp;#160; Yes, we can by using Get-SPFeature.&amp;#160; Now this cmdlet behaves differently depending upon the parameters passed through it.&amp;#160; For example, if you type the following, it lists every feature on the SharePoint farm along with its Id and Scope.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPFeature&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;However, if you want to know which features are enabled, you can pass it a URL for a given scope (i.e.: –Web, –Site, –WebApplication, and –Farm).&amp;#160; So to get a list of all Site Collection scoped features, we would use the –&lt;em&gt;Site&lt;/em&gt; parameter.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPFeature –Site http://sp2010&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPFeatureSite_5AD6ABE1.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellGetSPFeatureSite" border="0" alt="PowerShellGetSPFeatureSite" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPFeatureSite_thumb_7A8585A9.png" width="634" height="185" /&gt;&lt;/a&gt;&lt;/p&gt;        &lt;p&gt;You can still specify a specific feature or even use Where-Object to query the list as well.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Get-SPFeature –Identity Reporting –Site http://sp2010&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPFeatureSiteSpecific_20E768F5.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellGetSPFeatureSiteSpecific" border="0" alt="PowerShellGetSPFeatureSiteSpecific" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPFeatureSiteSpecific_thumb_409642BD.png" width="644" height="127" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you get something like you see in the screenshot above, you know the feature has been activated.&amp;#160; When the feature hasn’t been activated, you will get a lovely red error message.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPFeatureSiteSpecificNotEnabled_402A0FC8.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellGetSPFeatureSiteSpecificNotEnabled" border="0" alt="PowerShellGetSPFeatureSiteSpecificNotEnabled" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellGetSPFeatureSiteSpecificNotEnabled_thumb_74CA6C03.png" width="639" height="160" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The Enable-SPFeature command can also take a Pipe Bind from Get-SPFeature.&amp;#160; This means that you could even activate multiple features at once this way.&amp;#160; I’ll include an example of this in the future.&lt;/p&gt;  &lt;p&gt;At some point, you will want to disable that feature you activated.&amp;#160; As you probably guessed, the cmdlet you want is &lt;em&gt;Disable-SPFeature&lt;/em&gt;.&amp;#160; You use the same parameters that you use with &lt;em&gt;Enable-SPFeature&lt;/em&gt;.&amp;#160; When you execute the command, it prompts for confirmation as you can see in the screenshot.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Disable-SPFeature –Identity Reporting –url &lt;/em&gt;&lt;em&gt;http://sp2010&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellDisableSPFeatureWithConfirmation_745E390E.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellDisableSPFeatureWithConfirmation" border="0" alt="PowerShellDisableSPFeatureWithConfirmation" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellDisableSPFeatureWithConfirmation_thumb_140D12D7.png" width="643" height="156" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you want to disable confirmation, you can pass the –&lt;em&gt;confirm:$false &lt;/em&gt;parameter.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;Disable-SPFeature –Identity Reporting –url &lt;/em&gt;&lt;em&gt;http://sp2010 –Confirm:$false&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellDisableSPFeatureNoConfirmation_37C63A71.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="PowerShellDisableSPFeatureNoConfirmation" border="0" alt="PowerShellDisableSPFeatureNoConfirmation" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/PowerShellDisableSPFeatureNoConfirmation_thumb_6C6696AC.png" width="649" height="74" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Setting the confirm parameter eliminates the confirmation prompt and you can use it with other PowerShell cmdlets as well.&amp;#160; That is all that is involved in activating and deactivating features with PowerShell.&amp;#160; It’s pretty easy.&amp;#160;&amp;#160; Hopefully, you can incorporate these commands in your deployment scripts.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=4309" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Feature/default.aspx">Feature</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/PowerShell/default.aspx">PowerShell</category></item></channel></rss>