Thursday, 11 February 2016

One Liners for PowerShell with SharePoint for All Service Applications(General)

#View all Service Applications
Get-SPServiceApplication
#View all Service Application Proxy
Get-SPServiceApplicationProxy
#View all Service Application Pools
Get-SPServiceApplicationPool
#View Service Application Proxy Group
Get-SPServiceApplicationProxyGroup
#View Service Application End Point for Access Service Application
Get-SPAccessServiceApplication | Get-SPServiceApplicationEndpoint
#View Service Application End Point for Excel Service Application
Get-SPExcelServiceApplication | Get-SPServiceApplicationEndpoint
#View Service Application End Point for Search Service Application
Get-SPEnterpriseSearchServiceApplication | Get-SPServiceApplicationEndpoint
#View Security for All Service Application
Get-SPServiceApplication | Get-SPServiceApplicationSecurity -Admin

Tuesday, 9 February 2016

OneLiners with PowerShell with SharePoint for Secure Store Service Application

Secure Store in SharePoint 2013 replace the Single Sign on in MOSS 2007.
#Get details of the Secure Store Service
Get-SPSecureStoreApplication -All  -ServiceContext "http://w15-sp"
#Get the Secure Store System Account.a list of user accounts for the secure store system
Get-SPSecureStoreSystemAccount
#Get security token service (STS) for the farm.
Get-SPSecurityTokenServiceConfig
#View ID of STS
(Get-SPSecurityTokenServiceConfig).ID
#View Public Url of STS
(Get-SPSecurityTokenServiceConfig).SecurityTokenServicePublicUrlSuffix
#View Cookie LifeTime
(Get-SPSecurityTokenServiceConfig).CookieLifeTime
#View Services
(Get-SPSecurityTokenServiceConfig).TrustedSecurityTokenServices

Monday, 8 February 2016

OneLiners in PowerShell with SharePoint for Project Server

#View Project Server realted Info
(Get-SPServiceApplication | ?{$_.Name -like "*Project*"}|Get-SPProjectWebInstance)
#View Project Server realted URL
(Get-SPServiceApplication | ?{$_.Name -like "*Project*"}|Get-SPProjectWebInstance).Url
#View Database Server for Project Server
(Get-SPServiceApplication | ?{$_.Name -like "*Project*"}|Get-SPProjectWebInstance).DatabaseServer
#View Database  Name for PRoject Server
(Get-SPServiceApplication | ?{$_.Name -like "*Project*"}|Get-SPProjectWebInstance).DatabaseNAme
#View Site  Name for PRoject Server
(Get-SPServiceApplication | ?{$_.Name -like "*Project*"}|Get-SPProjectWebInstance).Site
#Get Project Database Quota
Get-SPProjectDatabaseQuota -Url "http://w15-sp/PWA"
#View current state of a Project Web App database
Get-SPProjectDatabaseState -DatabaseServer w15-sp -Name ProjectWebApp
#Get values of an existing record in the Project Server internal watch list for the specified instance of Project Web App
Get-SPProjectLogLevelManager -Url "http://w15-sp/PWA"
#View the OData configuration for the instance of Project Web App
Get-SPProjectOdataConfiguration
#View the list of entities that have the MaxPageSizeOverride option configured
(Get-SPProjectOdataConfiguration).EntitySetsWithMaxPAgeSizeOverride
#View Project Settingss[MaximumIdleWorkersCount,MaximumWorkersCount,
#EditingSessionTimeout,MaximumSessionsPerUser,CachePersistence,MinimumMemoryRequired,
#RequestTimeLimits,ResponseSizeLimits,MaximumProjectSize]
Get-SPProjectPCSSettings -ServiceApplication "Project Server Service Application"
Get-SPServiceApplication | ?{$_.Name -like "*Project*"}|Get-SPProjectPCSSettings
# View Max Project File Size in GB (Get-SPServiceApplication | ?{$_.Name -like "*Project*"}|Get-SPProjectPCSSettings).MaximumProjectSize/1Gb
#View Permission Mode Get-SPProjectPermissionMode -Url "http://w15-sp/PWA"
#View Projecct Queue Settings
#MaxDegreeOfConcurrency,MsgRetryInterval,MsgRetryLimit,SqlRetryInterval
#SqlRetryLimit,SqlCommandTimeout ,CleanupSuccessAgeLimit,CleanupNonSuccessAgeLimit
#PeriodicTasksInterval,QueueTimeout,MaxConnections
Get-SPServiceApplication | ?{$_.Name -like "*Project*"}|Get-SPProjectQueueSettings
#View Maximum Connections for Project Server Queue
(Get-SPServiceApplication | ?{$_.Name -like "*Project*"}|Get-SPProjectQueueSettings).MaxConnections

