Pages

Showing posts with label Sharepoint Admin. Show all posts
Showing posts with label Sharepoint Admin. Show all posts

Tuesday, June 13, 2017

Using PowerShell to Get SharePoint Content database size

To get the all CONTENT_DB  size in SHAREPOINT server(MB), Using below commands power shell commands.


Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name, @{Label ="Size in MB"; Expression = {$_.disksizerequired/1024/1024}} >c:\Content_DBsize.txt

The above code will export to C drive and you can change drive for your requirement.

Monday, May 8, 2017

Inherit Subsite Master Page from Parent Master Page in Sharepoint Foundation 2013

Do you want to change the master page setting for just one site, then use the script below:

$web = Get-SPWeb siteurl
$web.MasterUrl = "masterpagerelativeurl"
$web.Update()
$web.Dispose()

The script would be as follows:

$web = Get-SPWeb http://portal/sites/collaboration
$web.MasterUrl = "/sites/collaboration/_catalogs/masterpage/customSeatle.master"
$web.Update()
$web.Dispose()

Refreshing the root site in the browser will show the new master page design, but all sub-sites will still show the old master page design – this is because they are each using a master page stored on their respective site. To change the master page setting for all sites in a site collection, use the following script:

$site = Get-SPSite http://portal/sites/collaboration
$site | Get-SPWeb -limit all | ForEach-Object { $_.MasterUrl = "/sites/collaboration/_catalogs/masterpage/customSeatle.master";$_.Update() }
$site.Dispose()

Note that this will only change existing sites and will not set a custom master page for any new sites created. To update new sites, you will need to either run the script every time a new site is created, or use an alternative approach such as a feature receiver/stapler or Web provisioning event receiver to automatically set the new master page on site creation.

Do you want to revert all team sites in the site collection back to using their own default master page again, then use the following script:

$site = Get-SPSite http://portal/sites/collaboration
$site | Get-SPWeb -limit all | ForEach-Object { $_.MasterUrl = $_.ServerRelativeUrl + "/_catalogs/masterpage/v4.master";$_.Update() }
$site.Dispose()

Tuesday, February 14, 2017

Add Active Directory Module for Windows Powershell

Add Active Directory Module for Windows Powershell

Open Server Manager and Add role for Windows Powershell








Thursday, July 9, 2015

LDAP/AD Claims Provider For SharePoint 2013


I just configured  LDAPCP with ADFS. But I am not able to access the different domain users (abcd users) with sp site.

My configuration is:

I have Wxyz Ad Domain with Wxyz sharepoint 2013 server and have abcd domain and abcd adfs server.

Already configured ADFS server and deployed LDAPCP WSP(codeplaex) solution successfully,added LDAP connection in security on SP central Admin.

The people picker is retreiving abcd user name john and added in the sp site.

Issues occured:

when I am trying to access the Sharepoint site with abcd domain user's(john) on the AD FS server. It is showing in the below error

Error displaying:

Sharepoint Site Error:


Sorry, this site hasn't been shared with you.

Event viewer Error:

A Certificate validation operation took 15019.4231 milliseconds and has executed the execution time threshold.
If this continues to occur, it may represent a configuration issue.



Solutions:


Identifier Claim should be email address in the powershell script and set claim mapping should be Samsaccountname  = emailaddress on the AD FS server

Add ABCD user login id in the sharepoint sites and try to access the sp pages from AD FS Servers using cliam based authentication.

Finally we logged in successfully for ABCD users on the Sharepoint Sites.


Thursday, April 16, 2015

How to search SharePoint users in the User Information List


To find the User Information List in the sharepoint, You need to enter the below URL

http://SPSiteName/_Catalogs/users/simple.aspx

Then you can search either User ID or Email or FirstName or Last Name

Saturday, December 20, 2014

stsadm commands for sharepoint

echo off
set SPAdminTool=%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
set TargetUrl=http://starwood/
C:\Program Files\CommonProgramFiles\Microsoft Shared\web server extensions\12\BIN\stsadm.exe


Remove solution
stsadm.exe -o deactivatefeature -name fnb.timerjob -url http://starwood/ -force
stsadm.exe -o uninstallfeature -name fnb.timerjob -force

stsadm.exe -o retractsolution -name fnb.timerjob.wsp -immediate -allcontenturls
stsadm.exe -o execadmsvcjobs
stsadm.exe -o deletesolution -name fnb.timerjob.wsp
stsadm.exe -o retractsolution -name fnb.timerjob.wsp -immediate -allcontenturls

Add Solution

stsadm.exe -o addsolution -filename fnb.timerjob.wsp
stsadm.exe -o deploysolution -name fnb.timerjob.wsp -immediate -allcontenturls -allowgacdeployment
stsadm.exe -o deploysolution -name fnb.timerjob.wsp -immediate -allowgacdeployment
stsadm.exe -o execadmsvcjobs
stsadm.exe -o installfeature -name fnb.timerjob -force
stsadm.exe -o activatefeature -name solutionManager -url http://starwood/ -force

Tuesday, November 18, 2014

Create first sharepoint 2013 App,Develop and Deploy on the sharepoint server



Add DNS Server via server Role

 


Get IP Address
 








Add New Domain for App like karthiapp.com




Add wildcards





Add Host entry on the drive\etc\host







GO to central Admin and configure App URL





Login as spsfarm not as System Admin account and Open Visual studio shift + Right Click with different user (login as spsfarm) on the visual studio solution file


If deployment is restricted for administrator privileges then Login with windows as spsfarm than you can deployed


Once deployed you can see the app in the SharePoint sites




If you click on the app that content won’t display and it is asking three times for credentials


Disable Loop Back Check



In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa, create a DWORD for DisableLoopbackCheck and enter a value of “1” (hexadecimal).


Note: I Just created DisableLoopBackCheck ,it was throw error, so this case sensitive


Follow the below steps






Reset the IIS


Then finally it will show your apps