Sunday, 31 January 2016

OneLiners for PowerShell with SharePoint Online

At last, I got a SharePoint Online setup for free for now.
Then, I downloaded the SharePoint Online Management Shell from https://www.microsoft.com/en-us/download/details.aspx?id=35588 by choosing the 64 bit version. You may check the version of your Windows by Right Clicking the leftmost bottom corner and choosing System ->System Type.
Below is the first command to connect to SharePoint Online:
Connect-SPOService -Url "https://<yourname>-admin.sharepoint.com" -Credential <alias>@<yourname>.onmicrosoft.com
Examples:
Connect-SPOService -Url "https://spthangu-admin.sharepoint.com" -Credential explore@spthangu.onmicrosoft.com

Ensure you Run the Powershell as Administrator(Shift+Right Click->Run ISE as Administrator)
and use the admin url of the SharePoint site and not the SharePoint site.

The above command to connect must be run before you execute any of the below One Liners:
#View SharePoint Online organization properties
Get-SPOTenant
#View App Errors(Get the number after "@" sysmbol of the App from Site Setting->App #Permissions
Get-SPOAppErrors -ProductId 067e1a0e-58d2-4366-b56f-5bf9b563b284
#View App Info
Get-SPOAppInfo -Name "Microsoft.SharePoint"
#Get Deleted Site
Get-SPODeletedSite
#Get External User
Get-SPOExternalUser
#Get Migration Job Status and Progress
Get-SPOMigrationJobProgress
Get-SPOMigrationJobStatus -TargetWebUrl https://spthangu.sharepoint.com
#View all details of a SharePoint site
Get-SPOSite -Identity "https://spthangu.sharepoint.com"|Format-List
#Display the count of sites under a site collection
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").WebsCount
#Get the Title of Site Collection
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").Title
#View the Sharing capability
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").SharingCapability
#View the last content modified date
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").LastContentModifiedDate
#View LocaID or language settings 1033 English
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").LocaleId
#View LockState(UnLock)
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").LockState
#View Site Admninistrator/Owner
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").Owner
#View if PWA is enabled
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").PWAEnabled
#Check Status of Site
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").Status
#View Site Template
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").Template
#View URL of a site
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").Url
#View Resource Quota
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").ResourceQuota
#View Resource Warning Level of a Site[255]
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").ResourceQuotaWarningLevel
#View average Resource Usage of a site
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").ResourceUsageAverage
#View Current Resource Usage of a site
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").ResourceUsageCurrent
#View Sandbox capacity of a site
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").SandboxedCodeActivationCapability
#View Storage Quota of a Site
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").StorageQuota
#View Storage Quota of a Site
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").StorageQuotaType
#View Storage Quota Warning level of a site
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").StorageQuotaWarningLevel
#View Current Storage Usage
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").StorageUsageCurrent

#View count of Webs
(Get-SPOSite -Identity "https://spthangu.sharepoint.com").WebsCount
#View Site Groups
Get-SPOSiteGroup -Site "https://spthangu.sharepoint.com"
#View only NAmes
Get-SPOSiteGroup -Site https://spthangu.sharepoint.com | select LoginName,Roles
 
#View Users for Group
Get-SPOSiteGroup -Site https://spthangu.sharepoint.com | select LoginName,Users | format-table -Wrap

#Tenant Properties
 (Get-SPOTenant).StorageQuota
(Get-SPOTenant).StorageQuotaAllocated
(Get-SPOTenant).ResourceQuota
(Get-SPOTenant).ResourceQuotaAllocated
(Get-SPOTenant).OneDriveStorageQuota
(Get-SPOTenant).CompatibilityRange
(Get-SPOTenant).ExternalServicesEnabled
(Get-SPOTenant).NoAccessRedirectUrl
(Get-SPOTenant).SharingCapabilit
(Get-SPOTenant).DisplayStartASiteOption
"Tenant Properties"
"StartASiteFormUrl for Tenant"
(Get-SPOTenant).StartASiteFormUrl
" ShowEveryoneClaim for Tenant?"
(Get-SPOTenant).ShowEveryoneClaim 
"ShowAllUsersClaim for Tenant?"
(Get-SPOTenant).ShowAllUsersClaim
" OfficeClientADALDisabled Status for Tenant?"
(Get-SPOTenant).OfficeClientADALDisabled
"LegacyAuthProtocolsEnabled for Tenant?"
(Get-SPOTenant).LegacyAuthProtocolsEnabled
"ShowEveryoneExceptExternalUsersClaim for Tenant?"
(Get-SPOTenant).ShowEveryoneExceptExternalUsersClaim
"SearchResolveExactEmailOrUPN for Tenant?"
(Get-SPOTenant).SearchResolveExactEmailOrUPN   
"    RequireAcceptingAccountMatchInvitedAccount for Tenant?"
(Get-SPOTenant).RequireAcceptingAccountMatchInvitedAccount
"ProvisionSharedWithEveryoneFolder for Tenant?"
(Get-SPOTenant).ProvisionSharedWithEveryoneFolder 
"ProvisionSharedWithEveryoneFolder for Tenant?"     
(Get-SPOTenant).SignInAccelerationDomain
"UsePersistentCookiesForExplorerView    for Tenant?"            
(Get-SPOTenant).UsePersistentCookiesForExplorerView 
"BccExternalSharingInvitations    for Tenant?"
(Get-SPOTenant).BccExternalSharingInvitations  
"    BccExternalSharingInvitationsList      for Tenant?"
(Get-SPOTenant).BccExternalSharingInvitationsList
"  UserVoiceForFeedbackEnabled      for Tenant?"
(Get-SPOTenant).UserVoiceForFeedbackEnabled
"            RequireAnonymousLinksExpireInDays    for Tenant?"
(Get-SPOTenant).RequireAnonymousLinksExpireInDays   for Tenant?"
"       SharingAllowedDomainList  for Tenant?"
(Get-SPOTenant).SharingAllowedDomainList 
"SharingBlockedDomainList      for Tenant? "         
(Get-SPOTenant).SharingBlockedDomainList 
"    SharingDomainRestrictionMode     for Tenant?"       
(Get-SPOTenant).SharingDomainRestrictionMode             
"OneDriveForGuestsEnabled for Tenant?"
(Get-SPOTenant).OneDriveForGuestsEnabled                 
Get-SPOTenantLogEntry
#Last Login Time
Get-SPOTenantLogLastAvailableTimeInUtc
Get-SPOTenantSyncClientRestriction

Get-SPOWebTemplate
Get-SPOWebTemplate|select Title

