How to deploy WSP Globally in SharePoint Using PowerShell

 How to deploy WSP Globally in SharePoint Using PowerShell
In this article we will know how to deploy WSP Globally in SharePoint Environment.
First place the WSP in a particular location in our example we placed WSP in C drive.
Open Management Shell and run the script one by one.

Add Solution Package to the Server

Add-SPSolution  C:\DotNetSharePoint.WSP

Deploying WSP Globally

Install-SPSolution  DotNetSharePoint.WSP  -GACDeployment

Uninstall the WSP from the Server

Uninstall-SPSolution –identity DotNetSharePoint.WSP

Remove the WSP from the Server

Remove-SPSolution –identity DotNetSharePoint.WSP


How to update existing WSP in sharepoint Farm using PowerShell

How to update existing WSP in sharepoint Farm using PowerShell
In this article we all learn about updating the new WSP with out retracting the existing WSP.

Using Power Shell we are  updating the new WSP with new custom changes in our  SharePoint Farm.

Take the backup of existing WSP,it may useful in future.
here we can able to find the article How to download WSP file Central Admin

Syntax:

Update-SPSolution –Identity yourwspname.wsp –LiteralPath "WSP Path" –GacDeployment

Example:

Update-SPSolution –Identity DotNetSharePoint.wsp –LiteralPath "C:\DotNetSharePoint.wsp" –GacDeployment



Enabling or Disabling the Claims Based Authencation using PowerShell

Web application is already provisioned with classic,there is no GUI option to change the classic mode to claims but using power shell we can do it.

In Central Admin->Application Management->Manage Web application

Select the particular web application in top ribbon click on the Authentication Providers,there we can see the membership provider name Claims or Classic.

     

Now i am changing the classic to claims using the below power shell

$claims = Get-SPWebApplication "http://DotNetSharePoint:23456/"
$claims.UseClaimsAuthentication = 1;
$claims.Update()

Again i am changing the claims to classic using the below power shell

                               
$claims = Get-SPWebApplication "http://DotNetSharePoint:23456/"
$claims.UseClaimsAuthentication = 0;
$claims.Update()

Finally go verify it once for conformation.

How to create webapplication in sharepoint using powershell

How to create webapplication in sharepoint using powershell
Using Power Shell we can create the web application easily.
Open the SharePoint Management Shell and run this command

$siteName = "DotnetSharePointSite"

$port = 23456

$url = "http://dotnetsharepoint"

$appPoolName = "DotnetSharePoint- 23456"

$managedAccount = "dotnetsharepoint\lakshmi"

$dbServer = "dotnetsharepoint"

$dbName = "DotNetSharePoint"



New-SPWebApplication -Name $siteName -Port $port  -URL $url -ApplicationPool 

$appPoolName -ApplicationPoolAccount (Get-SPManagedAccount "$managedAccount") 

-DatabaseName $dbName -DatabaseServer $dbServer 

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

Add SharePoint Calendar ListView in Page programmatically

Add SharePoint Calendar ListView in Page programmatically
 In my previous article i explain about  how to add  SharePoint list view in page
Add SharePoint ListView in Page
Add SharePoint ListView in Page

   We are going to add default calendar view in ASPX page.  I tried to use html normal view, but it's not showing calendar. after googling i found the solution. For calendar we have to change the Type and add Scope, RecurrenceRowset.

In Elements we have to add default calendar view , add the following code in Elements.

  <File Path="Module1\Calendar.aspx" Url="Calendar.aspx" Type="GhostableInLibrary">
      <View List="Lists/Calendar" BaseViewID="2"  WebPartZoneID="WPListcalendarView" WebPartOrder="1"  DefaultView="TRUE" DisplayName="Calendar" Name="Calendar" Type="CALENDAR" Scope="Recursive" RecurrenceRowset="TRUE">
      </View>
   </File>

ASPX page have to call the calendar webpart, add the following code in ASPX page.