Sunday, 7 February 2016

OneLiners in PowerShell for Accounts and User Profile

#the pluggable security trimmers that are associated with the User Profile service application proxy
Get-SPPluggableSecurityTrimmer -UserProfileApplicationProxyId $pr.Id
$pr= Get-SPServiceApplicationProxy | ? {$_.TypeName.Contains("Profile")}
#View Process Account
Get-SPProcessAccount
#View the company leader from specific user profile(Error ProfilePropertyCache does not have fc413acb-f0b1-4617-b2f3-f2ef93c7f8bb
Get-SPProfileLeader -ProfileServiceApplicationProxy $pr
#View Application Security for User Profile
#Error:UserProfileApplication.SqlSession has empty ApplicationID
Get-SPProfileServiceApplicationSecurity -ProfileServiceApplicationProxy $pr

Thursday, 4 February 2016

OneLiners for PowerShell with SharePoint for Managed Metada Service

#Get Managed Metada Servicce Application
Get-SPMetadataServiceApplication -Identity "Managed Metadata Service"
#Get ID of Managed Metada Service Application
(Get-SPMetadataServiceApplication -Identity "Managed Metadata Service").ID
#Get Status of Managed Metada Service Application
(Get-SPMetadataServiceApplication -Identity "Managed Metadata Service").Status
#Get Parent of Managed Metada Service Application     
(Get-SPMetadataServiceApplication -Identity "Managed Metadata Service").Parent 
#Get Version of Managed Metada Service Application
(Get-SPMetadataServiceApplication -Identity "Managed Metadata Service").Version        


 #View term stores within a web application
#Managed Metadata - Term Store and other information related to Search
$taxonomy=Get-SPTaxonomySession -Site "http://w15-sp"
#Default Keywords Term Store
$taxonomy.DefaultKeywordsTermStore
#Default Site Collection Term Store
$taxonomy.DefaultSiteCollectionTermStore
#Offline Term Store Names
$taxonomy.OfflineTermStoreNames
$taxonomy.TermStores
$termStore = $taxonomy.TermStores
$termStore.Count
$termStore|select NAme,Groups | format-list
$termGroups = $termStore|select Groups
#View all termssets
foreach($group in $termGroups.Groups)
{
$group | select Id,Description,Name,TermSets
}

OneLiners for PowerShell with SharePoint for Office store App Subscription


#Get the Office Store Default Activation setting Get-SPOfficeStoreAppsDefaultActivation -WebApplication http://intranet.contoso.com

#the Subscription ID setting for the tenant

Get-SPSiteSubscription | Get-SPOfficeStoreAppsDefaultActivation

Monday, 1 February 2016

OneLiners for PowerShell with SharePoint for HealthRule

#Health Analysis
#View all the Category
Get-SPHealthAnalysisRule | select Category -Unique
#View Health Anaylis for Security Category
Get-SPHealthAnalysisRule |?{$_.Category -eq "Security"}
#View Health Anaylis for Configuration Category
Get-SPHealthAnalysisRule |?{$_.Category -eq "Configuration"}
#View Health Anaylis for Availability Category
Get-SPHealthAnalysisRule |?{$_.Category -eq "Availability"}
#View Health Anaylis for Performance Category
Get-SPHealthAnalysisRule |?{$_.Category -eq "Performance"}
#View Health Anaylis for System Category
Get-SPHealthAnalysisRule |?{$_.Category -eq "System"}
#View Health Analysis for "TimerJobs"
Get-SPHealthAnalysisRule |?{$_.Name -like "*timerjob*"}
#View Health Analysis related to "InfoPath"
Get-SPHealthAnalysisRule |?{$_.Name -like "*Infopath*"}
#View Health Analysis related to "UserProfile"
Get-SPHealthAnalysisRule |?{$_.Name -like "*UserProfile*"}
#View Health Analysis related to "Farm"
Get-SPHealthAnalysisRule |?{$_.Name -like "*Farm*"}
#View Health Analysis related to "database"
Get-SPHealthAnalysisRule |?{$_.Name -like "*database*"}
Get-SPHealthAnalysisRule |?{$_.Summary -like "*database*"}