COMMAND
|
DESCRIPTION
|
Install-SPService
|
Installs the services in the farm. It runs once per farm.
|
Get-SPServiceInstance
Start-SPServiceInstance
Stop-SPServiceInstance
|
Operations related to managing the services instance for a specific
server or the entire farm.
|
Get-SPServiceApplication
Publish-SPServiceApplication
Remove-SPServiceApplication
Set-SPServiceApplication
Unpublish-SPServiceApplication
|
Operations related to managing service applications deployed to a
farm (such as sharing the specifi ed local service application outside the
farm).
|
Get-SPServiceApplicationProxy
Remove-SPServiceApplicationProxy
Add-SPServiceApplicationProxy
GroupMember
|
Operations related to managing service application proxies.
|
Get-SPServiceApplicationPool
New-SPServiceApplicationPool
Remove-SPServiceApplicationPool
Set-SPServiceApplicationPool
|
Operations related to managing the logical architecture of service
applications.
|
Tuesday, April 16, 2013
Service Application Windows PowerShell Commands
Renaming the SharePoint Admin Content Database to Follow SQL Server Naming Conventions
Solution
The SharePoint Central
Admin database is a configuration database that stores site content and
permissions for the Central Administration web application. DBA’s are very much
concerned with backing up and restoring all of the SharePoint databases. While
the Central Admin Content database is backed up when a SharePoint farm
administrator performs a farm configuration backup, it doesn't get restored
when a farm is restored. It can backup and restore the SharePoint Admin Content
database separately using native SQL Server backup tools. The challenge here is
dealing with a database name that has a GUID value.
Here is an example of the
SharePoint database name.
If you have a corporate
policy to standardize database naming conventions or use custom database
maintenance scripts, it is imperative to rename the SharePoint databases to
eliminate those GUID values, starting with the SharePoint Admin Content. While
most recommendations will tell you to rename your SharePoint databases
accordingly during creation, in most cases, DBAs are not included as part of
the initial planning and deployment process. Thus, end up with SharePoint
databases with such naming conventions. To accomplish this task, DBA’s will be
using Windows PowerShell via the SharePoint 2010 Management Shell console.
Remember to back up the database prior to performing the tasks below.
- On the SharePoint web or application server, click Start,
point to All Programs, and then click Microsoft
SharePoint 2010 Products. In the list of available options, click SharePoint
2010 Management Shell.
- In the SharePoint 2010 Management Shell, type the
following command to create a new content database named SharePoint_AdminContent.
This will replace the existing Central Admin content database that has a
GUID value in its name. In my environment, the web application name for
the SharePoint Central Administration web application is http://sp2010-web1:20376.
The New-SPContentDatabase PowerShell cmdlet is described further in
this tip on Managing SharePoint
Content Databases with PowerShell.
PS C:\> New-SPContentDatabase -Name SharePoint_AdminContent
-WebApplication http://sp2010-web1:20376
- We need to retrieve the Id values
assigned to the SharePoint Admin Content databases. Run the following
command, using the Get-SPWebApplication and the Get-SPContentDatabase PowerShell cmdlets.
PS C:\>
Get-SPWebApplication -Identity http://sp2010-web1:20376 | Get-SPContentDatabase
| Select Id, Name, WebApplication | Format-List
- To move the contents of the SharePoint Admin
Content database from the one with the GUID value to the newly created
one, run the following command, using the Get-SPSite and the Move-SPSite PowerShell cmdlets. Note
that the you should pass the Id property values of the
databases names instead of the Name property for the -ContentDatabase
parameter of the Get-SPSite cmdlet. Type Y to confirm the
prompts.
PS C:\> Get-SPSite
-ContentDatabase 46410944-32c4-4e01-8390-22b693f4fcc2 | Move-SPSite
-DestinationDatabase 86d8e579-fbd8-473e-867d-58b974ee0267
- Run IISRESET to restart IIS on the web front end
server.
- Verify that the SharePoint Central Administration
web application renders properly without issues. Try navigating thru the
different links to make sure that everything is working fine.
- To completely remove the GUID-valued SharePoint
Admin Content database, run the following command, using theRemove-SPContentDatabase cmdlet. This
will detach the content database from the SharePoint Central
Administration web application and eventually deleting it from the SQL
Server instance. Type Y to confirm the prompts.
PS C:\>
Remove-SPContentDatabase 46410944-32c4-4e01-8390-22b693f4fcc2
- Verify that you no longer have the GUID-valued
GUID-valued SharePoint Admin Content database and that it is now using the
newly created database
PS C:\>
Get-SPWebApplication -Identity http://sp2010-web1:20376 | Get-SPContentDatabase
| Select Id, Name, WebApplication | Format-List
You can
also confirm this by checking the list of databases from within SQL Server
Management Studio.
In this tip, we've renamed
an existing GUID-valued SharePoint content database to remove the GUID value.
In future tips, we will look at performing the same task but with the service
application databases running on your SharePoint 2010 farm.
Thursday, January 3, 2013
Problems Creating List Workflows in SharePoint Designer 2010 for Office 365 Sites
On a SharePoint Online site, when attempting to edit a previously created list workflow using SharePoint Designer 2010, I received the following error in Designer:
(SharePoint Designer cannot display the item…Most likely causes: The file has been deleted from the site. The site is encountering problems.)
I had never encountered this error before, so instead of editing the workflow, I tried to create a new list workflow. After entering the name of the new workflow and clicking OK in the window shown below, the window closes and nothing happens.
I thought maybe it was an issue with Designer itself, so I closed the application and went to clear out all the related cache. I started in the SharePoint Designer folder located in the AppData directory. In the ProxyAssemblyCache folder, I noticed something very interesting – two folders with what looked like different version numbers as their names.
(c:\users\*username*\AppData\Roaming\Microsoft\SharePoint Designer\ProxyAssemblyCache)
The 14.0.0.6120 version corresponds to the April 2012 CU for SharePoint 2010. The 15.0.0.4433 number corresponds to the December 2012 Hotfix for SharePoint 2013! I haven’t opened a SharePoint 2013 site from this computer, so I was perplexed why this version number was being used.
So, I went back into SharePoint Designer to see if I could find more information, and noticed that the SharePoint version was 4, BUT it was 4 (15.0.0.4433)! This is exactly how a site would report itself when it is hosted on a SharePoint 2013 server that is using the 2010 experience.
(SharePoint Designer site properties reporting version 4 (15.0.0.4433) )
So, without notifying anyone, it seems Microsoft has started to rollout SharePoint ‘Wave 15′ (2013) in SharePoint Online, but it is keeping these existing tenants on the 2010 experience. So, there is no way of knowing when you are converted over, unless you start having issues creating or editing list workflows in SharePoint Designer 2010 or you happen to look at your version number.
The "solution" is to install SharePoint Designer 2013 (http://www.microsoft.com/en-us/download/details.aspx?id=35491), remove the ProxyAssemblyCache folders, and clear out any files in the C:\Users\dglenn\AppData\Local\Microsoft\WebsiteCache\ directory.
Ref link: http://knowsharepoint.com/problems-creating-list-workflows-in-sharepoint-designer-2010-for-office-365-sites/
Ref link: http://knowsharepoint.com/problems-creating-list-workflows-in-sharepoint-designer-2010-for-office-365-sites/
Thursday, December 20, 2012
SharePoint 2010 Navigation: Quick launch and Navigation
In this article I will
show the Quick Launch in Team site and the Publishing site .
If you navigate to the
site settings the “Look and Feel” section you will see that there are different
options available between collaboration and publishing sites.
Look and feel options
of a publishing site
Look and feel options
of a collaboration site
In collaboration sites
there is a link named “Quick launch” and on publishing sites there a link named
“Navigation”.
The “Quick launch”
configuration in collaboration sites is straight forward; you can add headings
and links and modify the order.
Now let’s have a look
at the navigation option on publishing sites.
First of all, it looks
totally different but we have a lot more options here. We can inherit
navigation from above and we can configure both the global and the current
navigation.
If you want to open
links in a new window, check the Open link in new window under URL
If the collaboration
site is a sub site of a publishing site it inherits the configuration tool from
above and offers the same tool like the publishing site. If we want to make the
publishing navigation features available in a collaboration site collection, we
have to activate the publishing infrastructure feature on the site collection.
Wednesday, December 19, 2012
Highlight the Search Keyword in SharePoint 2010 results page
Branding the SharePoint Search page or Highlighting the Search Keyword in SharePoint 2010.
To Highlight the Search keyword in search result page in SharePoint 2010 add the css to the master page or in the Content Editor Web Part a.k.a CEWP.
Open the Search Result Page in Edit Mode, Add CEWP to the Search Result Page. In CEWP, Edit HTML source add the css.
<style>
.srch-Title2 A STRONG {
BACKGROUND-COLOR: yellow; color:black;
}
</style>
<style>
.srch-Description2 STRONG {
BACKGROUND-COLOR: yellow; color:black;
}
</style>
After adding the css, save the page.
If you enter any keyword in SharePoint Search it will display the result page as
Happy Coding..!!!
Reference Link: https://www.nothingbutsharepoint.com/sites/eusp/Pages/Brand-SharePoint-Search-Results-What-you-thought-you-were-staying-vanilla.aspx
Monday, November 26, 2012
SPDisplayRelatedInfo in SP 2010 JQuery
<script type="text/javascript">
$(document).ready(function(){
//Gets the values from the Related List
$().SPServices.SPDisplayRelatedInfo({
columnName: "Project",
relatedList: "Projects",
relatedListColumn: "Title",
relatedColumns:["End_x0020_Date","Comments"],
displayFormat: "list",//shows the values in List,
headerCSSClass: "ms-hidden",// this is to hide the list
rowCSSClass:"ms-hidden", // this is to hide the list
completefunc: SetFields
});
});
function SetFields(){
var srcDivId = "SPDisplayRelatedInfo_Project ";
var tds = document.getElementById(srcDivId).getElementsByTagName("td");
if(tds.length>0)
{
var Column1Data1 = tds[0].innerHTML;
var Column1Data2 = tds[1].innerHTML;
$('#ctl00_m_g_8b1ecbc0_8438_4069_92d0_34cc9235ab90_ctl00_ctl05_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_TextField')[0].value = Column1Data1;
$('#ctl00_m_g_8b1ecbc0_8438_4069_92d0_34cc9235ab90_ctl00_ctl05_ctl07_ctl00_ctl00_ctl04_ctl00_ctl00_TextField')[0].value = Column1Data2;
}
var tds = document.getElementById(srcDivId).getElementsByTagName("td");
if(tds.length>0)
{
var Column1Data1 = tds[0].innerHTML;
var Column1Data2 = tds[1].innerHTML;
$('#ctl00_m_g_8b1ecbc0_8438_4069_92d0_34cc9235ab90_ctl00_ctl05_ctl05_ctl00_ctl00_ctl04_ctl00_ctl00_TextField')[0].value = Column1Data1;
$('#ctl00_m_g_8b1ecbc0_8438_4069_92d0_34cc9235ab90_ctl00_ctl05_ctl07_ctl00_ctl00_ctl04_ctl00_ctl00_TextField')[0].value = Column1Data2;
}
}
Populate the fields based on Drop Down selection in NewForm.aspx using JQuery
Before doing that add the JQuery.js and SPServices.js reference in the
Master Page.
Then add the following script in the NewForm.aspx of the List
<script type="text/javascript">
$(document).ready(function(){
$().SPServices.SPDisplayRelatedInfo({
columnName: "Project",
relatedList: "Projects",
relatedListColumn: "Title",
relatedColumns: ["Client_x0020_Description","End_x0020_Date","ProjComments","Resources","Start_x0020_Date","Due_x0020_Date","Title"],
displayFormat: "list",
headerCSSClass: "ms-hidden",
rowCSSClass:"ms-hidden",
completefunc: SetFields
});
});
function SetFields(){
//Get the IDs of the fields to which you want
to set the values
var
txtDescription = document.getElementById('ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_TextField');
var
txtComment =
document.getElementById('ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl12_ctl00_ctl00_ctl04_ctl00_ctl00_TextField');
var
txtAssignedTo= document.getElementById('ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_downlevelTextBox');
var
txtEndDate =
document.getElementById('ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl11_ctl00_ctl00_ctl04_ctl00_ctl00_DateTimeField_DateTimeFieldDate');
var
txtStartDate=document.getElementById('ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl08_ctl00_ctl00_ctl04_ctl00_ctl00_DateTimeField_DateTimeFieldDate');
var
txtDueDate=document.getElementById('ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl09_ctl00_ctl00_ctl04_ctl00_ctl00_DateTimeField_DateTimeFieldDate');
var
txtTitle=document.getElementById('ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField');
$("div#SPDisplayRelatedInfo_Project td").each(function(index){
debugger;
switch(index)
{
case
0:
var
desc = $(this).html();
//This is for the Multiline Rich Textbox in
IE $('#ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_iframe').contents().find('body').text(desc);
//This is for other browsers
txtDescription.value = desc;
break;
case
1:
var
columnDate =$(this).html();
var
endDate =
$.format.date(columnDate , "MM/dd/yyyy");
txtEndDate.value
= endDate
;
break;
case
2:
var
comment =
$(this).html();
$('#ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl12_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_iframe').contents().find('body').text(comment);
txtComment.value = comment;
break;
case
3:
var
resource=
"";
$(this).find('a').each(function(){
resource = $(this).html()+ ";" + resource ;
txtAssignedTo.value = resource;
$('#ctl00_m_g_ff38e82a_f0dd_4c96_bd29_92038b50b4fb_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv').text(resource);
});
break;
case 4:
var
columnDate1 =$(this).html();
var
startdate =
$.format.date(columnDate1, "MM/dd/yyyy");
txtStartDate.value
= startdate;
break;
case 5:
var
columnDate2 =$(this).html();
var
Duedate =
$.format.date(columnDate2 , "MM/dd/yyyy");
txtDueDate.value = Duedate;
break;
case 6:
var titleval= $(this).html();
txtTitle.value=titleval;
break;
}
});
};
</script>
Subscribe to:
Posts (Atom)




















