<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7851303073781093267</id><updated>2024-10-25T11:57:35.993+02:00</updated><category term="Sharepoint 2010"/><category term="Powershell"/><category term="Sharepoint foundation 2010"/><category term="sharepoint server 2010"/><category term="Sharepoint 2013;"/><category term="AD"/><category term="Active directory"/><category term=".NET"/><category term="comments"/><category term="iis"/><category term="managed"/><category term="metadata"/><category term="mysite"/><category term="social"/><category term="tag"/><title type='text'>Sharepoint</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-8670097760810271705</id><published>2015-10-14T14:10:00.000+02:00</published><updated>2015-10-14T14:10:26.988+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysite"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2013;"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>Create mysite using Powershell</title><content type='html'>Function Create-MySite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;[CmdletBinding()]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;Param&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;(&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; [Parameter(Mandatory = $True,Position=2,valueFromPipeline=$true)][String]$Username,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parameter(Mandatory = $True,Position=1)][String]$MySiteRootURL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;[void][reflection.assembly]::Loadwithpartialname(&quot;Microsoft.Office.Server&quot;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;$site=new-object Microsoft.SharePoint.SPSite($MySiteRootURL);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;try&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; $serviceContext = Get-SPServiceContext $site;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; $upm = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; if($upm.UserExists($Username) -eq $false)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; Write-Host &quot;User $Username was not found in the profile store.&quot; -f yellow;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; return;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; $userProfile = $upm.GetUserProfile($Username);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; if($userProfile.PersonalSite -eq $Null)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; Write-Host &quot;Creating MySite for user $Username&quot; -f darkyellow;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; $userProfile.CreatePersonalSite();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; Write-host &quot;Successfully created MySite for user $Username&quot; -f green;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; else&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; Write-Host &quot;User $Username already has a MySite.&quot; -f darkgreen;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;catch&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; Write-Host &quot;Encountered an error creating a MySite for user $Username. Error:&quot;$_.Exception -f Red;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;finally&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; $site.Dispose();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
Create-MySite -MySiteRootURL &quot;http://url&quot; -Username &quot;domain\user&quot;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/8670097760810271705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2015/10/create-mysite-using-powershell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/8670097760810271705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/8670097760810271705'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2015/10/create-mysite-using-powershell.html' title='Create mysite using Powershell'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-2098520400934576432</id><published>2015-10-09T10:52:00.002+02:00</published><updated>2015-10-09T10:53:01.607+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2013;"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>Powershell script remove contenttypes from list</title><content type='html'>&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;#Get site object and specify name of the library to look for in each site&lt;br /&gt;

$site = Get-SPSite &lt;a href=&quot;http://url/&quot;&gt;http://URL&lt;/a&gt;&lt;br /&gt;

&lt;/span&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;$lookForList = &quot;ListName&lt;/span&gt;&lt;span style=&quot;font-family: Tahoma; font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: Tahoma; font-size: xx-small;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times New Roman; font-size: xx-small;&quot;&gt;$ContentType = &quot;CTName&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Tahoma; font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: Tahoma; font-size: xx-small;&quot;&gt;

#Walk through each site and change content types on the list specified&lt;br /&gt;

$site | Get-SPWeb -Limit all | ForEach-Object {&lt;br /&gt;

    &lt;br /&gt;

    write-host &quot;Checking site:&quot;$_.Title&lt;br /&gt;

    &lt;br /&gt;

    #Check list exists&lt;br /&gt;

    $docLibrary = $_.Lists[$lookForList]&lt;br /&gt;

    &lt;br /&gt;

    #Remove unwanted content types from the list&lt;br /&gt;

    if($docLibrary -ne $null)&lt;br /&gt;

    {&lt;br /&gt;

        $ctToRemove = $docLibrary.ContentTypes[$ContentType]&lt;br /&gt;

        write-host &quot;Removing content type&quot; $ctToRemove.Name &quot;from list&quot; $docLibrary.Title&lt;br /&gt;

        $docLibrary.ContentTypes.Delete($ctToRemove.Id)&lt;br /&gt;

        $docLibrary.Update()&lt;br /&gt;

    }&lt;br /&gt;

    else&lt;br /&gt;

    {&lt;br /&gt;

        write-host &quot;The list&quot; $lookForList &quot;does not exist in site&quot; $_.Title&lt;br /&gt;

    }&lt;br /&gt;

}&lt;br /&gt;

#Dispose of the site object&lt;br /&gt;

$site.Dispose()&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/2098520400934576432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2015/10/remove-contenttypes-from-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/2098520400934576432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/2098520400934576432'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2015/10/remove-contenttypes-from-list.html' title='Powershell script remove contenttypes from list'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-6226551519096006470</id><published>2015-06-11T16:34:00.001+02:00</published><updated>2015-06-11T16:34:16.940+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="managed"/><category scheme="http://www.blogger.com/atom/ns#" term="metadata"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2013;"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>Export managed metadata</title><content type='html'>Get-SpServiceApplication | select DisplayName, ID&lt;br /&gt;
Get-SPServiceApplicationProxy | select DisplayName, ID&lt;br /&gt;
$mmsAppId = &quot;GUID&quot;&lt;br /&gt;
$mmsproxy = Get-SPServiceApplicationProxy -Identity GUID&lt;br /&gt;
Export-SPMetadataWebServicePartitionData -Identity $mmsAppId -ServiceProxy $mmsproxy -Path &lt;a href=&quot;file://vm222/test/Systemlista.bak&quot;&gt;\\server\path\filename.bak&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/6226551519096006470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2015/06/export-managed-metadata.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/6226551519096006470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/6226551519096006470'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2015/06/export-managed-metadata.html' title='Export managed metadata'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-627088178209347576</id><published>2015-06-11T16:29:00.001+02:00</published><updated>2015-06-11T16:30:55.160+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="comments"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="social"/><category scheme="http://www.blogger.com/atom/ns#" term="tag"/><title type='text'>Migrate SharePoint social tag comments</title><content type='html'>&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;Add-PSSnapin microsoft.sharepoint.powershell&lt;br /&gt;


&lt;br /&gt;
$upaProxy = Get-SPServiceApplicationProxy GUID&lt;br /&gt;

&lt;br /&gt;
$site = get-spsite #URL&lt;br /&gt;

&lt;br /&gt;
$listName = #LISTNAME&lt;br /&gt;


&lt;br /&gt;
foreach($web in $site.AllWebs){&lt;br /&gt;

&lt;br /&gt;
    &lt;br /&gt;

&lt;br /&gt;
    $oldurl = &quot;&quot;&lt;br /&gt;

&lt;br /&gt;
	$newurl = &quot;&quot;&lt;br /&gt;


&lt;br /&gt;
    if($web.ParentWeb.Url -eq $site.url){&lt;br /&gt;

&lt;br /&gt;
    &lt;br /&gt;

&lt;br /&gt;
        $list = $web.Lists[$listName]&lt;br /&gt;

&lt;br /&gt;
        $items = $list.items&lt;br /&gt;

&lt;br /&gt;
        &lt;br /&gt;

&lt;br /&gt;
        foreach($item in $items)&lt;br /&gt;

&lt;br /&gt;
        {&lt;br /&gt;

&lt;br /&gt;
            if($item.xml -Like &quot;*#RELPATH/PAGE.aspx, PAGETYPE*&quot;){&lt;br /&gt;

&lt;br /&gt;
            &lt;br /&gt;

&lt;br /&gt;
                $newurl = $web.url + &quot;/&quot; + $item.url&lt;br /&gt;

&lt;br /&gt;
                [System.uri]$newurl = $newurl&lt;br /&gt;

&lt;br /&gt;
                $newurl.AbsoluteUri&lt;br /&gt;

&lt;br /&gt;
                &lt;br /&gt;

&lt;br /&gt;
                $oldurl = $newurl.AbsoluteUri&lt;br /&gt;

&lt;br /&gt;
                $oldurl = $oldurl -replace &quot;SITE1&quot;, &quot;SITE2&quot;&lt;br /&gt;

&lt;br /&gt;
                $oldurl&lt;br /&gt;

&lt;br /&gt;
                &lt;br /&gt;

&lt;br /&gt;
                Move-SPSocialComments -ProfileServiceApplicationProxy $upaProxy -OldUrl $oldurl -NewUrl $newurl.AbsoluteUri&lt;br /&gt;

&lt;br /&gt;
                &lt;br /&gt;

&lt;br /&gt;
            }&lt;br /&gt;

&lt;br /&gt;
        }&lt;br /&gt;

&lt;br /&gt;
    }&lt;br /&gt;


&lt;br /&gt;
}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/627088178209347576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2015/06/migrate-sharepoint-social-tag-comments.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/627088178209347576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/627088178209347576'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2015/06/migrate-sharepoint-social-tag-comments.html' title='Migrate SharePoint social tag comments'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-3475989483696389301</id><published>2014-07-07T11:44:00.003+02:00</published><updated>2014-07-07T11:44:35.187+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2013;"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><title type='text'>Security Token Service is down or showing errors?</title><content type='html'>&lt;br /&gt;&lt;br /&gt;Some examples of errors that may show up in your ULS log.&lt;div&gt;
&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;An exception occurred when trying to issue security token: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error (OR)&lt;/li&gt;
&lt;li&gt;Request for security token failed with exception: System.ServiceModel.ServiceActivationException: The requested service,&#39;&lt;a href=&quot;http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas&quot;&gt;http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas&lt;/a&gt;&#39; could not be activated (OR)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;An exception occurred when trying to issue security token: The requested service,&#39;&lt;a href=&quot;http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas&quot;&gt;http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas&lt;/a&gt;&#39; could not be activated&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Run the following commands, it will do a new provisioning of the Security Token Service.&lt;div&gt;
&lt;br /&gt;$h = Get-SPServiceHostconfig&lt;br /&gt;$h.Provision()&lt;br /&gt;$services = Get-SPServiceApplication&lt;br /&gt;foreach ($service in $services) { $service.provision();&lt;br /&gt;write-host $service.name}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Perform an IIS Reset and try to browse the STS, &lt;a href=&quot;http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas&quot;&gt;http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/3475989483696389301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2014/07/security-token-service-is-down-or.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/3475989483696389301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/3475989483696389301'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2014/07/security-token-service-is-down-or.html' title='Security Token Service is down or showing errors?'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-5405344353346982657</id><published>2014-06-05T15:36:00.002+02:00</published><updated>2014-06-05T15:40:18.817+02:00</updated><title type='text'>Set user default regional settings from website default </title><content type='html'>$spweb = Get-SPWeb http://yourURL.com&lt;br /&gt;
$user = get-spuser -Web $spweb -Identity &quot;DOMAIN\USER&quot;&lt;br /&gt;
$reg = $user.RegionalSettings&lt;br /&gt;
$newReg = new-object Microsoft.SharePoint.SPRegionalSettings($spweb);&lt;br /&gt;
$user.RegionalSettings = $newReg;&lt;br /&gt;
$user.Update();</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/5405344353346982657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2014/06/set-user-default-regional-settings-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/5405344353346982657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/5405344353346982657'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2014/06/set-user-default-regional-settings-from.html' title='Set user default regional settings from website default '/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-6341498110981958354</id><published>2014-06-04T11:17:00.000+02:00</published><updated>2014-06-04T11:17:13.317+02:00</updated><title type='text'>Powershell script activate developer dashboard on demand in your Sharepoint 2013 environment </title><content type='html'>$svc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService &lt;br /&gt;$dds = $svc.DeveloperDashboardSettings&lt;br /&gt;$dds.DisplayLevel = &quot;OnDemand&quot;&lt;br /&gt;$dds.TraceEnabled = $true;&lt;br /&gt;$dds.Update()</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/6341498110981958354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2014/06/powershell-script-activate-developer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/6341498110981958354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/6341498110981958354'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2014/06/powershell-script-activate-developer.html' title='Powershell script activate developer dashboard on demand in your Sharepoint 2013 environment '/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-1701252306142349268</id><published>2014-04-07T11:29:00.001+02:00</published><updated>2014-04-07T11:29:27.240+02:00</updated><title type='text'>Add list column to list contenttype</title><content type='html'>$web = Get-SPWeb -Identity &quot;&lt;a href=&quot;http://emma.energimyndigheten.se/emma&quot;&gt;URL to your site&lt;/a&gt;&quot;&lt;br /&gt;
$list = $web.Lists[&quot;List name&quot;]&lt;br /&gt;$ct = $list.ContentTypes[&quot;Contenttype Name&quot;]&lt;br /&gt;$field = $list.Fields[&quot;Field Name&quot;]&lt;br /&gt;
#$field = $list.Fields[{GUID}]&lt;br /&gt;$fieldLink=New-Object Microsoft.SharePoint.SPFieldLink($field)&lt;br /&gt;$ct.FieldLinks.Add($fieldLink);&lt;br /&gt;$ct.Update()&lt;br /&gt;
$web.Dispose()</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/1701252306142349268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2014/04/add-list-column-to-list-contenttype.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/1701252306142349268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/1701252306142349268'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2014/04/add-list-column-to-list-contenttype.html' title='Add list column to list contenttype'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-605458639912621237</id><published>2013-08-28T15:29:00.001+02:00</published><updated>2013-08-28T15:29:44.471+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>Count of all Documents in SharePoint 2010 Farm with Powershell</title><content type='html'>&lt;br /&gt;
Get-SPSite -Limit All | Get-SPWeb -Limit All | % { $_.Lists} | ? { $_ -is [Microsoft.SharePoint.SPDocumentLibrary] } | % { $total+= $_.ItemCount} ; $total</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/605458639912621237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2013/08/count-of-all-documents-in-sharepoint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/605458639912621237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/605458639912621237'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2013/08/count-of-all-documents-in-sharepoint.html' title='Count of all Documents in SharePoint 2010 Farm with Powershell'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-5217371796562792640</id><published>2013-05-02T12:53:00.000+02:00</published><updated>2013-05-02T12:53:20.287+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>Open PDF</title><content type='html'>$webApp = Get-SPWebApplication http://url&lt;br /&gt;
If ($webApp.AllowedInlineDownloadedMimeTypes -notcontains &quot;application/pdf&quot;)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; Write-Host &quot;Adding PDF MIME Type...&quot;&lt;br /&gt;
&amp;nbsp; $webApp.AllowedInlineDownloadedMimeTypes.Add(&quot;application/pdf&quot;)&lt;br /&gt;
&amp;nbsp; $webApp.Update()&lt;br /&gt;
&amp;nbsp; Write-Host &quot;MIME Type saved.&quot;&lt;br /&gt;
} Else {&lt;br /&gt;
&amp;nbsp; Write-Host -ForegroundColor red &quot;PDF MIME type is already added.&quot;&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/5217371796562792640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2013/05/open-pdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/5217371796562792640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/5217371796562792640'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2013/05/open-pdf.html' title='Open PDF'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-1718316261016216385</id><published>2013-04-18T10:30:00.000+02:00</published><updated>2013-04-18T10:32:16.922+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Active directory"/><category scheme="http://www.blogger.com/atom/ns#" term="AD"/><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>Fucked up timer job?</title><content type='html'>Update userinfo from Active Directory to Site Collection, if timer job is fucked up.&lt;br /&gt;
&lt;br /&gt;
get-spuser -Web &lt;a href=&quot;http://url/&quot;&gt;http://url&lt;/a&gt; -Identity domain\user
&lt;br /&gt;
set-spuser -Web &lt;a href=&quot;http://url/&quot;&gt;http://url&lt;/a&gt; -Identity domain\user -SyncFromAD</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/1718316261016216385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2013/04/fucked-up-timer-job.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/1718316261016216385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/1718316261016216385'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2013/04/fucked-up-timer-job.html' title='Fucked up timer job?'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-7018635770720057607</id><published>2013-03-20T06:55:00.002+01:00</published><updated>2013-03-20T06:55:46.843+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Active directory"/><category scheme="http://www.blogger.com/atom/ns#" term="AD"/><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>Import photos from AD to SharePoint 2010</title><content type='html'>This is a time comsuming feature, here&#39;s the step for doing it right and saving time and insanity... :)&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;PreReq&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
User Profile Service application&lt;br /&gt;
MySite&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;Walkthrough&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
At present there is no picture associated to this user inside Active Directory.&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/3630.image_5F00_3A751F43.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;244&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/7331.image_5F00_thumb_5F00_3BF63B57.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;196&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Note- You will not see all the user attributes if you have not turned on the “Advanced Features”. You can also view the same information from ADSI.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;How to import Pictures&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Now our Goal is to import the user profile along with his picture, we will also upload his picture in AD.&lt;br /&gt;
1) First we need to make sure we are able to import users. So I will create connection to OU – PictureOU and import users&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/2541.image_5F00_1547AF0A.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;244&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/7356.image_5F00_thumb_5F00_72A3708E.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Note- I am only importing users from OU PictureOU&lt;br /&gt;
2) Let’s check user’s profile in SharePoint and make sure there is no picture associated to it.&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/7245.image_5F00_5B28BC5D.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;35&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/1070.image_5F00_thumb_5F00_38F0B0D7.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Picture for this user is set to be blank&lt;br /&gt;
3) Upload Pictures to Active Directory.&lt;br /&gt;
Lots of people also have trouble in finding out ways to upload pictures in Active Directory. Following are the two best methods that I am aware off&lt;br /&gt;
&lt;blockquote&gt;
&lt;strong&gt;A.&lt;/strong&gt; Run these commands in Windows Powershell. We need to have Windows Administrative tools loaded for this to work&lt;br /&gt;
Import-Module ActiveDirectory&lt;br /&gt;
$photo=[byte[]](Get-Content C:\photo.jpg -Encoding byte)&lt;br /&gt;
Set-ADUser &quot;username&quot; -Replace @{thumbnailPhoto=$photo}&lt;/blockquote&gt;
4) Let’s check User properties in Active Directory and make sure if has Picture value set&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/8814.image_5F00_18697125.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;244&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/2068.image_5F00_thumb_5F00_23B28562.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;185&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
5) Map the Picture property to Thumnail Photo&lt;br /&gt;
&lt;blockquote&gt;
A) Browse to User Profile Service Application from Central Administration and then click on Manage User Properties&lt;br /&gt;
Central Administration &amp;gt; UPA &amp;gt; Manage User Properties&lt;br /&gt;
B)  Click on Picture and then Edit&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/3443.image_5F00_72CFCDF6.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;31&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/8738.image_5F00_thumb_5F00_65F577D8.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
C) We need to Map this to Attribute “thumnailPhoto” and Select Import from the Direction. Make sure you click on on Add&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/0407.image_5F00_2C7267E1.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;95&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/2553.image_5F00_thumb_5F00_5DFDD576.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
D) After clicking on Add make sure it shows up under the “Property Mapping for Synchronization”section&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/7356.image_5F00_3BC5C9F0.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;92&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/7245.image_5F00_thumb_5F00_0AE31285.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
E) Click on OK&lt;/blockquote&gt;
6) Start incremental Import&lt;br /&gt;
7) Let’s check the User properties and see if the image has been populated&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/5706.image_5F00_7D9C8971.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;35&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/8726.image_5F00_thumb_5F00_5B647DEB.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
So Picture still showing blank&lt;br /&gt;
8) Let’s check MIIS client and see if it made an attempt to import the picture. For this we will need to DS_DELTASYNC&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/7245.image_5F00_01C66137.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;144&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/1300.image_5F00_thumb_5F00_7DC8E6D9.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
So it does appear that FIM picked up the image successfully from Active Directory&lt;br /&gt;
9) Let’s check the Sync DB by running the following query&lt;br /&gt;
Select sAMAccountName,SPS_MV_OctetString_PictureURL from MMS_Metaverse with(nolock) Where SAMAccountName like &#39;%UserName%&#39;&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/6663.image_5F00_1031378F.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;41&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/3652.image_5F00_thumb_5F00_55698EB8.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
So it appears Sync DB has successfully got updated with the Image.&lt;br /&gt;
&lt;br /&gt;
10) Now let’s check the Profile DB by running the following query&lt;br /&gt;
Select NTname,PictureURL from UserProfile_full with(nolock) where NTName like ‘%harmeet%’&lt;br /&gt;
&lt;a href=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/7268.image_5F00_0C636CF2.png&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;77&quot; src=&quot;http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-67-metablogapi/5706.image_5F00_thumb_5F00_3DEEDA87.png&quot; style=&quot;background-image: none; border: 0px currentColor; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;218&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
So it appears that Picture has not made it to the Profile DB&lt;br /&gt;
11) Run the following in SharePoint Management Shell &lt;br /&gt;
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation &lt;a href=&quot;http://mysite/&quot;&gt;http://mysite&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://support.microsoft.com/kb/2394320&quot; title=&quot;http://support.microsoft.com/kb/2394320&quot;&gt;http://support.microsoft.com/kb/2394320&lt;/a&gt;&lt;br /&gt;
12) Now if you go back to the user profile you will see that the image has been updated</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/7018635770720057607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2013/03/import-photos-from-ad-to-sharepoint-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/7018635770720057607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/7018635770720057607'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2013/03/import-photos-from-ad-to-sharepoint-2010.html' title='Import photos from AD to SharePoint 2010'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-1004222965022953549</id><published>2013-03-20T06:49:00.004+01:00</published><updated>2013-03-20T06:49:45.730+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Active directory"/><category scheme="http://www.blogger.com/atom/ns#" term="AD"/><title type='text'>Insert photo to Active Directory</title><content type='html'>Import-Module ActiveDirectory&lt;br /&gt;
$photo=[byte[]](Get-Content C:\photo.jpg -Encoding byte)&lt;br /&gt;
Set-ADUser &quot;username&quot; -Replace @{thumbnailPhoto=$photo}</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/1004222965022953549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2013/03/insert-photo-to-active-directory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/1004222965022953549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/1004222965022953549'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2013/03/insert-photo-to-active-directory.html' title='Insert photo to Active Directory'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-4525596848493215786</id><published>2013-03-20T06:47:00.002+01:00</published><updated>2013-03-20T06:48:07.088+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>Pre-create my site</title><content type='html'>How to create my site in SharePoint 2010&amp;nbsp;by powershell or STSADM? &lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Use the following deprecated STSADM command:&lt;br /&gt;&lt;strong&gt;STSADM -o createsite &lt;/strong&gt;see also &lt;a href=&quot;http://technet.microsoft.com/en-us/library/cc262594(office.12).aspx&quot;&gt;http://technet.microsoft.com/en-us/library/cc262594(office.12).aspx&lt;/a&gt;&lt;br /&gt;(for MySite use SPSPERS#0 for the site template) &lt;/li&gt;
&lt;li&gt;Or Use the following Powershell script:&lt;br /&gt;&lt;strong&gt;Get-SPWebTemplate&lt;br /&gt;$template = Get-SPWebTemplate &quot;SPSPERS#0&quot;&lt;br /&gt;New-SPSite -Url &quot;&amp;lt;URL for the new site collection&amp;gt;&quot; -OwnerAlias &quot;&amp;lt;domain\user&amp;gt;&quot; -Template $template&lt;/strong&gt;see also &lt;a href=&quot;http://technet.microsoft.com/en-us/library/cc263094.aspx&quot;&gt;http://technet.microsoft.com/en-us/library/cc263094.aspx&lt;/a&gt; &lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/4525596848493215786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2013/03/pre-create-my-site.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/4525596848493215786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/4525596848493215786'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2013/03/pre-create-my-site.html' title='Pre-create my site'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-225857686489190924</id><published>2013-01-22T15:36:00.003+01:00</published><updated>2013-01-22T15:36:37.908+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="iis"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>How to find Apppools username AND password?</title><content type='html'>At your WFE, C:\Windows\System32\inetsrv&amp;gt;&lt;br /&gt;
type appcmd list apppool /text:*&lt;br /&gt;
&lt;br /&gt;
This will bring up a list of every applicationpools at your WFE, showing both Username and Password! Helpful if you have lost any password, but also a possible security issue, everyone having access to your WFE and have administration rights can also gain access to your accounts and password. What about you have accounts with Active Directory permissions?</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/225857686489190924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2013/01/how-to-find-apppools-username-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/225857686489190924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/225857686489190924'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2013/01/how-to-find-apppools-username-and.html' title='How to find Apppools username AND password?'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-7544016726361771687</id><published>2012-10-10T14:58:00.000+02:00</published><updated>2012-10-10T14:58:05.033+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint foundation 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint server 2010"/><title type='text'>Powershell script sync Sharepoint user from AD</title><content type='html'>&lt;br /&gt;
Powershell script sync Sharepoint user from AD&lt;br /&gt;
&lt;br /&gt;
get-spuser -identity domain\user -web url&lt;br /&gt;
set-spuser -identity domain\user -SyncFromAD -web url&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/7544016726361771687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/10/powershell-script-sync-sharepoint-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/7544016726361771687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/7544016726361771687'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/10/powershell-script-sync-sharepoint-user.html' title='Powershell script sync Sharepoint user from AD'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-1983168732996884022</id><published>2012-09-10T15:47:00.002+02:00</published><updated>2012-09-10T15:48:35.159+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><title type='text'>Powershell Bulk upload by putting the keywords in text or csv file</title><content type='html'>&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;get-content &quot;C:\path\NameOfFile.csv&quot; | foreach-object { &amp;nbsp; New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication &quot;Fast Query&quot; -Language en-US -Type QuerySuggestionAlwaysSuggest -Name $_ }&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/1983168732996884022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/09/powershell-bulk-upload-by-putting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/1983168732996884022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/1983168732996884022'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/09/powershell-bulk-upload-by-putting.html' title='Powershell Bulk upload by putting the keywords in text or csv file'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-6227864605751208460</id><published>2012-01-16T10:43:00.000+01:00</published><updated>2012-01-16T10:45:16.530+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><title type='text'>Powershell script update draft version Sharepoint 2010</title><content type='html'>#Get site object and specify name of the library to look for in each site&lt;br /&gt;$site = Get-SPSite &lt;a href=&quot;http://yoursite.com/&quot;&gt;http://yoursite.com/&lt;/a&gt;&lt;br /&gt;
$lookForList = &quot;Shared documents&quot;&lt;br /&gt;
#Walk through each site and change draft settings on the list specified&lt;br /&gt;$site | Get-SPWeb -Limit all | ForEach-Object {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; write-host &quot;Checking site:&quot;$_.Title&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Make sure the library exists&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $docLibrary = $_.Lists[$lookForList]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ($docLibrary -ne $null)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $docLibrary.DraftVersionVisibility = 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $docLibrary.Update()&lt;br /&gt;&amp;nbsp;write-host $docLibrary.Title &quot;on site&quot; $_.Title &quot;is updated&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write-host &quot;The list&quot; $lookForList &quot;does not exist in site&quot; $_.Title&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;#Dispose of the site object&lt;br /&gt;$site.Dispose()&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/6227864605751208460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-update-draft-version.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/6227864605751208460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/6227864605751208460'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-update-draft-version.html' title='Powershell script update draft version Sharepoint 2010'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-3321722458919011534</id><published>2012-01-16T10:41:00.000+01:00</published><updated>2012-01-16T10:45:16.520+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><title type='text'>Powershell script modify webpart on page Sharepoint 2010</title><content type='html'>$site = new-object Microsoft.SharePoint.SPSite(&quot;&lt;a href=&quot;http://l/&quot;&gt;http://&lt;/a&gt;yoursite.com&quot;)&lt;br /&gt;$web = $site.OpenWeb(&quot;RandomSite/AnotherSite/&quot;)&lt;br /&gt;$page = $web.GetFile(&quot;Pages/default.aspx&quot;)&lt;br /&gt;$page.CheckOut()&lt;br /&gt;$wpm = $web.GetLimitedWebPartManager(&quot;Pages/default.aspx&quot;, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)&lt;br /&gt;$wpm.WebParts | ft&lt;br /&gt;
&lt;br /&gt;
$wp = $wpm.WebParts[1]&lt;br /&gt;$wp.EnableRedirect = $false&lt;br /&gt;$wp.Url = &quot;&lt;a href=&quot;http://www.google.com/&quot;&gt;http://www.google.com/&lt;/a&gt;&quot;&lt;br /&gt;$wpm.SaveChanges($wp)&lt;br /&gt;$page.CheckIn(&quot;Test&quot;)&lt;br /&gt;$page.Publish(&quot;Test&quot;)&lt;br /&gt;$web.Close()&lt;br /&gt;$site.Close()&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/3321722458919011534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-modify-webpart-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/3321722458919011534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/3321722458919011534'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-modify-webpart-on.html' title='Powershell script modify webpart on page Sharepoint 2010'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-4358471770055637878</id><published>2012-01-16T10:40:00.001+01:00</published><updated>2012-01-16T10:45:16.523+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><title type='text'>Powershell script list all powershell commands in a text file</title><content type='html'>Get-Command –PSSnapin “Get-Command –PSSnapin “Microsoft.SharePoint.PowerShell” format-table name &amp;gt; C:\SP2010_PowerShell_Commands.txt&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/4358471770055637878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-list-all-powershell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/4358471770055637878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/4358471770055637878'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-list-all-powershell.html' title='Powershell script list all powershell commands in a text file'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-2420197537402261811</id><published>2012-01-16T10:39:00.003+01:00</published><updated>2012-01-16T10:45:16.509+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><title type='text'>Powershell script install feature Sharepoint 2010</title><content type='html'>$MyFeatureId = $(Get -SPFeature -limit all where {$_.displayname -eq &quot;myfeatureName&quot;}).Id&lt;br /&gt;
Install -SPFeature $MyFeatureId&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/2420197537402261811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-install-feature.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/2420197537402261811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/2420197537402261811'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-install-feature.html' title='Powershell script install feature Sharepoint 2010'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-311129273230485201</id><published>2012-01-16T10:39:00.000+01:00</published><updated>2013-02-28T15:44:15.615+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><title type='text'>Powershell script activate developer dashboard on demand in your Sharepoint 2010 environment</title><content type='html'>$dd = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;&lt;br /&gt;
$dd.DisplayLevel = ‘On Demand’;&lt;br /&gt;
$dd.TraceEnabled = $true;&lt;br /&gt;
$dd.Update ();</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/311129273230485201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-activate-developer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/311129273230485201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/311129273230485201'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-activate-developer.html' title='Powershell script activate developer dashboard on demand in your Sharepoint 2010 environment'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-8798763544418059191</id><published>2012-01-16T10:37:00.003+01:00</published><updated>2012-01-16T10:45:16.544+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><title type='text'>Powershell script disable feature Sharepoint 2010 site collection</title><content type='html'>$singleSiteCollection = Get-SPSite -Identity &lt;a href=&quot;http://yoursite.com/&quot;&gt;http://yoursite.com/&lt;/a&gt;&lt;br /&gt;
Disable -SPFeature $MyFeatureId -Url $singleSiteCollection.URL&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/8798763544418059191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-disable-feature.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/8798763544418059191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/8798763544418059191'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-disable-feature.html' title='Powershell script disable feature Sharepoint 2010 site collection'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-2663457889241726708</id><published>2012-01-16T10:36:00.004+01:00</published><updated>2012-01-16T10:45:16.513+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><title type='text'>Powershell script change title of a document library in your Sharepoint 2010 site collection</title><content type='html'>#Change these variables to your site URL and list name&lt;br /&gt;$site = Get-SPSite &lt;a href=&quot;http://yoursite.com/&quot;&gt;http://yoursite.com/&lt;/a&gt;&lt;br /&gt;$listName = &quot;Shared Documents&quot;&lt;br /&gt;
#Walk through each site in the site collection&lt;br /&gt;$site | Get-SPWeb | ForEach-Object {&lt;br /&gt;
#Get the list in this site&lt;br /&gt;$list = $_.Lists[$listName]&lt;br /&gt;
#Make the list changes&lt;br /&gt;$list.Title = &quot;Documents&quot;&lt;br /&gt;$list.Description = &quot;Use the Documents library to store shared files&quot;&lt;br /&gt;
#Update the list&lt;br /&gt;$list.Update()&lt;br /&gt;}&lt;br /&gt;
#Dispose of the site object&lt;br /&gt;$site.Dispose()&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/2663457889241726708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-change-title-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/2663457889241726708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/2663457889241726708'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-change-title-of.html' title='Powershell script change title of a document library in your Sharepoint 2010 site collection'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851303073781093267.post-7068788146459594904</id><published>2012-01-16T10:35:00.000+01:00</published><updated>2012-01-16T10:45:16.536+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Sharepoint 2010"/><title type='text'>Powershell script add webpart to your Sharepoint 2010 sites in your site collection</title><content type='html'>$site = new-object Microsoft.sharePoint.SPSite(&quot;&lt;a href=&quot;http://yoursite.com/&quot;&gt;http://yoursite.com/&lt;/a&gt;&quot;)&lt;br /&gt;$web=$site.OpenWeb()$pubweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)$defaultpage=$pubweb.GetPublishingPages()[$pubweb.DefaultPage]$defaultpage.CheckOut()$webpartmanager=$web.GetLimitedWebPartManager($defaultpage.Url,&lt;br /&gt;[System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)$webpart=new-object&amp;nbsp; Microsoft.SharePoint.WebPartPages.ContentEditorWebPart&lt;br /&gt;$webpart.ChromeType=[System.Web.UI.WebControls.WebParts.PartChromeType]::TitleOnly;&lt;br /&gt;$webpart.Title=&quot;Name of your Webpart&quot;&lt;br /&gt;
$webpartmanager.AddWebPart($webpart, &quot;Left&quot;, 0);$defaultpage.CheckIn(&quot;Checked in Webpart&quot;)&lt;br /&gt;$defaultpage.listItem.File.Publish(&quot;Published Webpart&quot;)&lt;br /&gt;if ($defaultpage.listItem.ParentList.EnableModeration)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; $modInformation = $defaultpage.listItem.ModerationInformation&amp;nbsp;&amp;nbsp; if($modInformation.Status -ne [Microsoft.SharePoint.SPModerationStatusType]::Approved)&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $defaultpage.ListItem.File.Approve(&quot;Approved Page&quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://dekagon.blogspot.com/feeds/7068788146459594904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-add-webpart-to-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/7068788146459594904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851303073781093267/posts/default/7068788146459594904'/><link rel='alternate' type='text/html' href='http://dekagon.blogspot.com/2012/01/powershell-script-add-webpart-to-your.html' title='Powershell script add webpart to your Sharepoint 2010 sites in your site collection'/><author><name>Daniel Junede</name><uri>http://www.blogger.com/profile/14502559942710555861</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>