<asp:Content ID="Content" ContentPlaceHolderID="PlaceHolderMain" runat="server">
 <WebPartPages:WebPartZone ID="WPZMOC" runat="server">
                <ZoneTemplate></ZoneTemplate>
            </WebPartPages:WebPartZone>
</asp:Content>

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

How to create managed path in SharePoint using PowerShell

How to create managed path in SharePoint using PowerShell
Using Power Shell we can create it easily
Open the SharePoint2013 Management Shell
Use the below commands to create and remove the managed path for Explicit and Wild

Creating the Managed Path Explicit
New-SPManagedPath -RelativeURL "my" -WebApplication "http://SharePoint:1234/" – Explicit


Creating the Managed Path Wild
New-SPManagedPath "personal" -WebApplication http://SharePoint:1234/

Remove Managed

Remove-SPManagedPath -Identity " personal "  -WebApplication "http://SharePoint2013:1234/" -confirm:$false 

If we want to get the all managed paths for that particular web application

Get-SPManagedPath  -WebApplication http://SharePoint2013:1234/

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

SharePoint people picker display as read only

SharePoint people picker display as read only
  
 We have to make people picker readonly by Programmatically

       <SharePoint:PeopleEditor
                AllowEmpty="false"
                ID="ppk"
                runat="server"
                SelectionSet="User"
                class="peopleedit" MultiSelect="false"   />


     We can easily enable people picker using "Id"

 Example:   ppk.Enabled = false;


If we have to hide only show button and allow typein here is the 
Example:    ppk.ShowButtons = false;    
                 ppk.AllowTypeIn = false;


SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

Copy Files between SharePoint Document Libraries Using Power Shell

Copy Files between SharePoint Document Libraries Using Power Shell
      I am having a Site Collection, in that am having two document library’s, once library having files i want to copy the same files to move the another library.
Using the below power shell I implemented this.

Add-PsSnapin Microsoft.SharePoint.PowerShell
#Refereing the SiteCollection URL
$web = "http://dotnetsharepoint:1234/sites/sharepoint/"
#Refereing the Source DocumentLibray Having Files
$sourLibrary = (Get-SPWeb $web).Folders["SourceLibraryName"]
#Refereing the Destination of DocumentLibray to place Files
$destLibrary = (Get-SPWeb $web).Folders["DestinationLibraryName"]

$destFiles = $destLibrary.Files
foreach ($file in $sourLibrary.Files)
{
    $currentFile = $file.OpenBinary()
    $destURL = $destFiles.Folder.Url + "/" + $file.Name
    $destFiles.Add($destURL, $currentFile, $true)




There was a problem retrieving data for this field. Updating values in the field is disabled temporarily.You can still update values in other fields

"There was a problem retrieving data for this field. Updating values in the field is disabled temporarily.You can still update values in other fields"

I am getting this Issue while editing the Profile in “My Site”
                  
Fields are related to Managed Meta Data Service Application, it required the Managed Meta Data Service Application to be started (or) The Managed Meta Data Service Connection is missing from the associated Proxy Group.

1) Make sure that Managed Meta data web service is started in Application management ->Service Application ->Manage Services on Server

                      

2) Make sure that Service Applications “Managed Meta data service” created and started in
 Application management ->Service Application ->Manage Service Application

                        
3) Make Sure that Managed Meta Data” Service Connection” is associated Proxy Group or not.
In my Case it is not associated.
Application management->Manage Web Applications->Select the Particular web application you are using for my site->Click on the “Service Connection” in the top ribbon.
Make it associated as shown



 Now reload the Page it will work fine.


SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

The default term store for this site cannot be identified

I am having a  SharePoint Site

For a document library i am creating a meta data column,I selected the customize your term set at that time i am getting this error


                             

Solution:
 Navigate to ->Central Administration ->Application Management->Manage Service Applications

Select Managed Metadata Service Connection and click properties in the ribbon interface


Select "This service application is the default storage location for column specfix term sets" option in the
Managed metadata Service Connection page.


Click ok.

Now we can able to Create local term sets which are site collection specific.

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM