Tuesday, August 23, 2011

Hide a list in SharePoint 2010

 

You can use Windows PowerShell to hide a list in SharePoint 2010. Simply store an instance of an SPList Object, set the Hidden property to $true and update the SPList object.

PS > $spWeb = Get-SPWeb http://sp01/site

PS > $spList = $spWeb.GetList("http://sp01/site/Lists/MyList")

PS > $spList.Hidden = $true

PS > $spList.Update()

Understand database mirroring requirements for disaster recovery purposes

 

SharePoint 2010 is mirroring aware and utilizes the FailoverPartner keyword in its database connection strings to identify a SQL Server instance that is used for mirroring purposes. Upon learning this, it might be tempting to jump right in and start mirroring SharePoint databases for redundancy. Before doing so, though, you should be aware that the following requirements apply:

  • Less than 1ms latency between principal and mirror SQL Server instances
  • 1GB/s bandwidth or greater between principal and mirror SQL Server instances
  • Principal and mirror instances must be running the same version and edition of SQL Server
  • Mirrored databases must use the Full recovery model
  • High safety with automatic failover (that is, synchronous mirroring with witness server) is recommended

Mirroring is certainly useful, but as the aforementioned list demonstrates: it shouldn’t be implemented without careful planning and infrastructure design.

Find information about your SharePoint databases

 

You can use the Get-SPDatabase cmdlet to display information about the SharePoint databases.

PS > Get-SPDatabase

The example above displays all SharePoint databases. If you want to display a specific Database, use the identity parameter followed by the database ID.

PS > Get-SPDatabase -Identity f9213ca2-3604-42e5-b6cf-92740fbed83a

Directly Sending Files Stored in SharePoint

 

The single best way to share documents with your peers is using the “E-mail a Link” function that is built right in the Ribbon. Occasionally, your recipients do not have access to your SharePoint environment, and you need to resort to the old-fashioned route by emailing these email attachments.
Below is a two-step process that lets you sends documents that are stored in SharePoint directly via Microsoft Outlook.

  1. Navigate to the designated Document Library. Click on Library > Connect to Outlook.
  2. After a series of prompts, the documents will be added to the “SharePoint Lists” in Outlook. You can now preview and forward these documents as attachments without first having to download them.

Add a new service application pool

 

You can use the New-SPServiceApplicationPool cmdlet to create new Web service application pools in IIS.

PS > New-SPServiceApplicationPool -Name “AppPool” `

>> -account (Get-SPManagedAccount domain\account)

Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular

Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...