Showing posts with label Powershell Script. Show all posts
Showing posts with label Powershell Script. Show all posts

Thursday, March 17, 2016

Import subsite and Site Collection in SharePoint power shell script

Import the subsite

STSADM:

stsadm -o import -url "http://sharepointsite/sites/order/" -filename D:\backup.cmp -includeusersecurity -versions 4

Powershell:

Add-pssnapin microsoft.sharepoint.powershell

Export-SPWeb -identity "http://sharepointsite/sites/order/"  -path D:\backup.cmp -includeusersecurity  -force

Export the Subsite moved to site Collection Using PowerShell

Export the subsite


STSADM:

stsadm -o export -url "http://sharepointsite/sites/order/" -filename D:\backup.cmp -includeusersecurity -versions 4


Powershell:


Add-pssnapin microsoft.sharepoint.powershell

Import-SPWeb -identity "http://sharepointsite/sites/order/"  -path D:\backup.cmp -includeusersecurity  -force

Tuesday, March 15, 2016

How to get all default values for a document library

$FieldName = $list.Fields["NH Department"]
Write-Output $("NH Department - Default Value " + $FieldName.DefaultValue)

Monday, March 7, 2016

How to get specific sub sites Using Get-SPWeb object

$WepApp = "http://peakfinderspowe/"
$site = Get-SPSite $WepApp
$array = @("Title of the First Site", "Title of the Second Site")
$filteredWebs = $site | Get-SPWeb | ? {$array -contains $_.Title}

How to know List installed products & components using powershell

SharePoint products using PowerShell,



$listApps=Get-WmiObject -Class Win32_Product | Where {$_.IdentifyingNumber -like “*90150000-*”}
$listApps | Sort -Property Name | ft -Autosize

Central Admin. Simply navigate to your SharePoint Central Administration site and on the main page under Upgrade and Migration, click on "Check product and patch installation status