<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SharePoint, in all its flavors</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/constantinaparaschivei/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/constantinaparaschivei/feed.xml</link>
    <description>SharePoint, in all its flavors</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:30:07 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Correctly disposing SPSite and SPWeb in the context of SharePoint 2007, 2010, 2013 and 2016</title>
      <link>https://docs.microsoft.com/archive/blogs/constantinaparaschivei/correctly-disposing-spsite-and-spweb-in-the-context-of-sharepoint-2007-2010-2013-and-2016</link>
      <pubDate>Thu, 19 Jul 2018 10:20:42 GMT</pubDate>
      <dc:creator><![CDATA[Constantin Aparaschivei]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/constantinaparaschivei/?p=105</guid>
      <description><![CDATA[Check these two links, they contain very relevant info:...]]></description>
      <content:encoded><![CDATA[Check these two links, they contain very relevant info: <br />
<a href="https://blogs.technet.microsoft.com/stefan_gossner/2008/12/05/disposing-spweb-and-spsite-objects/">https://blogs.technet.microsoft.com/stefan_gossner/2008/12/05/disposing-spweb-and-spsite-objects/</a>
<a href="https://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/">https://solutionizing.net/2008/12/06/the-new-definitive-spsitespweb-disposal-article/</a>

]]></content:encoded>
    </item>
    <item>
      <title>Add SharePoint remote event receivers using PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/constantinaparaschivei/add-sharepoint-remote-event-receivers-using-powershell</link>
      <pubDate>Wed, 06 Jun 2018 09:48:58 GMT</pubDate>
      <dc:creator><![CDATA[Constantin Aparaschivei]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/constantinaparaschivei/?p=95</guid>
      <description><![CDATA[You can use the following PowerShell script to add a remote event receiver in SharePoint...]]></description>
      <content:encoded><![CDATA[You can use the following PowerShell script to add a remote event receiver in SharePoint 2013/2016:

&nbsp;

Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"

Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"


#Site &amp; context

$siteUrl = "<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Frestricted.basf.net%2Fprofile%2FZRV-2016%2F&amp;data=02%7C01%7CConstantin.Aparaschivei%40microsoft.com%7C1034aeb5a3184c6a857e08d5ca1fbec5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636637160062597045&amp;sdata=SNdNQcy3GhxTPsjbxPYORxHTFQI5%2FsKCQPJVGLdjm1M%3D&amp;reserved=0">https://siteurl/</a>"

$listTitle = "listTitle"

&nbsp;

$clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)

$clientContext.Credentials = New-Object System.Net.NetworkCredential("domain\user", "pass")

&nbsp;


function addListItemRemoteEventReceiver([Microsoft.SharePoint.Client.ClientContext]$context, [string]$listTitle,

[Microsoft.SharePoint.Client.EventReceiverType]$eventType, [Microsoft.SharePoint.Client.EventReceiverSynchronization]$synchronization,

[string]$receiverName, [string]$receiverUrl, [string]$receiverAssemblyName, [string]$receiverClassName)

{

$list = $context.Web.Lists.GetByTitle($listTitle);

$context.Load($list)

$eventReceivers = $list.EventReceivers

$context.Load($eventReceivers)

$context.ExecuteQuery()

&nbsp;

$newRER = New-Object Microsoft.SharePoint.Client.EventReceiverDefinitionCreationInformation

$newRER.EventType = $eventType

$newRER.ReceiverName = $receiverName

$newRER.ReceiverClass = $receiverClassName

$newRER.ReceiverAssembly = $receiverAssemblyName

$newRER.ReceiverUrl = $receiverUrl

$newRER.Synchronization = $synchronization

$newRER.SequenceNumber = 100

&nbsp;

try

{

$list.EventReceivers.Add($newRER)

$list.Update()

$context.ExecuteQuery()

Write-Host "Receiver added successfully"

}

catch

{

Write-Error "Failed to add receiver - error:  $_"

}

}


&nbsp;

# define ER attributes

$receiverName = "OnDocumentAdding"

$receiverClassName = ""

$receiverEventType = [Microsoft.SharePoint.Client.EventReceiverType]::ItemAdding

$receiverSynchronization = [Microsoft.SharePoint.Client.EventReceiverSynchronization]::Synchronous

$receiverUrl = "<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fprofile.restricted-providerhosted.apps-basf.net%2FServices%2FDocumentEventReceiver.svc&amp;data=02%7C01%7CConstantin.Aparaschivei%40microsoft.com%7C1034aeb5a3184c6a857e08d5ca1fbec5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636637160062597045&amp;sdata=t8gEOrI2t06tJxWU355Fr9NA3PtIy8gnbDlYT8CUIAE%3D&amp;reserved=0">https://rer-url/Services/DocumentEventReceiver.svc</a>"

$receiverAssemblyName = ""

&nbsp;

# now call function..

addListItemRemoteEventReceiver $clientContext $listTitle $receiverEventType $receiverSynchronization $receiverName $receiverUrl $receiverAssemblyName $receiverClassName]]></content:encoded>
    </item>
    <item>
      <title>Remove Read-Only lock from SharePoint 2013/2016 site collection</title>
      <link>https://docs.microsoft.com/archive/blogs/constantinaparaschivei/remove-read-only-lock-from-sharepoint-20132016-site-collection</link>
      <pubDate>Thu, 19 Apr 2018 14:31:56 GMT</pubDate>
      <dc:creator><![CDATA[Constantin Aparaschivei]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/constantinaparaschivei/?p=55</guid>
      <description><![CDATA[Set/Remove Read-Only lock from SharePoint 2013/2016 site collection using...]]></description>
      <content:encoded><![CDATA[Set/Remove Read-Only lock from SharePoint 2013/2016 site collection using PowerShell:

&nbsp;

<em>$siteUrl = "https://mysiteurl"</em>

<em>#mark site as not locked</em>

<em>$s = get-spsite $siteUrl</em>

<em>$s.WriteLocked = $false</em>

<em>set-spsite $siteUrl -LockState Unlock</em>
<em> $s.Archived = $false</em>

&nbsp;

<em>#mark site as read-only</em>
<em> set-spsite $siteUrl -LockState ReadOnly</em>]]></content:encoded>
    </item>
    <item>
      <title>AccessKey too long, cannot be more than one character - SharePoint 2013 with March 2018 update</title>
      <link>https://docs.microsoft.com/archive/blogs/constantinaparaschivei/accesskey-too-long-cannot-be-more-than-one-character-sharepoint-2013-with-march-2018-update</link>
      <pubDate>Thu, 12 Apr 2018 15:10:31 GMT</pubDate>
      <dc:creator><![CDATA[Constantin Aparaschivei]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/constantinaparaschivei/?p=45</guid>
      <description><![CDATA[After installing March 2018 update for SharePoint 2013 you may get this error when trying to...]]></description>
      <content:encoded><![CDATA[After installing March 2018 update for SharePoint 2013 you may get this error when trying to configure sync in User Profile Service Application:

&nbsp;

Application error when access /_layouts/15/ProfileSynchronizationServiceProvisionPage.aspx, <span>Error=AccessKey too long, cannot be more than one character</span>. Parameter name: value at System.Web.UI.WebControls.WebControl.set_AccessKey(String value) at Microsoft.SharePoint.Portal.WebControls.InputFormButtonAtBottom.set_AccessKeyLocId(LocStringId value) at ASP._layouts_15_profilesynchronizationserviceprovisionpage_aspx.__BuildControl__control11() at ASP._layouts_15_profilesynchronizationserviceprovisionpage_aspx.__BuildControlProfileSyncProvisionSettingsForm() at ASP._layouts_15_profilesynchronizationserviceprovisionpage_aspx.__BuildControl__control4(Control __ctrl) at System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) at ASP._admin_admin_master.__BuildControlDeltaPlaceHolderMain() at ASP._admin_admin_master.__BuildControl__control27() at ASP._admin_admin_master.__BuildControlSPHtmlTag() at ASP._admin_admin_master.__BuildControlTree(_admin_admin_master __ctrl) at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) at System.Web.UI.Page.ApplyMasterPage() at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

&nbsp;

Solution: clear ASP.net temporary files, then perform IISRESET.]]></content:encoded>
    </item>
    <item>
      <title>SharePoint - create MMS column from PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/constantinaparaschivei/sharepoint-create-mms-column-from-powershell</link>
      <pubDate>Thu, 05 Apr 2018 13:43:11 GMT</pubDate>
      <dc:creator><![CDATA[Constantin Aparaschivei]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/constantinaparaschivei/?p=35</guid>
      <description><![CDATA[Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction...]]></description>
      <content:encoded><![CDATA[<div class="line number1 index0 alt2">

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Variables
$WebURL="https://site1.sp.com/"
$ListName="DL"
$FieldName="TempMMSField"

#taxonomy related variables
$termStoreName = "Managed Metadata Service"
$termStoreGroup = "Global Terms"
$termSetName = "Topic"

#Get the web and List
$Web = Get-SPWeb $WebURL
$List = $Web.Lists[$ListName]

#Check if the column with same name exists in the list
if(!($List.Fields.ContainsField($FieldName)))
{
#Get the Termset from Term store
$TaxonomySession = Get-SPTaxonomySession -Site $web.Site
$TermStore = $TaxonomySession.TermStores[$termStoreName]
$TermGroup = $TermStore.Groups[$termStoreGroup]
$TermSet = $TermGroup.TermSets[$termSetName]

#Form the Taxonomy Field
$TaxonomyField = $List.Fields.CreateNewField("TaxonomyFieldType", $TermSet.Name)
$TaxonomyField.SspId = $TermSet.TermStore.Id
$TaxonomyField.TermSetId = $TermSet.Id

#Add the field to List
$List.Fields.Add($TaxonomyField)
$List.Update()

Write-host "Managed Metadata column Added successfully!"
}
else
{
Write-host "Managed Metadata column with the specific name already exists!" -f RED
}

&nbsp;

</div>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint - add all wsps from a folder</title>
      <link>https://docs.microsoft.com/archive/blogs/constantinaparaschivei/hello-world</link>
      <pubDate>Sat, 10 Mar 2018 07:11:17 GMT</pubDate>
      <dc:creator><![CDATA[Constantin Aparaschivei]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/constantinaparaschivei/?p=1</guid>
      <description><![CDATA[foreach ($item in (Get-Childitem -path c:\temp\wsp)) { 
    $location = "c:\temp\wsp\" +...]]></description>
      <content:encoded><![CDATA[foreach ($item in (Get-Childitem -path c:\temp\wsp)) { 
    $location = "c:\temp\wsp\" + $item.Name
    add-spsolution -literalpath $location
}]]></content:encoded>
    </item>
  </channel>
</rss>