European Sharepoint 2013 Hosting Blog
Articles about European Sharepoint Hosting Service
Articles about European Sharepoint Hosting Service
Aug 9th
In this tutorial, i will show you how to change SharePoint Site Title Using JavaScript Code. Edit SharePoint Page and insert the script editor:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
<script language="javascript" type="text/javascript"> //Ensure the Client Object Model is ready before you use it ExecuteOrDelayUntilScriptLoaded(GetTitle, "sp.js"); function btnUpdate_onclick() { //Update the site's Title property site.set_title(document.getElementById("txtbutton").value); // site.update(); site.update(); // addd the site to Query queue context.load(site); //Run the Query on the server context.executeQueryAsync(onTitleUpdate, onQueryFailed); } function onTitleUpdate() { alert('Title has been updated'); //Refresh the page SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK); } var site; var context; function GetTitle() { //Get the current client context context = SP.ClientContext.get_current(); //Add the site to query queue site = context.get_web(); context.load(site); //Run the query on the server context.executeQueryAsync(onQuerySucceeded, onQueryFailed); } function onQueryFailed(sender, args) { alert('Request failed' + args.get_message() + '\n' + ar.get_stackTrace()); } function onQuerySucceeded(sender, args) { document.getElementById("txtbutton").value = site.get_title(); } // ]]> </script> <p> <input id="txtbutton" type="text" /> </p> <p> <input id="Button1" type="button" value="button" onclick="return btnUpdate_onclick()" /> </p> |
I hope, it works for you!
HostForLIFE.eu’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation 2013 is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint 2013 Foundation, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/mo, allowing you to take advantage of the robust feature set for a small business price. HostForLIFE.eu offers a variety of hosted SharePoint Foundation 2013 plans as well as dedicated SharePoint 2013 Foundation options.
Aug 2nd
In this tutorial, i will tell you about how to Enable Rating or Likes Settings in SharePoint 2013. It was a tough time to find the PowerShell or a C# API to enable or disable Rating/Likes Settings in SharePoint 2013. I found a helpful post from Nanddeep for c# equivalent. I have converted it in PowerShell, hope this will help some of SharePoint developers and admins.
Add-PSSnapin “Microsoft.SharePoint.PowerShell” -ErrorAction SilentlyContinue.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
$web=Get-SPWeb "http://abc.com/test"; $list=$web.Lists["Pages"]; if($list -ne $null) { Write-Host $list.Title "not null"; $assembly=[System.Reflection.Assembly]::Load("Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") $reputationHelper =$assembly.GetType("Microsoft.SharePoint.Portal.ReputationHelper"); $bindings = @("EnableReputation", "NonPublic", "Static"); [System.Reflection.BindingFlags]$flags = [System.Reflection.BindingFlags]::Static -bor [System.Reflection.BindingFlags]::NonPublic; $methodInfo = $reputationHelper.GetMethod("EnableReputation", $flags); #For enabling Ratings $values = @($list, "Ratings", $false); #OR for enabling Likes #$values = @($list, "Likes", $false); $methodInfo.Invoke($null, @($values)); #For disable Rating or Likes <#$methodInfo = $reputationHelper.GetMethod("DisableReputation", $flags); $disableValues = @($list); $methodInfo.Invoke($null, @($disableValues));#> } |
HostForLIFE.eu’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation 2013 is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint 2013 Foundation, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/mo, allowing you to take advantage of the robust feature set for a small business price. HostForLIFE.eu offers a variety of hosted SharePoint Foundation 2013 plans as well as dedicated SharePoint 2013 Foundation options.
Jul 26th
Today, we will show you how to remove all items of the list using Client Object Model with PowerShell script for Office 365 sites. When you have more items to delete, we can go for batch delete. I would like to highlight programmatically when we delete list items, those are not moved to the Recycle Bin for the site.
First, Please find the below code. Hope this will help.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
cls Add-Type-Path"E:\PSDLL\Microsoft.SharePoint.Client.dll" Add-Type-Path"E:\PSDLL\Microsoft.SharePoint.Client.Runtime.dll" $0=$MyInvocation.MyCommand.Definition $dp0=[System.IO.Path]::GetDirectoryName($0) $url="https://test.sharepoint.com/sites/test/" $username="abc@microsofttest.com" $password="*****" $securePassword=ConvertTo-SecureString$password-AsPlainText-Force #connect/authenticate to sharepoint online and get ClientContext object... $clientContext=New-ObjectMicrosoft.SharePoint.Client.ClientContext($url) $credentials=New-ObjectMicrosoft.SharePoint.Client.SharePointOnlineCredentials($username,$securePassword) $clientContext.Credentials=$credentials if(!$clientContext.ServerObjectIsNull.Value) { $web=$clientContext.Site.RootWeb $clientContext.Load($web) $clientContext.ExecuteQuery() $list=$clientContext.Web.Lists.GetByTitle('TestList') $clientContext.Load($list) $clientContext.ExecuteQuery() $query=New-ObjectMicrosoft.SharePoint.Client.CamlQuery $query.ViewXml="<View><RowLimit>1000</RowLimit></View>" $items=$list.GetItems($query) $clientContext.Load($items) $clientContext.ExecuteQuery() if ($items.Count-gt0) { for ($i=$items.Count-1; $i-ge0; $i--) { $items[$i].DeleteObject() } $clientContext.ExecuteQuery() } } |
HostForLIFE.eu’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation 2013 is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint 2013 Foundation, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/mo, allowing you to take advantage of the robust feature set for a small business price. HostForLIFE.eu offers a variety of hosted SharePoint Foundation 2013 plans as well as dedicated SharePoint 2013 Foundation options.
Jul 13th
In this post, I will tell you about Get SharePoint Local Server Admins. Two sets of users are allowed to perform administrative functions for Microsoft : members of the administrators group for the local server computer and members of the SharePoint administration group. The SharePoint administration group is a Microsoft Windows domain group that is registered with . Members of this domain group can perform Central Administration tasks without having to be given administrator rights to the local server computer. And here is the script to list out the SharePoint local server administrators.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Microsoft.SharePoint.Powershell } $scriptBase = split-path $SCRIPT:MyInvocation.MyCommand.Path -parent Set-Location $scriptBase $global:timerServiceName = "SharePoint 2010 Timer" $global:timerServiceInstanceName = "Microsoft SharePoint Foundation Timer" # Get the local farm instance [Microsoft.SharePoint.Administration.SPFarm]$farm = [Microsoft.SharePoint.Administration.SPFarm]::get_Local() Function GetServerAdministrators([Microsoft.SharePoint.Administration.SPFarm]$farm) { write-host "" write-host "Preparing to collect SP server administrator details" -fore magenta $output = $scriptbase + "\" + "ServerAdminDetails.csv" "ServerName" + "," + "AdminMember" | Out-File -Encoding Default -FilePath $Output; foreach($server in $farm.Servers) { foreach($instance in $server.ServiceInstances) { if($instance.TypeName -eq $timerServiceInstanceName) { [string]$serverName = $server.Name write-host "Collecting administrator details for the server " $servername -fore yellow $admins = invoke-command {net localgroup administrators | where {$_ -AND $_ -notmatch "command completed successfully"} | select -skip 4} -computer $serverName foreach($admin in $admins) { write-host $admin " is member of administrator group in server " $serverName -fore cyan $serverName + "," + $admin | Out-File -Encoding Default -Append -FilePath $Output; } write-host "Administrator details for the server " $serverName " has been collected" -fore green } } } Write-host "Administrator details collected for all the SP servers in the farm" -fore green } GetServerAdministrators |
HostForLIFE.eu’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/month, allowing you to take advantage of the robust feature set for a small business price. HostForLIFE.eu offers a variety of hosted SharePoint plans as well as dedicated SharePoint options
Jun 28th
In this article, I will show you how to Publish All Page Properties from a Site with PowerShell in SharePoint 2013. This following code snippet for PowerShell to get all publishing page properties from a site.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
if ($ver.Version.Major - gt 1) { $Host.Runspace.ThreadOptions = "ReuseThread" } Add - PsSnapin Microsoft.SharePoint.PowerShell - ErrorAction SilentlyContinue Set - location $home $str = "http://localhost" function ProcessSubWebs($str) { $currentWeb = Get - SPWeb $str if ([Microsoft.SharePoint.Publishing.PublishingWeb]::IsPublishingWeb($currentWeb)) { $publishingWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($currentWeb) $publishingPages = $publishingWeb.GetPublishingPages() foreach($publishingPage in $publishingPages) { if ($publishingPage.ListItem['Title'] - ne $null) { select Uri, Title, @ { Name = ’PageLayout’; Expression = { $_.Layout.ServerRelativeUrl } } $publishingPage | select Uri, Title, @ { Name = ’PageLayout’; Expression = { $_.Layout.ServerRelativeUrl } } $SPvaluesforOutput = $publishingPage | Select Uri, Title, Name $SPvaluesforOutput | Out - File c: \123. csv - append $publishingPage | Out - File c: \test.csv - append } } foreach($sub in $currentWeb.Webs) { if ($sub.Webs.Count - gt 0) { ProcessSubWebs($sub.Url) } } Write - Host - ForegroundColor red "FINISHED" } else { Write - Host - Foregroundcolor Red "$str not a publishing site" } } ProcessSubWebs($str) |
HostForLIFE.eu’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/month, allowing you to take advantage of the robust feature set for a small business price. HostForLIFE.eu offers a variety of hosted SharePoint plans as well as dedicated SharePoint options
Jun 22nd
In this post, I will tell you about The Service is Unavailable in SharePoint: HTTP Error 503. I have changed the server administrator password and then restarted my machine. None of the site is working properly. getting the below exception once I try to connect all of my SharePoint sites. Here Administrator account is same as application pool account.
The application pool account password change functionality will work till unless if we do “IISReset” or restart the server.“IISReset” or restart the server.
Service Unavailable: HTTP Error 503. The service is unavailable in SharePoint
So, I visited “Inetmgr” and checked the application pools of all the sites. All the services were stopped. I restarted all the application pools and check out to connect all of my SharePoint sites however obtaining same “Service unavailable “exception once more.
Finally I googled it to get the cause of the exception. I found one good article about it.
Reason: Service Unavailable: protocol Error 503. The service is out of stock error unremarkably happens whenever the word for application pool identity account is modified or application pools area unit in stopped state. This error might seem quickly after you deploy solutions. In my case, i spotted that word got modified for the Identity account.
Note: So, guys please remember of it before changing the “Application pool’ account password.
HostForLIFE.eu’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/month, allowing you to take advantage of the robust feature set for a small business price. HostForLIFE.eu offers a variety of hosted SharePoint plans as well as dedicated SharePoint options