#In PRogres#
$spoSite = Get-SPOSite -Identity "https://spthangu.sharepoint.com"
#View all Team Sites
$spoSite | ?{$_.Template -like "*STS#0" -or $_.Template -like "*EHS#1*"}
#View all Blogs
$spoSite | ?{$_.Template -like "*BLOG#0" }
#Document Center
$spoSite | ?{$_.Template -like "*BDR#0" }
#Developer Site
$spoSite | ?{$_.Template -like "*DEV#0" }
#Records Center
$spoSite | ?{$_.Template -like "*OFFILE#1" }
#BI
$spoSite | ?{$_.Template -like "*BICenterSite#0" }
#Search
$spoSite | ?{$_.Template -like "*SRCHCEN#0" }
#Publishing
$spoSite | ?{$_.Template -like "*BLANKINTERNETCONTAINER#0"}
#Wiki
$spoSite | ?{$_.Template -like "*ENTERWIKI#0"}
#Project Site
$spoSite | ?{$_.Template -like "*PROJECTSITE#0"}

#View all Product Catalog
$spoSite | ?{$_.Template -like "*PRODUCTCATALOG#0"}
#View all Community Site
$spoSite | ?{$_.Template -like "*COMMUNITY#0" }
#Community POrtal
$spoSite | ?{$_.Template -like "*COMMUNITYPORTAL#0" }
#Search Site
$spoSite | ?{$_.Template -like "*SRCHCENTERLITE#0 " }
#Visio Process Repository
$spoSite | ?{$_.Template -like "*visprus#0" }

#Get commands Over

#Below are New Type Commands
#Create a new Site Collection
$Url = "https://spthangu.sharepoint.com/sites/Prod"
$Title = "Production Site"
$template = "STS#0"
New-SPOSite -Url $Url -Owner $User -Title $Title -Template $template -StorageQuota 10000
#View newly created site
$sites=Get-SPOSite
$sites

Below are the commonly used command lets from Microsoft for SharePoint Online:
User management cmdlets
CmdletDescription
Add-SPOUser Adds an existing Office 365 user or an Office 365 security group to a SharePoint group.
Get-SPOUser Returns the SharePoint Online user or security group accounts that match a given search criteria.
Remove-SPOUser Removes a user or a security group from a site collection or a group.
Set-SPOUser Configures properties on an existing user.
Get-SPOExternalUser Returns external users that are located in the tenant's folder based on specified criteria.
Remove-SPOExternalUser Permanently removes a collection of external users from the tenant’s folder.
Top of Page

User group management cmdlets

CmdletDescription
Get-SPOSiteGroup Gets all the groups on the specified site collection.
New-SPOSiteGroup Creates a new group in a SharePoint Online site collection.
Remove-SPOSiteGroup Removes a SharePoint Online group from a site collection.
Set-SPOSiteGroup Updates the SharePoint Online owner and permission levels on a group inside a site collection.
Top of Page

Upgrade cmdlets

CmdletDescription
Upgrade-SPOSite Starts the upgrade process on a site collection.
Request-SPOUpgradeEvaluationSite Requests creation of a copy of an existing site collection for the purposes of validating the effects of upgrade without affecting the original site.
Top of Page

Site collection management cmdlets

CmdletDescription
Get-SPODeletedSite Returns all deleted site collections from the Recycle Bin
Get-SPOSite Returns one or more site collections.
New-SPOSite Creates a new SharePoint Online site collection for the current company.
Remove-SPODeletedSite Removes a SharePoint Online deleted site collection from the Recycle Bin.
Remove-SPOSite Sends a SharePoint Online site collection to the SharePoint Online Recycle Bin.
Repair-SPOSite Checks and repairs the site collection and its contents.
Restore-SPODeletedSite Restores a SharePoint Online deleted site collection from the Recycle Bin.
Set-SPOSite Sets or updates one or more properties' values for a site collection.
Test-SPOSite Tests a SharePoint Online site collection.
Top of Page

Service connection and disconnection cmdlets

CmdletDescription
Connect-SPOService Connects a SharePoint Online global administrator to a SharePoint Online connection; that is, connects the administrator to the SharePoint Online Administration Center.

This cmdlet must be run before any other SharePoint Online cmdlets can run.
Disconnect-SPOService Disconnects from a SharePoint Online service.

Organization-level monitoring and management cmdlets

CmdletDescription
Get-SPOAppErrors Returns application errors.
Get-SPOAppInfo Returns all installed applications.
Get-SPOTenant Returns SharePoint Online organization properties.
Get-SPOTenantLogEntry Retrieves SharePoint Online company logs.
Get-SPOTenantLogLastAvailableTimeInUtc Returns the time when the SharePoint Online organization logs are collected.
Get-SPOWebTemplate Displays all site templates that match the given identity.
Set-SPOTenant Sets properties on the SharePoint Online organization.


References
https://support.office.com/en-us/article/Introduction-to-the-SharePoint-Online-Management-Shell-c16941c3-19b4-4710-8056-34c034493429#__upgrade_cmdlets

Friday, 29 January 2016

OneLiners in Powershell with SharePoint for Features

#Get details of a specific feature like AdminLinks
Get-SPFeature -Identity "AdminLinks"
#Get SP 2010 features
Get-SPFeature -CompatibilityLevel 14
#Get features scoped at farm level
Get-SPFeature -Farm
#Get all properties of first feature
Get-SPFeature | select -Property * -first 1
#Get all hidden features
Get-SPFeature | ?{$_.Hidden -eq $true} | select DisplayName,ID,RootDirectory
#Get count of all features
Get-SPFeature |measure

OneLiners in Powershell with SharePoint for Excel Services

#ExcelService
Get-SPExcelServiceApplication
#Get Excel BI Server
Get-SPExcelServiceApplication | Get-SPExcelBIServer
#Get Excel Bloacked File type
Get-SPExcelServiceApplication | Get-SPExcelBlockedFileType
#Get Excel Data Connection Library
Get-SPExcelServiceApplication | Get-SPExcelDataConnectionLibrary
#Get Excel Data Provider
Get-SPExcelServiceApplication | Get-SPExcelDataProvider
#Get Excel File Location
Get-SPExcelServiceApplication | Get-SPExcelFileLocation
#Get Excel User Defined file
Get-SPExcelServiceApplication | Get-SPExcelUserDefinedFunction

Thursday, 28 January 2016

One Liners for PowerShell with SharePoint for Diagnostics

#ULS diagnostic configuration values of the farm
Get-SPDiagnosticConfig
#View log location
Get-SPDiagnosticConfig|select LogLocation
#View the Number of Days to keep log
Get-SPDiagnosticConfig|select DaysToKeepLogs
#View diagnostics performance counter
Get-SPDiagnosticsPerformanceCounter
#returns all the diagnostics providers in the farm
Get-SPDiagnosticsProvider
#returns the Distributed Cache client settings for DistributedLogonTokenCache.
Get-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache

Wednesday, 27 January 2016

Oneliners for Powershell with SharePoint InfoPath Form Services

#Get the infopath form settings for entire farm
Get-SPInfoPathFormsService
#Get all udc file
Get-SPDataConnectionFile
#Get data connection dependent file
Get-SPDataConnectionFileDependent
#Get InfoPath form templates
Get-SPInfoPathFormTemplate
#Get a list of user agents in the entire farm
Get-SPInfoPathUserAgent
#Get web service proxy for a web application
Get-SPInfoPathWebServiceProxy -Identity "http://w15-sp"

Tuesday, 26 January 2016

OneLiners in Powershell with Sharepoint for Content Deployment


# Get Content Deployment Job details

Get-SPContentDeploymentJob

#Get Content Deployment Path

Get-SPContentDeploymentPath

One Liners in SharePoint for Databases


#Get the database servers related to SQL Server Reporting Services

Get-SPDatabase | ?{$_.Name -like "SQL Server Reporting Services*"}|select Name,DatabaseConnectionstring

#Get all Sharepoint Content Databases

Get-SPDatabase

#View all content database

Get-SPDatabase |select TYpe  -Unique

#View all servers hosting SharePoint content database

Get-SPDatabase |select Server -Unique

#View details of Managed Metadata service

Get-SPDatabase | ?{$_.Name -like "*Managed Metadata*"}|Format-List

#Scaled Out Database for Service Applications
#View all scaled out database for a service application
#example gets all scale-out databases for the given service application by using the $serviceApplication
#variable.
$serviceApplication = Get-SPServiceApplication -Name "App Management Service"
Get-SPScaleOutDatabase -ServiceApplication $serviceApplication
#View Name of the Scale out Database
(Get-SPScaleOutDatabase -ServiceApplication $serviceApplication).Name
#View Database Connection String of Scale Out Database
$dbConnection=(Get-SPScaleOutDatabase -ServiceApplication $serviceApplication).DatabaseConnectionString
Get-SPScaleOutDatabaseDataState -ConnectionString $dbConnection
#Get all scale out inconsistencies for the given service application
Get-SPScaleOutDatabaseInconsistency -ServiceApplication $serviceApplication
#View the 10 most recent scale out log entries for the given App Service Application
$serviceApplication.Databases |Get-SPScaleOutDatabaseLogEntry -Count 10
#Server Scale Out Database
 #View Scale out databse of all Service Aplication
$serviceApp = Get-SPServiceApplication
for ($i = 0; $i -lt $serviceApp.Count; $i++)
{
  Get-SPServerScaleOutDatabase -ServiceApplication $serviceApp[$i] 
}
#View for Search App Server Scale out database
Get-SPServerScaleOutDatabase -ServiceApplication (Get-SPServiceApplication -Name "Search Service Application")
#Two line version
$searchApp= Get-SPServiceApplication -Name "Search Service Application"
$serverScaleDB=Get-SPServerScaleOutDatabase -ServiceApplication $searchApp
#database Connection string
$dbString = (Get-SPServerScaleOutDatabase -ServiceApplication $searchApp).DatabaseConnectionString
#View DB Name
(Get-SPServerScaleOutDatabase -ServiceApplication $searchApp).DisplayName
#View Database State
#One Line
Get-SPServerScaleOutDatabaseDataState -ConnectionString (Get-SPServerScaleOutDatabase -ServiceApplication $searchApp).DatabaseConnectionString
#Two Line
$dbString = (Get-SPServerScaleOutDatabase -ServiceApplication $searchApp).DatabaseConnectionString
 Get-SPServerScaleOutDatabaseDataState -ConnectionString $dbString
 #View Database Inconsistency
 #One Line
 Get-SPServerScaleOutDatabaseInconsistency -ServiceApplication (Get-SPServiceApplication -Name "Search Service Application")
 #Two Line
 Get-SPServerScaleOutDatabaseInconsistency -ServiceApplication $searchApp
 #Get 10 entriesLog Entry for Server Scale out database
 #One Line
 Get-SPServerScaleOutDatabaseLogEntry -Database (Get-SPServerScaleOutDatabase -ServiceApplication  (Get-SPServiceApplication -Name "Search Service Application")) -Count 10
 #Two line version
 $serverScaleDB=Get-SPServerScaleOutDatabase -ServiceApplication $searchApp
 Get-SPServerScaleOutDatabaseLogEntry -Database $serverScaleDB -Count 10

One Liners for Powershell with SharePoint for Custom Layouts Page

#Get custom layouts page to a web application
#Get the mapping to custom layouts page to AccessDenied
Get-SPCustomLayoutsPage  -WEbApplication "http://intranet.contoso.com" | ?{$_.Page -like "*AccessDenied*"}
#Get the mapping to custom layouts page to AccessDenied
Get-SPCustomLayoutsPage  -WEbApplication "http://intranet.contoso.com" | ?{$_.Page -like "*Error*"}
#Get the mapping to custom layouts page to Confirmation
Get-SPCustomLayoutsPage  -WEbApplication "http://intranet.contoso.com" | ?{$_.Page -like "*Confirmation*"}
#Get the mapping to custom layouts page to Login
Get-SPCustomLayoutsPage  -WEbApplication "http://intranet.contoso.com" | ?{$_.Page -like "*Login*"}
#Get the mapping to custom layouts page to RequestAccess
Get-SPCustomLayoutsPage  -WEbApplication "http://intranet.contoso.com" | ?{$_.Page -like "*RequestAccess*"}
#Get the mapping to custom layouts page to Signout
Get-SPCustomLayoutsPage  -WEbApplication "http://intranet.contoso.com" | ?{$_.Page -like "*Signout*"}
#Get the mapping to custom layouts page to WebDeleted
Get-SPCustomLayoutsPage  -WEbApplication "http://intranet.contoso.com" | ?{$_.Page -like "*WebDeleted*"}

Saturday, 23 January 2016

OneLiners for Powershell with SharePoint for Claims

#Get Certificate authority
Get-SPCertificateAuthority
(Get-SPServiceApplication | where {$_.Name -eq 'SecurityTokenServiceApplication'}).SigningCertificate
#Get ClaimProvider
Get-SPClaimProvider
#This example returns a claim provider manager for the farm
Get-Get-SPClaimProviderManager
#Return all claim types in the farm
Get-SPClaimTypeEncoding



Friday, 22 January 2016

One Liners in Powershell with SharePoint for Miscelleneous

#Is Bing Maps blocked
Get-SPBingMapsBlock
#Get the current BingMAps Key
Get-SPBingMapsKey
#Get Product details for SharePoint like Language Server,Language Pack,Project Server
Get-SPProduct
#Get the servers where Microsoft SharePoint Server 2013 is installed
Get-SPProduct
|?{$_.ProductName -like "Microsoft SharePoint Server 2013"}|select ProductName,Servers
#Get System Account or managed account and Security Identifier
Get-SPProcessAccount
#Get all web part
Get-SPWebPartPack


Get-SPHelpCollection

#returns the latest time the internal app state update job was invoked.

Get-SPInternalAppStateSyncLastRunTime

#the interval in hours between updates of the internal app state update job.

Get-SPInternalAppStateUpdateInterval

#returns IRM settings for the entire farm

Get-SPIRMSettings 

#Get Managed Account

Get-SPManagedAccount

#Get Managed Path

Get-SPManagedPath -WebApplication "http://intranet.contoso.com" 

One Liners in PowerShell for Migration/Upgrade

#Health Check in Site
Test-SPSite -Identity "http://intranet.contoso.com/sites/contoso"
#Health Check on all Content Database[Missing web parts or files ] 
Get-SPContentDatabase| Test-SPContentDatabase

#Upgrade Actions
Get-SPUpgradeActions
#Get Upgrade actions for features
Get-SPUpgradeActions |?{$_.BaseType -eq "Feature"}
#Get Upgrade actions for Template
Get-SPUpgradeActions |?{$_.BaseType -eq "Template"}
#Get Upgrade actions for SPSequence
Get-SPUpgradeActions |?{$_.BaseType -eq "SPSequence"}
#Get Upgrade actions for SPAction Get-SPUpgradeActions |?{$_.BaseType -eq "SPAction"}
#Get pending upgrade actions of Farm Get-SpFarm | Get-SPPendingUpgradeActions -Recursive
#Get upgrade actions of all web applications Get-SPWebApplication |Get-SPPendingUpgradeActions

#Get Site Upgrade Session Info
Get-SPContentDatabase | Get-SPSiteUpgradeSessionInfo
#Get Site Upgrade Session info for a site
Get-SPSiteUpgradeSessionInfo -Site "http://w15-sp"
#Get Site Upgrade Session info where upgrade is in progress
Get-SPContentDatabase | Get-SPSiteUpgradeSessionInfo -ShowInProgress  
#Show upgrade info hiding waiting status         
Get-SPContentDatabase | Get-SPSiteUpgradeSessionInfo -HideWaiting               
#Display all completed upgrades
Get-SPContentDatabase | Get-SPSiteUpgradeSessionInfo -ShowCompleted
#To iview links of upgaded sites
[xml[]]$XMLFileUpgraded=(Get-SPContentDatabase | Get-SPSiteUpgradeSessionInfo -ShowCompleted).SessionXML
$XMLFileUpgraded| % {$_.FirstChild.sFld | where {$_.name -match "m_strRootObjectTitle"}}  | select `#text   
#Display Failed upgrades
Get-SPContentDatabase | Get-SPSiteUpgradeSessionInfo -ShowFailed

Thursday, 21 January 2016

One Liners in Powershell with SharePoint for BackUp and Restore


#Create a folder to backup and share
New-Item -Name "SPBackUp" -ItemType Directory -path "c:\"

Net Share SPBackUp=c:\SPBackUp

Add-PSSnapin "Microsoft.SharePoint.Powershell"

#Show Farm Tree for BackUp

Backup-SpFarm -ShowTree

#Back Up Farm config only

Backup-SpFarm -Directory "C:\SPBackUp" -BackupMethod Full -ConfigurationOnly

#Backup of Web Application

Backup-SpFarm -Directory "C:\SPBackUp" -BackupMethod Full -Item "hrweb.contoso.com"

#Backup of App Service Application(For all use-Farm\Shared Services)

Backup-SpFarm -Directory "C:\SPBackUp" -BackupMethod Full -Item "Farm\Shared Services\Shared Services Applications\App Management Service"

Backup-SpFarm -Directory "C:\SPBackUp" -BackupMethod Full -Item "Farm\Shared Services\Shared Services Proxies\App Management Service"

#Differential BackUp of hrweb content database.Verbose to view details steps.

Backup-SpFarm -Directory "C:\SPBackUp" -BackupMethod Differential -Item WSS_Content_3232a26c0ff645d5a2600a48727dbf5d -Verbose

#Backup Solution

Backup-SpFarm -Directory "C:\SPBackUp" -BackupMethod Full -Item "Farm\Solutions\powerpivotwebapplicationsolution.wsp"

#BackUp Site Collection

Backup-SPSite -Identity "http://intranet.contoso.com/sites/contoso" -Path "C:\SPBackUp\contoso1.bak" -verbose

#Export WEb

Export-SPWeb -Identity "http://intranet.contoso.com/sites/contoso" -Path "C:\SPBackUp\contosoWeb1.bak"

#Import Web

Import-SPWeb -Identity "http://hrweb.contoso.com/Sample" -Path "C:\SPBackUp\contosoWeb1.bak"

#Get the backup history

Get-SPBackupHistory -Directory "c:\SPBackUp"



Restore


#Restore SP Solutions

Restore-SPFarm -Directory "C:\SPBackUp" -Item "Farm\Solutions\powerpivotfarmsolution.wsp" -RestoreMethod Overwrite

#Restore SpSite created New-SPSite -Url "http://hrweb.contoso.com/sites/newteam" -Template "STS#1"

Restore-SPSite -Identity "http://hrweb.contoso.com/sites/newteam" -Path "C:\SPBackUp\ITNewteam.bak" -Force

#Restore Announcement list

Import-SPWeb -Identity "http://intranet.contoso.com/sites/contoso" -Path "C:\SPBackUp\Announcements.cmp"

#Restore a dcoument library backed using

#Export-SPWeb -Identity "http://hrweb.contoso.com" -ItemUrl "/Shared Documents" -Path "C:\SPBackUp\Doc.cmp"

#Contetnts are appended to existing list/document library of same name

Import-SPWeb -Identity "http://hrweb.contoso.com/Teamsite" -Path "C:\SPBackUp\Doc.cmp"

#restore deleted site using ID Site ID Get-SPDeletedSite

Restore-SPDeletedSite -Identity 59e6f937-cf24-4a5e-8617-cbb026797c20

Tuesday, 19 January 2016

One Liners for the Powershell conversations with SharePoint for Site collections

#View all site collections
Get-SPSite -Limit All
#View 10 site Collections
GEt-SpSite -Limit 10
#View Site collections for a Personal sites
Get-SpSite -Limit All|?{$_.URL -like "*personal*"}|measure
#View site collecions for all SP Contentdatabases
Get-SPContentDatabase| Get-SPSite -LImit All
#View Site Collection for a URL
Get-Spsite -Identity http://intranet.contoso.com/sites/NewTeam
#View Site collection for a specific Web Applications
Get-SPWebApplication -Identity "http://w15-sp" |Get-SpSite
#View SP 2010 site collections
Get-SPSite -Limit all -CompatibilityLevel 14
#View Usag Storage for site collection
Get-SPSite | select url, {$_.Usage.Storage}
#View subsites unders a URL Get-SPSite http://<site name>/* -Limit 100
Get-SPSite http://intranet.contoso.com/* -Limit 100
#View sites matching regular expression http://localserver/(my|personal)/sites
Get-SPSite -Identity "http://localserver/(my|personal)/sites" -Regex
#Sum of disk space usage for all sites under a web application
Get-SPWebApplication http://intranet.contoso.com | Get-SPSite -Limit All |ForEach-Object {$sum=0}{ $sum+=$_.Usage.Storage }{$sum}
#Get sites for an administrator
Get-SPSite -Filter {$_.Owner -like "*contoso\garthf*"} -Limit 10
#Start-SpAssignment for large oparations
Start-SPAssignment -global;Get-SPSite -Filter {$_.Owner -like "*contoso\garthf*"} -Limit 20 ;Stop-SPAssignment -global
#Get Title name of all websites under site collection URL
Get-SPSite "http://w15-sp" | Get-SPWeb -Limit All | Select Title
#Get Site URL
#If no host header site create using below command
#New-SpSite -Url "http://demohostheader.contoso.com" -Template "STS#0" -OwnerAlias "contoso\administrator" -HostHeaderWebApplication "http://www.contoso.com"
Get-SPSiteURL -Identity "http://demohostheader.contoso.com"
#View Designer Settings for current user,Mostly set to false
(Get-SPSite -Identity "http://intranet.contoso.com").AllowDesigner
#View settings to include external Embedding.
(Get-SPSite -Identity "http://intranet.contoso.com").AllowExternalEmbedding
#View settings to check Master Page Editing
(Get-SPSite -Identity "http://intranet.contoso.com").AllowMasterPageEditing
#Setting to check if site can be reverted to base template
(Get-SPSite -Identity "http://intranet.contoso.com").AllowRevertFromTemplate
# Settings to checck Rss Feeds
(Get-SPSite -Identity "http://intranet.contoso.com").AllowRssFeeds
#Settings to view Self service upgrade status
(Get-SPSite -Identity "http://intranet.contoso.com").AllowSelfServiceUpgrade


Monday, 18 January 2016

OneLiners in Powershell with SharePoint for viewing Logs and diagnostics Information


#View Log Message for a specific Error with Correlation ID

Get-SPLogEvent | Where {$_.Correlation -contains "5364569d-8ce8-c0ac-9240-a7bebb3e24cb"}


#Get all log events Message is related to particular site

Get-SpLogEvent |Where{($_.Message -like "*it.contoso.com*") -and ($_.level -eq "High")}


#Get 5 most critical Log Events for category Database

Get-SPLogEvent |?{$_.category -eq "Database" -and $_.Level -eq "Critical"}| sort timestamp |select * -First 5


#View all logging categories

Get-SPLogEvent| select category -Unique


#View log event between 10 seconds and now

Get-SPLogEvent -StartTime (Get-Date).AddSeconds(-10) -EndTime (Get-Date)


#Get the throttle level for all categories
Get-SPLogLevel

#get Throttle Level for Timer Jobs category
"timer Job" |Get-SPLogLevel

#Get Log Level for Web Content Management Area
Get-SPLogLevel |?{$_.Area -like "*web*"}

#Get Log Level for Search Area
Get-SPLogLevel |?{$_.Area -like "*search*"}

#Get Log Level for User Profile category
Get-SPLogLevel |?{$_.Name -like "*user profile*"}

#Trace Severity- Monitorable and Medium
Get-SPLogLevel | select traceseverity -Unique

#Event Severity- Warning and Information Information
Get-SPLogLevel | select Eventseverity -Unique 

Monday, 11 January 2016

One Liners for Powershell with SharePoint for Search Service Applications


Search Service Application
1.      Get the content Source for Search Service Application

Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | select *| out-gridview

2.      Search for a particular service application like Search

Get-SPServiceApplication |?{$_.Name -like "*search*"}| select Name

3.      Get the Content Database for Search Service Application

Get-SPServiceApplication -Name "Search Service Application" | select activetopology | format-list

4.      Get the sites where continuous crawl is enabled.

Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ?{$_.EnableContinuousCrawls -eq $true}


$ssa = Get-SPEnterpriseSearchServiceApplication



#This example retrieves the active search topology of the search service application

Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active

#View all Search Components for a topology ID from Get-SPEnterpriseSearchTopology

Get-SPEnterpriseSearchComponent -examples



# Get Search Administration Component

Get-SPEnterpriseSearchAdministrationComponent -SearchApplication $ssa

# Get Search Crawl Component

Get-SPEnterpriseSearchCrawlDatabase  -SearchApplication $ssa

# Get Search Links Component

Get-SPEnterpriseSearchLinksDatabase  -SearchApplication $ssa


#View all Search Result Item Types

#Get-SPEnterpriseSearchResultItemType -Owner $ssaOwner -SearchApplication $ssa | select *  | out-gridview

#Get metadata crawled property

Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa

#View Crawled Property of Category People

Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Category People

#View Metadata Category of a UserName

Get-SPEnterpriseSearchMetadataMapping -SearchApplication $ssa -ManagedProperty UserName

#Get the Ranking Model
Get-SPEnterpriseSearchRankingModel -SearchApplication $ssa -Owner $ssaOwner

#View all the Display Properties for Email Search Result(or Person etc)
Get-SPEnterpriseSearchResultItemType -SearchApplication $ssa -Owner $ssaOwner |?{$_.Name -eq "Email"}

#View all Property Rules
Get-SPEnterpriseSearchPropertyRuleCollection

#gets the current status of the linguistic query and document  processing components
Get-SPEnterpriseSearchLinguisticComponentsStatus -SearchApplication $ssa

#Get reference to query and site settings service
Get-SPEnterpriseSearchQueryAndSiteSettingsService


#Get the authoritative page

Get-SPEnterpriseSearchQueryAuthority -SearchApplication $ssa -Owner $ssaOwner

#Get the demoted rule

Get-SPEnterpriseSearchQueryDemoted -SearchApplication $ssa -Owner $ssaOwner

#Query Keywords(User Query Rules instead)Get-SPEnterpriseSearchCrawlRule -SearchApplication $ssa

Get-SPEnterpriseSearchQueryKeyword -Site "http://w15-sp"

#Query Scope(User Result Source instead)Not identified yet

Get-SPEnterpriseSearchQueryScope -SearchApplication $ssa

#Query Scope Rule(Use Result Source instead)

Get-SPEnterpriseSearchQueryScopeRule -SearchApplication $ssa -Scope People



#Get the current configuration for the Query Spelling Correction component

Get-SPEnterpriseSearchQuerySpellingCorrection  -SearchApplication $ssa

#Get the a list of popular queries that can be displayed in a related queries Web Part

Get-SPEnterpriseSearchQuerySuggestionCandidates -SearchApplication $ssa -Owner $ssaOwner

#Get the pluggable security trimmers registered in the search service application

Get-SPEnterpriseSearchSecurityTrimmer -SearchApplication $ssa

#Get the SearchService object when the search service is updated or deleted.

Get-SPEnterpriseSearchService

#Get Most Recent Backup of Service Application

Get-SPEnterpriseSearchServiceApplicationBackupStore -BackupFolder "c:\backup" -Name $ssa -UseMostRecent

#View Search Service Application Proxy
Get-SPEnterpriseSearchServiceApplicationProxy

#View reference to the local search service instance
Get-SPEnterpriseSearchServiceInstance

#View or retrieves diagnostic information for all or specified search components in the active topology of a Search Service Application
Get-SPEnterpriseSearchStatus

#View Site hit rule
Get-SPEnterpriseSearchSiteHitRule

#View / get the index paths for all active index components on the current server.
Get-SPEnterpriseSearchVssDataPath

5.      Get the Access Service Application

Get-SPAccessServiceApplication | select * | out-gridview






Friday, 8 January 2016

One Liners for Powershell with SharePoint for Solutions

1. Add a SharePoint Solution
Add-SPSolution -LiteralPath "C:\Demo\wspDemo\SharePointCustomImageLoad.wsp" 
 
2. Install Solution 
Install-SPSolution -Identity "SharePointCustomImageLoad.wsp" -GACDeployment -force 
 
3. Retract Solution 
Uninstall-SPSolution -Identity "SharePointCustomImageLoad.wsp" 

4. Remove Solution
Remove-SPSolution -Identity "SharePointCustomImageLoad.wsp"

5. Get Solution
Get-SPSolution
#View User Solutions
Get-SPUserSolution -Site "http://w15-sp"
#View ID of User Solutions
(Get-SPUserSolution -Site "http://w15-sp").SolutionID
#View Status of User Solutions
(Get-SPUserSolution -Site "http://w15-sp").Status
#View Name of User Solutions
(Get-SPUserSolution -Site "http://w15-sp").Name
#View Signature of User Solutions
(Get-SPUserSolution -Site "http://w15-sp").Signature
#View Assemblies of User Solutions
(Get-SPUserSolution -Site "http://w15-sp").HasAssemblies



Thursday, 7 January 2016

One Liners for the Powershell Conversations with SharePoint for Lists

1. List all the lists Titles
(Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists | select title,basetemplate |out-gridview

2. Display the CAML query or the XML field information of a List
(Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Announcements"].Items.Xml

3. Display the 3rd listitem's Title
(Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Sample2"].Items[2]["Title"]

4. Display the GUID of a List
((Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Sample2"]).ID

5. Display the number of items in a list
((Get-SPWeb -identity "http://intranet.contoso.com/sites/contoso").Lists["Sample2"]).Itemcount

Wednesday, 6 January 2016

One Liners for the Powershell conversations with SharePoint for Farm/WebApp

1. Get the host named Site collections in SharePoint
Get-SPSite -limit all|?{$_.HostHeaderIsSiteName -eq $true} | Out-GridView

2. Get Alternate Urls
(Get-SpWEbApplication).AlternateUrls

3.Get Users for a WEb[Rename the url]
(Get-SPWEb -identity "http://hrweb.contoso.com").AllUsers

4. Get the Author for a WEb
(Get-SPWEb -identity "http://hrweb.contoso.com").Author

5. When was this web created?
(Get-SPWEb -identity "http://hrweb.contoso.com").Created

6. List all properties of Farm
Get-SPFarm | select -Property *

7. List the Name and disksize for first 2 SharePoint Content database sorted by disksize
Get-SpContentDatabase | sort disksizerequired| select Name,DiskSizeRequired -First 5

8. Get the GUID of your web
(Get-SPSite -identity "http://intranet.contoso.com/sites/contoso").ID

9. Count of all server in SharePoint Farm
Get-SPServer | measure

10. View performance counter settings for WEb Front End
Get-SpDiagnosticsPerformanceCounter  -WebFrontEnd

11.#View all performance counter
Get-SPWebApplicationHttpThrottlingMonitor -Identity "http://intranet.contoso.com"

#View User Policies
(Get-SPWebApplication).Policies

#WEb Application Properties
$spWEbApp = Get-SPWebApplication -Identity "http://w15-sp"
#WEb Application property
$spWEbApp.AlertFlags
$spWEbApp.AlertsEnabled
$spWEbApp.AlertsEventBatchSize
$spWebApp.AlertsLimited
$spWEbApp.AlertsMaximum
$spWEbApp.AlertsMaximumQuerySet
$spWEbApp.AllowAccessToWebPartCatalog
$spWEbApp.AllowAnalyticsCookieForAnonymousUsers
$spWEbApp.AllowContributorsToEditScriptableParts
$spWEbApp.AllowDesigner
#View allowed downlaods
$spwebApp.AllowedInlineDownloadedMimeTypes
$spwebApp.AllowHighCharacterListFolderNames
#Is MAster PAge editing allowed
$spwebApp.AllowMasterPageEditing
#AllowOMCodeOverrideThrottleSettings
$spwebApp.AllowOMCodeOverrideThrottleSettings
#AllowPartToPartCommunication
$spwebApp.AllowPartToPartCommunication
#AllowRevertFromTemplate
$spwebApp.AllowRevertFromTemplate
#AllowSelfServiceUpgradeEvaluation
$spwebApp.AllowSelfServiceUpgradeEvaluation
#AllowSilverlightPrompt
$spwebApp.AllowSilverlightPrompt
#AlternateUrls
$spwebApp.AlternateUrls
#AlwaysProcessDocuments
$spWebApp.AlwaysProcessDocuments
$spwebApp.ApplicationPool
#View Rights
$spwebApp.ApplicationPrincipalMaxRights
#AppResourceTrackingSettings
$spwebApp.AppResourceTrackingSettings
#AutomaticallyDeleteUnusedSiteCollections
$spwebApp.AutomaticallyDeleteUnusedSiteCollections
#BlockedFileExtensions
$spwebApp.BlockedFileExtensions
#BrowserCEIPEnabled
$spwebApp.BrowserCEIPEnabled
#BrowserFileHandling
$spwebApp.BrowserFileHandling
#CanMigrate
$spwebApp.CanMigrate
#CanRenameOnRestore
$spwebApp.CanRenameOnRestore
#CanSelectForRestore
$spwebApp.CanSelectForRestore

#Can web application be upgraded
$spWebApp.CanUpgrade
#CascadeDeleteMaximumItemLimit
$spWebApp.CascadeDeleteMaximumItemLimit
#CascadeDeleteTimeoutMultiplier
$spWEbApp.CascadeDeleteTimeoutMultiplier
#ClientCallableSettings
$spWebApp.ClientCallableSettings
#Max Resources per request
($spWebApp.ClientCallableSettings).MaxResourcesPerRequest
#CellStorageDataCleanupExcludedDocTypes
$spWebApp.CellStorageDataCleanupExcludedDocTypes
#CellStorageUserDataDeleteIncludedDocTypes
$spWebApp.CellStorageUserDataDeleteIncludedDocTypes
#CellStorageUserDataDeleteSizeThreshold
$spWebApp.CellStorageUserDataDeleteSizeThreshold
#Cell Storage web service
$spWebApp.CellStorageWebServiceEnabled
#Is Log Expiration Enabled
$spWebApp.ChangeLogExpirationEnabled
#Days to retain logs
$spWebApp.ChangeLogRetentionPeriod
($spWebApp.ChangeLogRetentionPeriod).Days
#ClientCallableSettings
$spWebApp.ClientCallableSettings
#CompatibilityRange
$spWebApp.CompatibilityRange
#Content Databases
$spWebApp.ContentDatabases
#CrossDomainPhotosEnabled
$spWebApp.CrossDomainPhotosEnabled
#CustomAppErrLimit
$spWebApp.CustomAppErrorLimit
#DailyStartUnthrottledPrivilegedOperations Time
$spWebApp.DailyStartUnthrottledPrivilegedOperationsHour
$spWebApp.DailyStartUnthrottledPrivilegedOperationsMinute
$spWebApp.DailyUnthrottledPrivilegedOperationsDuration
#DataRetrievalProvider
$spWebApp.DataRetrievalProvider
#DaysToShowNewIndicator
$spWebApp.DaysToShowNewIndicator
$spWebApp.DefaultQuotaTemplate
$spWebApp.DefaultServerComment
$spWebApp.DefaultTimeZone
$spWebApp.DisableCoauthoring
$spWEbApp.DiskSizeRequired
$spWEbApp.DisplayName
$spWEbApp.DocumentConversionsEnabled
$spWEbApp.DocumentConversionsLoadBalancerServerId
$spWEbApp.DocumentConversionsLoadBalancerUrl
$spWEbApp.DocumentConversionsSchedule

#To WEb Page
$spWebApp.DocumentConverters|select Name
#DocumentLibraryCalloutOfficeWebAppPreviewersDisabled
$spWebApp.DocumentLibraryCalloutOfficeWebAppPreviewersDisabled
#EmailToNoPermissionWorkflowParticipantsEnabled
$spWebApp.EmailToNoPermissionWorkflowParticipantsEnabled
#EnabledClaimProviders
$spWebApp.EnabledClaimProviders
#EventHandlersEnabled
$spWebApp.EventHandlersEnabled
#EventLogRetentionPeriod
$spWebApp.EventLogRetentionPeriod
#ExternalUrlZone
$spWebApp.ExternalUrlZone
#ExternalWorkflowParticipantsEnabled
$spWebApp.ExternalWorkflowParticipantsEnabled
#Farm
$spWebApp.Farm
#Featires
$spWebApp.Features

#Farm Status,Name
$spWEbApp.Farm
#View 15 features
$spWEbApp.Features | ?{$_.Version -like "*15*"}
#Count of Features
$spWEbApp.Features.Count
#Features sort by timeActivated
$spWEbApp.Features | select DefinitionId,Definition,TimeActivated|sort TimeActivated -Descending
#Group by scope
$spWEbApp.Features | select * | group FeatureDefinitionScope
#FileNotFoundPage
$spWEbApp.FileNotFoundPage
#ForceseekEnabled
$spWEbApp.ForceseekEnabled
#FormDigestSettings
$spWebApp.FormDigestSettings
#Job Definitions
$spWEbApp.JobDefinitions
#JobHistoryEntries
$spWEbApp.JobHistoryEntries
#View Succeeded JObs
$spWEbApp.JobHistoryEntries|?{$_.Status -like "*Succeeded*"}
#View ErrorMessage
$spWEbApp.JobHistoryEntries|?{$_.ErrorMessage -ne ""}
$spWEbApp.RunningJobs

$spWEbApp.MasterPageReferenceEnabled
#MaximumFileSize
$spWEbApp.MaximumFileSize
#MaximumFileSizePerExtension
$spWEbApp.MaximumFileSizePerExtension
#MaxItemsPerThrottledOperation
$spWEbApp.MaxItemsPerThrottledOperation
#MaxItemsPerThrottledOperationOverride
$spWEbApp.MaxItemsPerThrottledOperationOverride
#MaxItemsPerThrottledOperationWarningLevel
$spWEbApp.MaxItemsPerThrottledOperationWarningLevel
#MaxListItemRowStorage
$spWEbApp.MaxListItemRowStorage
#MaxQueryLookupFields
$spWEbApp.MaxQueryLookupFields
#MaxSizeForSelfServiceEvalSiteCreationMB
$spWEbApp.MaxSizeForSelfServiceEvalSiteCreationMB
#MaxSizePerCellStorageOperation
$spWEbApp.MaxSizePerCellStorageOperation
#MaxUniquePermScopesPerList
$spWEbApp.MaxUniquePermScopesPerList
#MetaWeblogAuthenticationEnabled
$spWEbApp.MetaWeblogAuthenticationEnabled
#MetaWeblogEnabled
$spWEbApp.MetaWeblogEnabled
#MimeMappings
$spWEbApp.MimeMappings
$spWEbApp.Name
#NeedsUpgrade
$spWEbApp.NeedsUpgrade
#NeedsUpgradeIncludeChildren
$spWEbApp.NeedsUpgradeIncludeChildren
#OfficialFileName
$spWEbApp.OfficialFileName
#OfficialFileHosts
$spWEbApp.OfficialFileHosts
#OfficialFileUrl
$spWEbApp.OfficialFileUrl
#OutboundMailCodePage
$spWEbApp.OutboundMailCodePage
#OutboundMailReplyToAddress
$spWEbApp.OutboundMailReplyToAddress
#OutboundMailSenderAddress
$spWEbApp.OutboundMailSenderAddress
#OutboundMailServiceInstance
$spWEbApp.OutboundMailServiceInstance
#OutboundMmsServiceAccount
$spWEbApp.OutboundMmsServiceAccount
#OutboundSmsServiceAccount
$spWEbApp.OutboundSmsServiceAccount
$spWEbApp.PeoplePickerSettings
#PeoplePickerSettings
$spWEbApp.PeoplePickerSettings
#Parent
$spWEbApp.Parent
#Policies
$spWEbApp.Policies|select DisplayName
#POlicy Roles
$spWEbApp.PolicyRoles
#Prefix
$spWEbApp.Prefixes
#Presence Enabled
$spWEbApp.PresenceEnabled
#Properties
$spWEbApp.Properties
#PublicFolderRootURl
$spWEbApp.PublicFolderRootUrl
$spWEbApp.RecycleBinCleanupEnabled

#RecycleBinRetentionPeriod
$spWEbApp.RecycleBinRetentionPeriod
$spWEbApp.RenderingFromMetainfoEnabled
#Request Management Settings
$spWEbApp.RequestManagementSettings
($spWEbApp.RequestManagementSettings).Name
($spWEbApp.RequestManagementSettings).Id
($spWEbApp.RequestManagementSettings).Farm
($spWEbApp.RequestManagementSettings).IsInitialized
($spWEbApp.RequestManagementSettings).MachinePools
($spWEbApp.RequestManagementSettings).MaxRequestBufferCount
($spWEbApp.RequestManagementSettings).MinimumCacheRefreshTime
($spWEbApp.RequestManagementSettings).Parent
($spWEbApp.RequestManagementSettings).PingAvailabilityThreshold
($spWEbApp.RequestManagementSettings).PingFailureLimit
($spWEbApp.RequestManagementSettings).PingInterval
(($spWEbApp.RequestManagementSettings).PingInterval).Days
(($spWEbApp.RequestManagementSettings).PingInterval).Hours
(($spWEbApp.RequestManagementSettings).PingInterval).Milliseconds
(($spWEbApp.RequestManagementSettings).PingInterval).Minutes
(($spWEbApp.RequestManagementSettings).PingInterval).Seconds
(($spWEbApp.RequestManagementSettings).PingInterval).Ticks
(($spWEbApp.RequestManagementSettings).PingInterval).TotalDays
(($spWEbApp.RequestManagementSettings).PingInterval).TotalHours
(($spWEbApp.RequestManagementSettings).PingInterval).TotalMilliseconds
(($spWEbApp.RequestManagementSettings).PingInterval).TotalMinutes
(($spWEbApp.RequestManagementSettings).PingInterval).TotalSeconds
($spWEbApp.RequestManagementSettings).PingPassLimit
($spWEbApp.RequestManagementSettings).Properties
($spWEbApp.RequestManagementSettings).RequestBufferLength
($spWEbApp.RequestManagementSettings).RequestExecutionTimeout
($spWEbApp.RequestManagementSettings).RoutingEnabled
($spWEbApp.RequestManagementSettings).RoutingHealthScoreDepreciationTime
($spWEbApp.RequestManagementSettings).RoutingRules
($spWEbApp.RequestManagementSettings).RoutingScheme
($spWEbApp.RequestManagementSettings).RoutingTargets
($spWEbApp.RequestManagementSettings).ThrottlingEnabled
($spWEbApp.RequestManagementSettings).ThrottlingRules
($spWEbApp.RequestManagementSettings).TypeName
($spWEbApp.RequestManagementSettings).UpgradedPersistedProperties

$spWebApp.RequireContactForSelfServiceSiteCreation
$spWebApp.RightsMask
$spWebApp.RunningJobs
$spWebApp.ScopeExternalConnectionsToSiteSubscriptions
#SecondStageRecycleBinQuota
$spWebApp.SecondStageRecycleBinQuota
$spWebApp.SelfServiceCreateIndividualSite
$spWebApp.SelfServiceCreationParentSiteUrl
$spWebApp.SelfServiceCreationQuotaTemplate
$spWebApp.SelfServiceSiteCreationEnabled
$spWebApp.SelfServiceSiteCustomFormUrl
$spWebApp.SendLoginCredentialsByEmail
$spWebApp.SendSiteUpgradeEmails
$spWebApp.SendUnusedSiteCollectionNotifications
$spWebApp.ServiceApplicationProxyGroup
$spWebApp.ShowStartASiteMenuItem
$spWebApp.ShowURLStructure
$spWebApp.SiteDataServers
#View all Sites
$spWebApp.Sites
$spWebApp.SiteSubscriptions
$spWebApp.SiteUpgradeThrottleSettings
($spWebApp.SiteUpgradeThrottleSettings).AppPoolConcurrentUpgradeSessionLimit
($spWebApp.SiteUpgradeThrottleSettings).DisplayName
($spWebApp.SiteUpgradeThrottleSettings).Farm
($spWebApp.SiteUpgradeThrottleSettings).Id
($spWebApp.SiteUpgradeThrottleSettings).Name
($spWebApp.SiteUpgradeThrottleSettings).Parent
($spWebApp.SiteUpgradeThrottleSettings).Properties
($spWebApp.SiteUpgradeThrottleSettings).Status
($spWebApp.SiteUpgradeThrottleSettings).SubwebCountLimit
($spWebApp.SiteUpgradeThrottleSettings).TypeName
($spWebApp.SiteUpgradeThrottleSettings).UpgradedPersistedProperties
($spWebApp.SiteUpgradeThrottleSettings).UsageStorageLimit
($spWebApp.SiteUpgradeThrottleSettings).Version
$spWebApp.StorageMetricsProcessingDuration
$spWebApp.Status
$spWebApp.SuiteBarBrandingElementHtml
$spWebApp.SyndicationEnabled
$spWebApp.UnusedSiteNotificationPeriod
$spWebApp.UnthrottledPrivilegedOperationWindowEnabled
$spWebApp.UnusedSiteNotificationsBeforeDeletion
$spWebApp.UpgradeContext
$spWebApp.UpgradedPersistedProperties
$spWebApp.UpgradeEvalSitesRetentionDays
$spWebApp.UpgradeMaintenanceLink
$spWebApp.UpgradeReminderDelay

#IS Claims Authentication used
$spWebApp.UseClaimsAuthentication
$spWebApp.UseExternalUrlZoneForAlerts
#Workflow Complexity
$spWebApp.UserDefinedWorkflowMaximumComplexity
$spWebApp.UserDefinedWorkflowsEnabled
$spWebApp.UserPhotoErrorExpiration
$spWebApp.UserPhotoExpiration
$spWebApp.UserPhotoImportEnabled
$spWebApp.UserPhotoOnlineImportEnabled
#User Resource Tracking Settings
$spWebApp.UserResourceTrackingSettings
#User Profile Settings
$spWebApp.UserSettingsProvider
$spWebApp.UserSettingsProvider|select Name
#Url
$spWebApp.Url
$spWebApp.Version
#WEb Config Modifications
$spWebApp.WebConfigModifications
($spWebApp.WebConfigModifications).Count
$spWebApp.WebConfigModifications|select Name
$spWebApp.WebConfigModifications|select Owner
$spWebApp.WebConfigModifications|select Path
$spWebApp.WebConfigModifications|select Value
$spWebApp.WebConfigModifications|select Type

#View all web extensions
$spWebApp.WebFileExtensions
#Web Service
$spWebApp.WebService
($spWebApp.WebService).ActiveDirectoryDomain
($spWebApp.WebService).ActiveDirectoryOrganizationalUnit
($spWebApp.WebService).AllowAggregationCalendar
($spWebApp.WebService).AlternateContentEditorScript
($spWebApp.WebService).AntivirusSettings
($spWebApp.WebService).ApplicationPools
($spWebApp.WebService).ApplicationPools|select Name
($spWebApp.WebService).Applications
#Background File Limits
($spWebApp.WebService).BackgroundFileSyncThrottlingSettings
($spWebApp.WebService).BrowserCEIPEnabled
($spWebApp.WebService).CacheSiteLookup
($spWebApp.WebService).CanBackupRestoreAsConfiguration
($spWebApp.WebService).CanRenameOnRestore
($spWebApp.WebService).CanSelectForBackup
($spWebApp.WebService).CanSelectForRestore
($spWebApp.WebService).CanUpgrade
($spWebApp.WebService).CdnPrefix
($spWebApp.WebService).ClientRequestServiceSettings
($spWebApp.WebService).CoauthoringMaxAuthors
($spWebApp.WebService).CoauthoringVersionPeriod
($spWebApp.WebService).CollectSPRequestAllocationCallStacks
($spWebApp.WebService).CorporateCuratedGalleryAppQueryInterval
($spWebApp.WebService).CreateActiveDirectoryAccounts

Get-SPWebApplicationHttpThrottlingMonitor -Identity "http://w15-sp"
Get-SPWebPartPack
Get-SPWebTemplate
Get-SPWOPIBinding
Get-SPWOPISuppressionSetting
Get-SPWOPIZone
Get-SPWorkflowConfig -WebApplication http://w15-sp
Get-SPWorkflowServiceApplicationProxy
#View Template name for a site collection
Get-SPWeb -Identity "http://w15-sp" | select WEbTemplate
Get-SPWebTemplate | select NAme > c:\demo\templates.txt