Вы находитесь на странице: 1из 4029

Contents

Reference
sharepoint-online
Add-SPOGeoAdministrator
Add-SPOHubSiteAssociation
Add-SPOHubToHubAssociation
Add-SPOOrgAssetsLibrary
Add-SPOSiteCollectionAppCatalog
Add-SPOSiteDesign
Add-SPOSiteDesignTask
Add-SPOSiteScript
Add-SPOTenantCdnOrigin
Add-SPOTheme
Add-SPOUser
Approve-SPOTenantServicePrincipalPermissionGrant
Approve-SPOTenantServicePrincipalPermissionRequest
Connect-SPOService
ConvertTo-SPOMigrationEncryptedPackage
ConvertTo-SPOMigrationTargetedPackage
Deny-SPOTenantServicePrincipalPermissionRequest
Disable-SPOTenantServicePrincipal
Disconnect-SPOService
Enable-SPOCommSite
Enable-SPOTenantServicePrincipal
Export-SPOQueryLogs
Export-SPOUserInfo
Export-SPOUserProfile
Get-SPOAppErrors
Get-SPOAppInfo
Get-SPOBrowserIdleSignOut
Get-SPOBuiltInDesignPackageVisibility
Get-SPOCrossGeoMovedUsers
Get-SPOCrossGeoMoveReport
Get-SPOCrossGeoUsers
Get-SPODataEncryptionPolicy
Get-SPODeletedSite
Get-SPOExternalUser
Get-SPOGeoAdministrator
Get-SPOGeoMoveCrossCompatibilityStatus
Get-SPOGeoStorageQuota
Get-SPOHideDefaultThemes
Get-SPOHomeSite
Get-SPOHubSite
Get-SPOMigrationJobProgress
Get-SPOMigrationJobStatus
Get-SPOMultiGeoCompanyAllowedDataLocation
Get-SPOMultiGeoExperience
Get-SPOOrgAssetsLibrary
Get-SPOOrgNewsSite
Get-SPOPublicCdnOrigins
Get-SPOSite
Get-SPOSiteCollectionAppCatalogs
Get-SPOSiteContentMoveState
Get-SPOSiteDataEncryptionPolicy
Get-SPOSiteDesign
Get-SPOSiteDesignRights
Get-SPOSiteDesignRun
Get-SPOSiteDesignRunStatus
Get-SPOSiteDesignTask
Get-SPOSiteGroup
Get-SPOSiteRenameState
Get-SPOSiteScript
Get-SPOSiteScriptFromList
Get-SPOSiteScriptFromWeb
Get-SPOSiteUserInvitations
Get-SPOStorageEntity
Get-SPOTenant
Get-SPOTenantCdnEnabled
Get-SPOTenantCdnOrigins
Get-SPOTenantCdnPolicies
Get-SPOTenantContentTypeReplicationParameters
Get-SPOTenantLogEntry
Get-SPOTenantLogLastAvailableTimeInUtc
Get-SPOTenantOrgRelation
Get-SPOTenantOrgRelationByPartner
Get-SPOTenantOrgRelationByScenario
Get-SPOTenantServicePrincipalPermissionGrants
Get-SPOTenantServicePrincipalPermissionRequests
Get-SPOTenantSyncClientRestriction
Get-SPOTenantTaxonomyReplicationParameters
Get-SPOTheme
Get-SPOUnifiedGroup
Get-SPOUnifiedGroupMoveState
Get-SPOUser
Get-SPOUserAndContentMoveState
Get-SPOUserOneDriveLocation
Get-SPOWebTemplate
Grant-SPOHubSiteRights
Grant-SPOSiteDesignRights
Invoke-SPOMigrationEncryptUploadSubmit
Invoke-SPOSiteDesign
Invoke-SPOSiteSwap
New-SPODataConnectionSetting
New-SPOMigrationEncryptionParameters
New-SPOMigrationPackage
New-SPOnlineApplicationPrincipalManagementServiceApplicationProxy
New-SPOPublicCdnOrigin
New-SPOSdnProvider
New-SPOSite
New-SPOSiteGroup
New-SPOTenantOrgRelation
Register-SPODataEncryptionPolicy
Register-SPOHubSite
Remove-SPODataConnectionSetting
Remove-SPODeletedSite
Remove-SPOExternalUser
Remove-SPOGeoAdministrator
Remove-SPOHomeSite
Remove-SPOHubSiteAssociation
Remove-SPOHubToHubAssociation
Remove-SPOMigrationJob
Remove-SPOMultiGeoCompanyAllowedDataLocation
Remove-SPOOrgAssetsLibrary
Remove-SPOOrgNewsSite
Remove-SPOPublicCdnOrigin
Remove-SPOSdnProvider
Remove-SPOSite
Remove-SPOSiteCollectionAppCatalog
Remove-SPOSiteCollectionAppCatalogById
Remove-SPOSiteDesign
Remove-SPOSiteDesignTask
Remove-SPOSiteGroup
Remove-SPOSiteScript
Remove-SPOSiteUserInvitations
Remove-SPOStorageEntity
Remove-SPOTenantCdnOrigin
Remove-SPOTenantOrgRelation
Remove-SPOTenantSyncClientRestriction
Remove-SPOTheme
Remove-SPOUser
Remove-SPOUserInfo
Remove-SPOUserProfile
Repair-SPOSite
Request-SPOPersonalSite
Request-SPOUpgradeEvaluationSite
Restore-SPODataEncryptionPolicy
Restore-SPODeletedSite
Revoke-SPOHubSiteRights
Revoke-SPOSiteDesignRights
Revoke-SPOTenantServicePrincipalPermission
Revoke-SPOUserSession
Set-SPOBrowserIdleSignOut
Set-SPOBuiltInDesignPackageVisibility
Set-SPODataConnectionSetting
Set-SPODataConnectionSettingMetadata
Set-SPOGeoStorageQuota
Set-SPOHideDefaultThemes
Set-SPOHomeSite
Set-SPOHubSite
Set-SPOMigrationPackageAzureSource
Set-SPOMultiGeoCompanyAllowedDataLocation
Set-SPOMultiGeoExperience
Set-SPOOrgAssetsLibrary
Set-SPOOrgNewsSite
Set-SPOSite
Set-SPOSiteDesign
Set-SPOSiteGroup
Set-SPOSiteOffice365Group
Set-SPOSiteScript
Set-SPOStorageEntity
Set-SPOTenant
Set-SPOTenantCdnEnabled
Set-SPOTenantCdnPolicy
Set-SPOTenantContentTypeReplicationParameters
Set-SPOTenantSyncClientRestriction
Set-SPOTenantTaxonomyReplicationParameters
Set-SPOUnifiedGroup
Set-SPOUser
Set-SPOWebTheme
Start-SPOSiteContentMove
Start-SPOSiteRename
Start-SPOUnifiedGroupMove
Start-SPOUserAndContentMove
Stop-SPOSiteContentMove
Stop-SPOUserAndContentMove
Submit-SPOMigrationJob
Test-SPOSite
Unregister-SPOHubSite
Update-SPODataEncryptionPolicy
Update-UserType
Upgrade-SPOSite
Verify-SPOTenantOrgRelation
sharepoint-pnp
Add-PnPAlert
Add-PnPApp
Add-PnPApplicationCustomizer
Add-PnPClientSidePage
Add-PnPClientSidePageSection
Add-PnPClientSideText
Add-PnPClientSideWebPart
Add-PnPContentType
Add-PnPContentTypeToDocumentSet
Add-PnPContentTypeToList
Add-PnPCustomAction
Add-PnPDataRowsToProvisioningTemplate
Add-PnPDocumentSet
Add-PnPEventReceiver
Add-PnPField
Add-PnPFieldFromXml
Add-PnPFieldToContentType
Add-PnPFile
Add-PnPFileToProvisioningTemplate
Add-PnPFolder
Add-PnPHtmlPublishingPageLayout
Add-PnPHubSiteAssociation
Add-PnPIndexedProperty
Add-PnPJavaScriptBlock
Add-PnPJavaScriptLink
Add-PnPListFoldersToProvisioningTemplate
Add-PnPListItem
Add-PnPMasterPage
Add-PnPNavigationNode
Add-PnPOffice365GroupToSite
Add-PnPOrgAssetsLibrary
Add-PnPOrgNewsSite
Add-PnPProvisioningTemplate
Add-PnPPublishingImageRendition
Add-PnPPublishingPage
Add-PnPPublishingPageLayout
Add-PnPRoleDefinition
Add-PnPSiteClassification
Add-PnPSiteCollectionAdmin
Add-PnPSiteCollectionAppCatalog
Add-PnPSiteDesign
Add-PnPSiteDesignTask
Add-PnPSiteScript
Add-PnPStoredCredential
Add-PnPTaxonomyField
Add-PnPTeamsTeam
Add-PnPTenantCdnOrigin
Add-PnPTenantSequence
Add-PnPTenantSequenceSite
Add-PnPTenantSequenceSubSite
Add-PnPTenantTheme
Add-PnPUserToGroup
Add-PnPView
Add-PnPWebhookSubscription
Add-PnPWebPartToWebPartPage
Add-PnPWebPartToWikiPage
Add-PnPWikiPage
Add-PnPWorkflowDefinition
Add-PnPWorkflowSubscription
Apply-PnPProvisioningTemplate
Apply-PnPTenantTemplate
Approve-PnPTenantServicePrincipalPermissionRequest
Clear-PnPDefaultColumnValues
Clear-PnPListItemAsRecord
Clear-PnpRecycleBinItem
Clear-PnPTenantRecycleBinItem
Connect-PnPMicrosoftGraph
Connect-PnPOnline
Convert-PnPFolderToProvisioningTemplate
Convert-PnPProvisioningTemplate
ConvertTo-PnPClientSidePage
Copy-PnPFile
Copy-PnPItemProxy
Deny-PnPTenantServicePrincipalPermissionRequest
Disable-PnPFeature
Disable-PnPInPlaceRecordsManagementForSite
Disable-PnPPowerShellTelemetry
Disable-PnPResponsiveUI
Disable-PnPSiteClassification
Disable-PnPTenantServicePrincipal
Disconnect-PnPOnline
Enable-PnPCommSite
Enable-PnPFeature
Enable-PnPInPlaceRecordsManagementForSite
Enable-PnPPowerShellTelemetry
Enable-PnPResponsiveUI
Enable-PnPSiteClassification
Enable-PnPTenantServicePrincipal
Export-PnPClientSidePage
Export-PnPClientSidePageMapping
Export-PnPListToProvisioningTemplate
Export-PnPTaxonomy
Export-PnPTermGroupToXml
Find-PnPFile
Get-PnPAccessToken
Get-PnPAlert
Get-PnPApp
Get-PnPAppAuthAccessToken
Get-PnPAppInstance
Get-PnPApplicationCustomizer
Get-PnPAuditing
Get-PnPAuthenticationRealm
Get-PnPAvailableClientSideComponents
Get-PnPAzureADManifestKeyCredentials
Get-PnPAzureCertificate
Get-PnPClientSideComponent
Get-PnPClientSidePage
Get-PnPConnection
Get-PnPContentType
Get-PnPContentTypePublishingHubUrl
Get-PnPContext
Get-PnPCustomAction
Get-PnPDefaultColumnValues
Get-PnPDeletedUnifiedGroup
Get-PnPDocumentSetTemplate
Get-PnPEventReceiver
Get-PnPException
Get-PnPFeature
Get-PnPField
Get-PnPFile
Get-PnPFolder
Get-PnPFolderItem
Get-PnPGroup
Get-PnPGroupMembers
Get-PnPGroupPermissions
Get-PnPHealthScore
Get-PnPHideDefaultThemes
Get-PnPHomePage
Get-PnPHomeSite
Get-PnPHubSite
Get-PnPHubSiteChild
Get-PnPIndexedPropertyKeys
Get-PnPInPlaceRecordsManagement
Get-PnPJavaScriptLink
Get-PnPLabel
Get-PnPList
Get-PnPListInformationRightsManagement
Get-PnPListItem
Get-PnPListRecordDeclaration
Get-PnPManagementApiAccessToken
Get-PnPMasterPage
Get-PnPNavigationNode
Get-PnPOrgAssetsLibrary
Get-PnPOrgNewsSite
Get-PnPPowerShellTelemetryEnabled
Get-PnPProperty
Get-PnPPropertyBag
Get-PnPProvisioningTemplate
Get-PnPProvisioningTemplateFromGallery
Get-PnPPublishingImageRendition
Get-PnPRecycleBinItem
Get-PnPRequestAccessEmails
Get-PnPRoleDefinition
Get-PnPSearchConfiguration
Get-PnPSearchCrawlLog
Get-PnPSearchSettings
Get-PnPSite
Get-PnPSiteClassification
Get-PnPSiteClosure
Get-PnPSiteCollectionAdmin
Get-PnPSiteCollectionTermStore
Get-PnPSiteDesign
Get-PnPSiteDesignRights
Get-PnPSiteDesignRun
Get-PnPSiteDesignRunStatus
Get-PnPSiteDesignTask
Get-PnPSitePolicy
Get-PnPSiteScript
Get-PnPSiteSearchQueryResults
Get-PnPStorageEntity
Get-PnPStoredCredential
Get-PnPSubWebs
Get-PnPTaxonomyItem
Get-PnPTaxonomySession
Get-PnPTenant
Get-PnPTenantAppCatalogUrl
Get-PnPTenantCdnEnabled
Get-PnPTenantCdnOrigin
Get-PnPTenantCdnPolicies
Get-PnPTenantId
Get-PnPTenantRecycleBinItem
Get-PnPTenantSequence
Get-PnPTenantSequenceSite
Get-PnPTenantServicePrincipal
Get-PnPTenantServicePrincipalPermissionGrants
Get-PnPTenantServicePrincipalPermissionRequests
Get-PnPTenantSite
Get-PnPTenantTemplate
Get-PnPTenantTheme
Get-PnPTerm
Get-PnPTermGroup
Get-PnPTermSet
Get-PnPTheme
Get-PnPTimeZoneId
Get-PnPUnifiedAuditLog
Get-PnPUnifiedGroup
Get-PnPUnifiedGroupMembers
Get-PnPUnifiedGroupOwners
Get-PnPUPABulkImportStatus
Get-PnPUser
Get-PnPUserProfileProperty
Get-PnPView
Get-PnPWeb
Get-PnPWebhookSubscriptions
Get-PnPWebPart
Get-PnPWebPartProperty
Get-PnPWebPartXml
Get-PnPWebTemplates
Get-PnPWikiPageContent
Get-PnPWorkflowDefinition
Get-PnPWorkflowInstance
Get-PnPWorkflowSubscription
Grant-PnPHubSiteRights
Grant-PnPSiteDesignRights
Grant-PnPTenantServicePrincipalPermission
Import-PnPAppPackage
Import-PnPTaxonomy
Import-PnPTermGroupFromXml
Import-PnPTermSet
Install-PnPApp
Install-PnPSolution
Invoke-PnPQuery
Invoke-PnPSiteDesign
Invoke-PnPSPRestMethod
Invoke-PnPWebAction
Measure-PnPList
Measure-PnPResponseTime
Measure-PnPWeb
Move-PnPClientSideComponent
Move-PnPFile
Move-PnPFolder
Move-PnPItemProxy
Move-PnPListItemToRecycleBin
Move-PnpRecycleBinItem
New-PnPAzureCertificate
New-PnPExtensibilityHandlerObject
New-PnPGroup
New-PnPList
New-PnPPersonalSite
New-PnPProvisioningTemplate
New-PnPProvisioningTemplateFromFolder
New-PnPSite
New-PnPTenantSequence
New-PnPTenantSequenceCommunicationSite
New-PnPTenantSequenceTeamNoGroupSite
New-PnPTenantSequenceTeamNoGroupSubSite
New-PnPTenantSequenceTeamSite
New-PnPTenantSite
New-PnPTenantTemplate
New-PnPTerm
New-PnPTermGroup
New-PnPTermSet
New-PnPUnifiedGroup
New-PnPUPABulkImportJob
New-PnPUser
New-PnPWeb
Publish-PnPApp
Read-PnPProvisioningTemplate
Read-PnPTenantTemplate
Register-PnPHubSite
Remove-PnPAlert
Remove-PnPApp
Remove-PnPApplicationCustomizer
Remove-PnPClientSideComponent
Remove-PnPClientSidePage
Remove-PnPContentType
Remove-PnPContentTypeFromDocumentSet
Remove-PnPContentTypeFromList
Remove-PnPCustomAction
Remove-PnPDeletedUnifiedGroup
Remove-PnPEventReceiver
Remove-PnPField
Remove-PnPFieldFromContentType
Remove-PnPFile
Remove-PnPFileFromProvisioningTemplate
Remove-PnPFolder
Remove-PnPGroup
Remove-PnPHomeSite
Remove-PnPHubSiteAssociation
Remove-PnPIndexedProperty
Remove-PnPJavaScriptLink
Remove-PnPList
Remove-PnPListItem
Remove-PnPNavigationNode
Remove-PnPOrgAssetsLibrary
Remove-PnPOrgNewsSite
Remove-PnPPropertyBagValue
Remove-PnPPublishingImageRendition
Remove-PnPRoleDefinition
Remove-PnPSearchConfiguration
Remove-PnPSiteClassification
Remove-PnPSiteCollectionAdmin
Remove-PnPSiteCollectionAppCatalog
Remove-PnPSiteDesign
Remove-PnPSiteDesignTask
Remove-PnPSiteScript
Remove-PnPStorageEntity
Remove-PnPStoredCredential
Remove-PnPTaxonomyItem
Remove-PnPTenantCdnOrigin
Remove-PnPTenantSite
Remove-PnPTenantTheme
Remove-PnPTermGroup
Remove-PnPUnifiedGroup
Remove-PnPUser
Remove-PnPUserFromGroup
Remove-PnPView
Remove-PnPWeb
Remove-PnPWebhookSubscription
Remove-PnPWebPart
Remove-PnPWikiPage
Remove-PnPWorkflowDefinition
Remove-PnPWorkflowSubscription
Rename-PnPFile
Rename-PnPFolder
Request-PnPAccessToken
Request-PnPReIndexList
Request-PnPReIndexWeb
Reset-PnPFileVersion
Reset-PnPLabel
Resolve-PnPFolder
Restore-PnPDeletedUnifiedGroup
Restore-PnpRecycleBinItem
Restore-PnPTenantRecycleBinItem
Resume-PnPWorkflowInstance
Revoke-PnPSiteDesignRights
Revoke-PnPTenantServicePrincipalPermission
Save-PnPClientSidePageConversionLog
Save-PnPProvisioningTemplate
Save-PnPTenantTemplate
Send-PnPMail
Set-PnPApplicationCustomizer
Set-PnPAppSideLoading
Set-PnPAuditing
Set-PnPAvailablePageLayouts
Set-PnPClientSidePage
Set-PnPClientSideText
Set-PnPClientSideWebPart
Set-PnPContext
Set-PnPDefaultColumnValues
Set-PnPDefaultContentTypeToList
Set-PnPDefaultPageLayout
Set-PnPDocumentSetField
Set-PnPField
Set-PnPFileCheckedIn
Set-PnPFileCheckedOut
Set-PnPFolderPermission
Set-PnPGroup
Set-PnPGroupPermissions
Set-PnPHideDefaultThemes
Set-PnPHomePage
Set-PnPHomeSite
Set-PnPHubSite
Set-PnPIndexedProperties
Set-PnPInPlaceRecordsManagement
Set-PnPLabel
Set-PnPList
Set-PnPListInformationRightsManagement
Set-PnPListItem
Set-PnPListItemAsRecord
Set-PnPListItemPermission
Set-PnPListPermission
Set-PnPListRecordDeclaration
Set-PnPMasterPage
Set-PnPMinimalDownloadStrategy
Set-PnPPropertyBagValue
Set-PnPProvisioningTemplateMetadata
Set-PnPRequestAccessEmails
Set-PnPSearchConfiguration
Set-PnPSearchSettings
Set-PnPSite
Set-PnPSiteClosure
Set-PnPSiteDesign
Set-PnPSitePolicy
Set-PnPSiteScript
Set-PnPStorageEntity
Set-PnPTaxonomyFieldValue
Set-PnPTenant
Set-PnPTenantCdnEnabled
Set-PnPTenantCdnPolicy
Set-PnPTenantSite
Set-PnPTheme
Set-PnPTraceLog
Set-PnPUnifiedGroup
Set-PnPUserProfileProperty
Set-PnPView
Set-PnPWeb
Set-PnPWebhookSubscription
Set-PnPWebPartProperty
Set-PnPWebPermission
Set-PnPWebTheme
Set-PnPWikiPageContent
Start-PnPWorkflowInstance
Stop-PnPWorkflowInstance
Submit-PnPSearchQuery
Sync-PnPAppToTeams
Test-PnPListItemIsRecord
Test-PnPOffice365GroupAliasIsUsed
Test-PnPTenantTemplate
Uninstall-PnPApp
Uninstall-PnPAppInstance
Uninstall-PnPSolution
Unpublish-PnPApp
Unregister-PnPHubSite
Update-PnPApp
Update-PnPSiteClassification
sharepoint-server
Add-DatabaseToAvailabilityGroup
Add-FASTSearchResource
Add-FASTSearchSpelltuning
Add-SPAppDeniedEndpoint
Add-SPClaimTypeMapping
Add-SPDiagnosticsPerformanceCounter
Add-SPDistributedCacheServiceInstance
Add-SPEduClassMember
Add-SPEduUser
Add-SPInfoPathUserAgent
Add-SPPluggableSecurityTrimmer
Add-SPProfileLeader
Add-SPProfileSyncConnection
Add-SPRoutingMachineInfo
Add-SPRoutingMachinePool
Add-SPRoutingRule
Add-SPScaleOutDatabase
Add-SPSecureStoreSystemAccount
Add-SPServerScaleOutDatabase
Add-SPServiceApplicationProxyGroupMember
Add-SPShellAdmin
Add-SPSiteSubscriptionFeaturePackMember
Add-SPSiteSubscriptionProfileConfig
Add-SPSolution
Add-SPThrottlingRule
Add-SPUserLicenseMapping
Add-SPUserSolution
Backup-SPConfigurationDatabase
Backup-SPEnterpriseSearchServiceApplicationIndex
Backup-SPFarm
Backup-SPSite
Clear-FASTSearchContentCollection
Clear-SPAppDeniedEndpointList
Clear-SPBusinessDataCatalogEntityNotificationWeb
Clear-SPContentDatabaseSyncData
Clear-SPDistributedCacheItem
Clear-SPLogLevel
Clear-SPMetadataWebServicePartitionData
Clear-SPPerformancePointServiceApplicationTrustedLocation
Clear-SPScaleOutDatabaseDeletedDataSubRange
Clear-SPScaleOutDatabaseLog
Clear-SPScaleOutDatabaseTenantData
Clear-SPSecureStoreCredentialMapping
Clear-SPSecureStoreDefaultProvider
Clear-SPServerScaleOutDatabaseDeletedDataSubRange
Clear-SPServerScaleOutDatabaseLog
Clear-SPServerScaleOutDatabaseTenantData
Clear-SPSiteSubscriptionBusinessDataCatalogConfig
Connect-SPConfigurationDatabase
Convert-SPWebApplication
Copy-SPAccessServicesDatabaseCredentials
Copy-SPActivitiesToWorkflowService
Copy-SPBusinessDataCatalogAclToChildren
Copy-SPContentTypes
Copy-SPSideBySideFiles
Copy-SPSite
Copy-SPTaxonomyGroups
Disable-ProjectServerLicense
Disable-SPAppAutoProvision
Disable-SPBusinessDataCatalogEntity
Disable-SPFeature
Disable-SPHealthAnalysisRule
Disable-SPInfoPathFormTemplate
Disable-SPProjectActiveDirectoryEnterpriseResourcePoolSync
Disable-SPProjectEmailNotification
Disable-SPProjectEnterpriseProjectTaskSync
Disable-SPProjectQueueStatsMonitoring
Disable-SPSessionStateService
Disable-SPSingleSignOn
Disable-SPTimerJob
Disable-SPUserLicensing
Disable-SPUserSolutionAllowList
Disable-SPWebApplicationHttpThrottling
Disable-SPWebTemplateForSiteMaster
Disconnect-SPConfigurationDatabase
Dismount-SPContentDatabase
Dismount-SPSiteMapDatabase
Dismount-SPStateServiceDatabase
Enable-ProjectServerLicense
Enable-SPAppAutoProvision
Enable-SPBusinessDataCatalogEntity
Enable-SPFeature
Enable-SPHealthAnalysisRule
Enable-SPInfoPathFormTemplate
Enable-SPProjectActiveDirectoryEnterpriseResourcePoolSync
Enable-SPProjectEmailNotification
Enable-SPProjectEnterpriseProjectTaskSync
Enable-SPProjectQueueStatsMonitoring
Enable-SPSessionStateService
Enable-SPTimerJob
Enable-SPUserLicensing
Enable-SPUserSolutionAllowList
Enable-SPWebApplicationHttpThrottling
Enable-SPWebTemplateForSiteMaster
Export-SPAccessServicesDatabase
Export-SPAppPackage
Export-SPBusinessDataCatalogModel
Export-SPEnterpriseSearchTopology
Export-SPInfoPathAdministrationFiles
Export-SPMetadataWebServicePartitionData
Export-SPPerformancePointContent
Export-SPScaleOutDatabaseTenantData
Export-SPServerScaleOutDatabaseTenantData
Export-SPSiteSubscriptionBusinessDataCatalogConfig
Export-SPSiteSubscriptionSettings
Export-SPTagsAndNotesData
Export-SPWeb
Get-AvailabilityGroupStatus
Get-FASTSearchContentCollection
Get-FASTSearchDocumentProcessingPipeline
Get-FASTSearchMetadataCategory
Get-FASTSearchMetadataCrawledProperty
Get-FASTSearchMetadataCrawledPropertyMapping
Get-FASTSearchMetadataFullTextIndex
Get-FASTSearchMetadataFullTextIndexMapping
Get-FASTSearchMetadataManagedProperty
Get-FASTSearchMetadataRankProfile
Get-FASTSearchResource
Get-FASTSearchSearchSettingGroup
Get-FASTSearchSecurityAliaser
Get-FASTSearchSecurityCCTKServer
Get-FASTSearchSecurityClaimsUserStore
Get-FASTSearchSecurityCompleteGroupExpansion
Get-FASTSearchSecurityDecodedSid
Get-FASTSearchSecurityDefaultUserStore
Get-FASTSearchSecurityEncodedSid
Get-FASTSearchSecurityGeneralSettings
Get-FASTSearchSecurityLogLevel
Get-FASTSearchSecurityLotusNotesUserStore
Get-FASTSearchSecurityPublicFilter
Get-FASTSearchSecurityRegexAliaser
Get-FASTSearchSecurityUserFilter
Get-FASTSearchSecurityUserStore
Get-FASTSearchSecurityUserStoreGroupExpansion
Get-FASTSearchSecurityWorkerNode
Get-FASTSearchSecurityXMLAliaser
Get-FASTSearchSpelltuningStatus
Get-ProjectServerLicense
Get-SPAccessServiceApplication
Get-SPAccessServicesApplication
Get-SPAccessServicesDatabase
Get-SPAccessServicesDatabaseServer
Get-SPAccessServicesDatabaseServerGroup
Get-SPAccessServicesDatabaseServerGroupMapping
Get-SPAlternateURL
Get-SPAppAcquisitionConfiguration
Get-SPAppAutoProvisionConnection
Get-SPAppDeniedEndpointList
Get-SPAppDisablingConfiguration
Get-SPAppDomain
Get-SPAppHostingQuotaConfiguration
Get-SPAppInstance
Get-SPAppPrincipal
Get-SPAppScaleProfile
Get-SPAppSiteSubscriptionName
Get-SPAppStateSyncLastRunTime
Get-SPAppStateUpdateInterval
Get-SPAppStoreConfiguration
Get-SPAppStoreWebServiceConfiguration
Get-SPAuthenticationProvider
Get-SPAuthenticationRealm
Get-SPBackupHistory
Get-SPBingMapsBlock
Get-SPBingMapsKey
Get-SPBrowserCustomerExperienceImprovementProgram
Get-SPBusinessDataCatalogEntityNotificationWeb
Get-SPBusinessDataCatalogMetadataObject
Get-SPBusinessDataCatalogThrottleConfig
Get-SPCertificateAuthority
Get-SPClaimProvider
Get-SPClaimProviderManager
Get-SPClaimTypeEncoding
Get-SPConnectedServiceApplicationInformation
Get-SPContentDatabase
Get-SPContentDatabaseOrphanedData
Get-SPContentDeploymentJob
Get-SPContentDeploymentPath
Get-SPCustomLayoutsPage
Get-SPDatabase
Get-SPDataConnectionFile
Get-SPDataConnectionFileDependent
Get-SPDeletedSite
Get-SPDesignerSettings
Get-SPDiagnosticConfig
Get-SPDiagnosticsPerformanceCounter
Get-SPDiagnosticsProvider
Get-SPDistributedCacheClientSetting
Get-SPEduServiceSetting
Get-SPEnterpriseSearchAdministrationComponent
Get-SPEnterpriseSearchComponent
Get-SPEnterpriseSearchContentEnrichmentConfiguration
Get-SPEnterpriseSearchCrawlContentSource
Get-SPEnterpriseSearchCrawlCustomConnector
Get-SPEnterpriseSearchCrawlDatabase
Get-SPEnterpriseSearchCrawlExtension
Get-SPEnterpriseSearchCrawlLogReadPermission
Get-SPEnterpriseSearchCrawlMapping
Get-SPEnterpriseSearchCrawlRule
Get-SPEnterpriseSearchFileFormat
Get-SPEnterpriseSearchHostController
Get-SPEnterpriseSearchLanguageResourcePhrase
Get-SPEnterpriseSearchLinguisticComponentsStatus
Get-SPEnterpriseSearchLinksDatabase
Get-SPEnterpriseSearchMetadataCategory
Get-SPEnterpriseSearchMetadataCrawledProperty
Get-SPEnterpriseSearchMetadataManagedProperty
Get-SPEnterpriseSearchMetadataMapping
Get-SPEnterpriseSearchOwner
Get-SPEnterpriseSearchPropertyRule
Get-SPEnterpriseSearchPropertyRuleCollection
Get-SPEnterpriseSearchQueryAndSiteSettingsService
Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance
Get-SPEnterpriseSearchQueryAndSiteSettingsServiceProxy
Get-SPEnterpriseSearchQueryAuthority
Get-SPEnterpriseSearchQueryDemoted
Get-SPEnterpriseSearchQueryKeyword
Get-SPEnterpriseSearchQueryScope
Get-SPEnterpriseSearchQueryScopeRule
Get-SPEnterpriseSearchQuerySpellingCorrection
Get-SPEnterpriseSearchQuerySuggestionCandidates
Get-SPEnterpriseSearchRankingModel
Get-SPEnterpriseSearchResultItemType
Get-SPEnterpriseSearchResultSource
Get-SPEnterpriseSearchSecurityTrimmer
Get-SPEnterpriseSearchService
Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchServiceApplicationBackupStore
Get-SPEnterpriseSearchServiceApplicationProxy
Get-SPEnterpriseSearchServiceInstance
Get-SPEnterpriseSearchSiteHitRule
Get-SPEnterpriseSearchStatus
Get-SPEnterpriseSearchTopology
Get-SPEnterpriseSearchVssDataPath
Get-SPExcelBIServer
Get-SPExcelBlockedFileType
Get-SPExcelDataConnectionLibrary
Get-SPExcelDataProvider
Get-SPExcelFileLocation
Get-SPExcelServiceApplication
Get-SPExcelUserDefinedFunction
Get-SPFarm
Get-SPFarmConfig
Get-SPFeature
Get-SPHealthAnalysisRule
Get-SPHelpCollection
Get-SPInfoPathFormsService
Get-SPInfoPathFormTemplate
Get-SPInfoPathUserAgent
Get-SPInfoPathWebServiceProxy
Get-SPInsightsConfig
Get-SPInternalAppStateSyncLastRunTime
Get-SPInternalAppStateUpdateInterval
Get-SPIRMSettings
Get-SPLogEvent
Get-SPLogLevel
Get-SPManagedAccount
Get-SPManagedPath
Get-SPMetadataServiceApplication
Get-SPMetadataServiceApplicationProxy
Get-SPMicrofeedOptions
Get-SPMobileMessagingAccount
Get-SPO365LinkSettings
Get-SPODataConnectionSetting
Get-SPODataConnectionSettingMetadata
Get-SPOfficeStoreAppsDefaultActivation
Get-SPPendingUpgradeActions
Get-SPPerformancePointServiceApplication
Get-SPPerformancePointServiceApplicationTrustedLocation
Get-SPPluggableSecurityTrimmer
Get-SPProcessAccount
Get-SPProduct
Get-SPProfileLeader
Get-SPProfileServiceApplicationSecurity
Get-SPProjectDatabaseQuota
Get-SPProjectDatabaseUsage
Get-SPProjectEnterpriseProjectTaskSync
Get-SPProjectEventServiceSettings
Get-SPProjectIsEmailNotificationEnabled
Get-SPProjectOdataConfiguration
Get-SPProjectPCSSettings
Get-SPProjectPermissionMode
Get-SPProjectQueueSettings
Get-SPProjectWebInstance
Get-SPRequestManagementSettings
Get-SPRoutingMachineInfo
Get-SPRoutingMachinePool
Get-SPRoutingRule
Get-SPScaleOutDatabase
Get-SPScaleOutDatabaseDataState
Get-SPScaleOutDatabaseInconsistency
Get-SPScaleOutDatabaseLogEntry
Get-SPSecureStoreApplication
Get-SPSecureStoreSystemAccount
Get-SPSecurityTokenServiceConfig
Get-SPServer
Get-SPServerScaleOutDatabase
Get-SPServerScaleOutDatabaseDataState
Get-SPServerScaleOutDatabaseInconsistency
Get-SPServerScaleOutDatabaseLogEntry
Get-SPService
Get-SPServiceApplication
Get-SPServiceApplicationEndpoint
Get-SPServiceApplicationPool
Get-SPServiceApplicationProxy
Get-SPServiceApplicationProxyGroup
Get-SPServiceApplicationSecurity
Get-SPServiceContext
Get-SPServiceHostConfig
Get-SPServiceInstance
Get-SPSessionStateService
Get-SPShellAdmin
Get-SPSite
Get-SPSiteAdministration
Get-SPSiteMapDatabase
Get-SPSiteMaster
Get-SPSiteSubscription
Get-SPSiteSubscriptionConfig
Get-SPSiteSubscriptionEdiscoveryHub
Get-SPSiteSubscriptionEdiscoverySearchScope
Get-SPSiteSubscriptionFeaturePack
Get-SPSiteSubscriptionIRMConfig
Get-SPSiteSubscriptionMetadataConfig
Get-SPSiteUpgradeSessionInfo
Get-SPSiteURL
Get-SPSolution
Get-SPStateServiceApplication
Get-SPStateServiceApplicationProxy
Get-SPStateServiceDatabase
Get-SPTaxonomySession
Get-SPThrottlingRule
Get-SPTimerJob
Get-SPTopologyServiceApplication
Get-SPTopologyServiceApplicationProxy
Get-SPTranslationThrottlingSetting
Get-SPTrustedIdentityTokenIssuer
Get-SPTrustedRootAuthority
Get-SPTrustedSecurityTokenIssuer
Get-SPTrustedServiceTokenIssuer
Get-SPUpgradeActions
Get-SPUsageApplication
Get-SPUsageDefinition
Get-SPUsageService
Get-SPUser
Get-SPUserLicense
Get-SPUserLicenseMapping
Get-SPUserLicensing
Get-SPUserSettingsProvider
Get-SPUserSettingsProviderManager
Get-SPUserSolution
Get-SPUserSolutionAllowList
Get-SPVisioExternalData
Get-SPVisioPerformance
Get-SPVisioSafeDataProvider
Get-SPVisioServiceApplication
Get-SPVisioServiceApplicationProxy
Get-SPWeb
Get-SPWebApplication
Get-SPWebApplicationAppDomain
Get-SPWebApplicationHttpThrottlingMonitor
Get-SPWebPartPack
Get-SPWebTemplate
Get-SPWebTemplatesEnabledForSiteMaster
Get-SPWOPIBinding
Get-SPWOPISuppressionSetting
Get-SPWOPIZone
Get-SPWorkflowConfig
Get-SPWorkflowServiceApplicationProxy
Grant-SPBusinessDataCatalogMetadataObject
Grant-SPObjectSecurity
Import-SPAccessServicesDatabase
Import-SPAppPackage
Import-SPBusinessDataCatalogDotNetAssembly
Import-SPBusinessDataCatalogModel
Import-SPEnterpriseSearchCustomExtractionDictionary
Import-SPEnterpriseSearchPopularQueries
Import-SPEnterpriseSearchThesaurus
Import-SPEnterpriseSearchTopology
Import-SPInfoPathAdministrationFiles
Import-SPMetadataWebServicePartitionData
Import-SPPerformancePointContent
Import-SPScaleOutDatabaseTenantData
Import-SPServerScaleOutDatabaseTenantData
Import-SPSiteSubscriptionBusinessDataCatalogConfig
Import-SPSiteSubscriptionSettings
Import-SPWeb
Initialize-SPResourceSecurity
Initialize-SPStateServiceDatabase
Install-FASTSearchAdminDatabase
Install-SPApp
Install-SPApplicationContent
Install-SPDataConnectionFile
Install-SPEduSites
Install-SPFeature
Install-SPHelpCollection
Install-SPInfoPathFormTemplate
Install-SPService
Install-SPSolution
Install-SPUserSolution
Install-SPWebPartPack
Invoke-SPProjectActiveDirectoryEnterpriseResourcePoolSync
Invoke-SPProjectActiveDirectoryGroupSync
Merge-SPLogFile
Merge-SPUsageLog
Migrate-SPDatabase
Migrate-SPProjectDatabase
Migrate-SPProjectResourcePlans
Mount-SPContentDatabase
Mount-SPSiteMapDatabase
Mount-SPStateServiceDatabase
Move-SPAppManagementData
Move-SPBlobStorageLocation
Move-SPDeletedSite
Move-SPEnterpriseSearchLinksDatabases
Move-SPProfileManagedMetadataProperty
Move-SPSite
Move-SPSocialComment
Move-SPUser
New-FASTSearchContentCollection
New-FASTSearchMetadataCategory
New-FASTSearchMetadataCrawledProperty
New-FASTSearchMetadataCrawledPropertyMapping
New-FASTSearchMetadataFullTextIndex
New-FASTSearchMetadataFullTextIndexMapping
New-FASTSearchMetadataManagedProperty
New-FASTSearchMetadataRankProfile
New-FASTSearchSearchSettingGroup
New-FASTSearchSecurityClaimsUserStore
New-FASTSearchSecurityLotusNotesUserStore
New-FASTSearchSecurityRegexAliaser
New-FASTSearchSecurityRegexAliaserPattern
New-FASTSearchSecurityXMLAliaser
New-SPAccessServiceApplication
New-SPAccessServicesApplication
New-SPAccessServicesApplicationProxy
New-SPAccessServicesDatabaseServer
New-SPAlternateURL
New-SPAppManagementServiceApplication
New-SPAppManagementServiceApplicationProxy
New-SPAuthenticationProvider
New-SPAzureAccessControlServiceApplicationProxy
New-SPBECWebServiceApplicationProxy
New-SPBusinessDataCatalogServiceApplication
New-SPBusinessDataCatalogServiceApplicationProxy
New-SPCentralAdministration
New-SPClaimProvider
New-SPClaimsPrincipal
New-SPClaimTypeEncoding
New-SPClaimTypeMapping
New-SPConfigurationDatabase
New-SPContentDatabase
New-SPContentDeploymentJob
New-SPContentDeploymentPath
New-SPEduClass
New-SPEnterpriseSearchAdminComponent
New-SPEnterpriseSearchAnalyticsProcessingComponent
New-SPEnterpriseSearchContentEnrichmentConfiguration
New-SPEnterpriseSearchContentProcessingComponent
New-SPEnterpriseSearchCrawlComponent
New-SPEnterpriseSearchCrawlContentSource
New-SPEnterpriseSearchCrawlCustomConnector
New-SPEnterpriseSearchCrawlDatabase
New-SPEnterpriseSearchCrawlExtension
New-SPEnterpriseSearchCrawlMapping
New-SPEnterpriseSearchCrawlRule
New-SPEnterpriseSearchFileFormat
New-SPEnterpriseSearchIndexComponent
New-SPEnterpriseSearchLanguageResourcePhrase
New-SPEnterpriseSearchLinksDatabase
New-SPEnterpriseSearchMetadataCategory
New-SPEnterpriseSearchMetadataCrawledProperty
New-SPEnterpriseSearchMetadataManagedProperty
New-SPEnterpriseSearchMetadataMapping
New-SPEnterpriseSearchQueryAuthority
New-SPEnterpriseSearchQueryDemoted
New-SPEnterpriseSearchQueryKeyword
New-SPEnterpriseSearchQueryProcessingComponent
New-SPEnterpriseSearchQueryScope
New-SPEnterpriseSearchQueryScopeRule
New-SPEnterpriseSearchRankingModel
New-SPEnterpriseSearchResultItemType
New-SPEnterpriseSearchResultSource
New-SPEnterpriseSearchSecurityTrimmer
New-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchServiceApplicationProxy
New-SPEnterpriseSearchSiteHitRule
New-SPEnterpriseSearchTopology
New-SPExcelBIServer
New-SPExcelBlockedFileType
New-SPExcelDataConnectionLibrary
New-SPExcelDataProvider
New-SPExcelFileLocation
New-SPExcelServiceApplication
New-SPExcelUserDefinedFunction
New-SPLogFile
New-SPManagedAccount
New-SPManagedPath
New-SPMarketplaceWebServiceApplicationProxy
New-SPMetadataServiceApplication
New-SPMetadataServiceApplicationProxy
New-SPPerformancePointServiceApplication
New-SPPerformancePointServiceApplicationProxy
New-SPPerformancePointServiceApplicationTrustedLocation
New-SPPowerPointConversionServiceApplication
New-SPPowerPointConversionServiceApplicationProxy
New-SPProfileServiceApplication
New-SPProfileServiceApplicationProxy
New-SPProjectServiceApplication
New-SPProjectServiceApplicationProxy
New-SPRequestManagementRuleCriteria
New-SPSecureStoreApplication
New-SPSecureStoreApplicationField
New-SPSecureStoreServiceApplication
New-SPSecureStoreServiceApplicationProxy
New-SPSecureStoreTargetApplication
New-SPServiceApplicationPool
New-SPServiceApplicationProxyGroup
New-SPSite
New-SPSiteMaster
New-SPSiteSubscription
New-SPSiteSubscriptionFeaturePack
New-SPStateServiceApplication
New-SPStateServiceApplicationProxy
New-SPStateServiceDatabase
New-SPSubscriptionSettingsServiceApplication
New-SPSubscriptionSettingsServiceApplicationProxy
New-SPTranslationServiceApplication
New-SPTranslationServiceApplicationProxy
New-SPTrustedIdentityTokenIssuer
New-SPTrustedRootAuthority
New-SPTrustedSecurityTokenIssuer
New-SPTrustedServiceTokenIssuer
New-SPUsageApplication
New-SPUsageLogFile
New-SPUser
New-SPUserLicenseMapping
New-SPUserSettingsProvider
New-SPUserSolutionAllowList
New-SPVisioSafeDataProvider
New-SPVisioServiceApplication
New-SPVisioServiceApplicationProxy
New-SPWeb
New-SPWebApplication
New-SPWebApplicationAppDomain
New-SPWebApplicationExtension
New-SPWOPIBinding
New-SPWOPISuppressionSetting
New-SPWordConversionServiceApplication
New-SPWorkflowServiceApplicationProxy
New-SPWorkManagementServiceApplication
New-SPWorkManagementServiceApplicationProxy
Pause-SPProjectWebInstance
Publish-SPServiceApplication
Receive-SPServiceApplicationConnectionInfo
Register-SPAppPrincipal
Register-SPWorkflowService
Remove-DatabaseFromAvailabilityGroup
Remove-FASTSearchContentCollection
Remove-FASTSearchMetadataCategory
Remove-FASTSearchMetadataCrawledPropertyMapping
Remove-FASTSearchMetadataFullTextIndex
Remove-FASTSearchMetadataFullTextIndexMapping
Remove-FASTSearchMetadataManagedProperty
Remove-FASTSearchMetadataRankProfile
Remove-FASTSearchResource
Remove-FASTSearchSearchSettingGroup
Remove-FASTSearchSecurityAliaser
Remove-FASTSearchSecurityUserStore
Remove-FASTSearchSpelltuning
Remove-SPAccessServicesDatabaseServer
Remove-SPActivityFeedItems
Remove-SPAlternateURL
Remove-SPAppDeniedEndpoint
Remove-SPApplicationCredentialKey
Remove-SPAppPrincipalPermission
Remove-SPBusinessDataCatalogModel
Remove-SPCentralAdministration
Remove-SPClaimProvider
Remove-SPClaimTypeMapping
Remove-SPConfigurationDatabase
Remove-SPContentDatabase
Remove-SPContentDeploymentJob
Remove-SPContentDeploymentPath
Remove-SPDeletedSite
Remove-SPDiagnosticsPerformanceCounter
Remove-SPDistributedCacheServiceInstance
Remove-SPEduClassMember
Remove-SPEnterpriseSearchComponent
Remove-SPEnterpriseSearchContentEnrichmentConfiguration
Remove-SPEnterpriseSearchCrawlContentSource
Remove-SPEnterpriseSearchCrawlCustomConnector
Remove-SPEnterpriseSearchCrawlDatabase
Remove-SPEnterpriseSearchCrawlExtension
Remove-SPEnterpriseSearchCrawlLogReadPermission
Remove-SPEnterpriseSearchCrawlMapping
Remove-SPEnterpriseSearchCrawlRule
Remove-SPEnterpriseSearchFileFormat
Remove-SPEnterpriseSearchLanguageResourcePhrase
Remove-SPEnterpriseSearchLinksDatabase
Remove-SPEnterpriseSearchMetadataCategory
Remove-SPEnterpriseSearchMetadataManagedProperty
Remove-SPEnterpriseSearchMetadataMapping
Remove-SPEnterpriseSearchQueryAuthority
Remove-SPEnterpriseSearchQueryDemoted
Remove-SPEnterpriseSearchQueryKeyword
Remove-SPEnterpriseSearchQueryScope
Remove-SPEnterpriseSearchQueryScopeRule
Remove-SPEnterpriseSearchRankingModel
Remove-SPEnterpriseSearchResultItemType
Remove-SPEnterpriseSearchResultSource
Remove-SPEnterpriseSearchSecurityTrimmer
Remove-SPEnterpriseSearchServiceApplication
Remove-SPEnterpriseSearchServiceApplicationProxy
Remove-SPEnterpriseSearchServiceApplicationSiteSettings
Remove-SPEnterpriseSearchSiteHitRule
Remove-SPEnterpriseSearchTenantConfiguration
Remove-SPEnterpriseSearchTenantSchema
Remove-SPEnterpriseSearchTopology
Remove-SPExcelBIServer
Remove-SPExcelBlockedFileType
Remove-SPExcelDataConnectionLibrary
Remove-SPExcelDataProvider
Remove-SPExcelFileLocation
Remove-SPExcelUserDefinedFunction
Remove-SPInfoPathUserAgent
Remove-SPManagedAccount
Remove-SPManagedPath
Remove-SPPerformancePointServiceApplication
Remove-SPPerformancePointServiceApplicationProxy
Remove-SPPerformancePointServiceApplicationTrustedLocation
Remove-SPPluggableSecurityTrimmer
Remove-SPProfileLeader
Remove-SPProfileSyncConnection
Remove-SPProjectWebInstanceData
Remove-SPRoutingMachineInfo
Remove-SPRoutingMachinePool
Remove-SPRoutingRule
Remove-SPScaleOutDatabase
Remove-SPSecureStoreApplication
Remove-SPSecureStoreSystemAccount
Remove-SPServerScaleOutDatabase
Remove-SPServiceApplication
Remove-SPServiceApplicationPool
Remove-SPServiceApplicationProxy
Remove-SPServiceApplicationProxyGroup
Remove-SPServiceApplicationProxyGroupMember
Remove-SPShellAdmin
Remove-SPSite
Remove-SPSiteMaster
Remove-SPSiteSubscription
Remove-SPSiteSubscriptionBusinessDataCatalogConfig
Remove-SPSiteSubscriptionFeaturePack
Remove-SPSiteSubscriptionFeaturePackMember
Remove-SPSiteSubscriptionMetadataConfig
Remove-SPSiteSubscriptionProfileConfig
Remove-SPSiteSubscriptionSettings
Remove-SPSiteUpgradeSessionInfo
Remove-SPSiteURL
Remove-SPSocialItemByDate
Remove-SPSolution
Remove-SPSolutionDeploymentLock
Remove-SPStateServiceDatabase
Remove-SPThrottlingRule
Remove-SPTranslationServiceJobHistory
Remove-SPTrustedIdentityTokenIssuer
Remove-SPTrustedRootAuthority
Remove-SPTrustedSecurityTokenIssuer
Remove-SPTrustedServiceTokenIssuer
Remove-SPUsageApplication
Remove-SPUser
Remove-SPUserLicenseMapping
Remove-SPUserSettingsProvider
Remove-SPUserSolution
Remove-SPVisioSafeDataProvider
Remove-SPWeb
Remove-SPWebApplication
Remove-SPWebApplicationAppDomain
Remove-SPWOPIBinding
Remove-SPWOPISuppressionSetting
Remove-SPWordConversionServiceJobHistory
Rename-SPServer
Repair-SPManagedAccountDeployment
Repair-SPProjectWebInstance
Repair-SPSite
Request-SPUpgradeEvaluationSite
Reset-SPAccessServicesDatabasePassword
Reset-SPProjectEventServiceSettings
Reset-SPProjectPCSSettings
Reset-SPProjectQueueSettings
Reset-SPSites
Restart-SPAppInstanceJob
Restore-SPDeletedSite
Restore-SPEnterpriseSearchServiceApplication
Restore-SPEnterpriseSearchServiceApplicationIndex
Restore-SPFarm
Restore-SPSite
Resume-SPEnterpriseSearchServiceApplication
Resume-SPProjectWebInstance
Resume-SPStateServiceDatabase
Revoke-SPBusinessDataCatalogMetadataObject
Revoke-SPObjectSecurity
Set-FASTSearchConfiguration
Set-FASTSearchIPSec
Set-FASTSearchMetadataCategory
Set-FASTSearchMetadataCrawledProperty
Set-FASTSearchMetadataCrawledPropertyMapping
Set-FASTSearchMetadataFullTextIndex
Set-FASTSearchMetadataFullTextIndexMapping
Set-FASTSearchMetadataManagedProperty
Set-FASTSearchMetadataRankProfile
Set-FASTSearchSecurityCCTKServer
Set-FASTSearchSecurityClaimsUserStore
Set-FASTSearchSecurityDefaultUserStore
Set-FASTSearchSecurityLogLevel
Set-FASTSearchSecurityLotusNotesUserStore
Set-FASTSearchSecurityPublicFilter
Set-FASTSearchSecurityRegexAliaser
Set-FASTSearchSecurityXMLAliaser
Set-SPAccessServiceApplication
Set-SPAccessServicesApplication
Set-SPAccessServicesDatabaseServer
Set-SPAccessServicesDatabaseServerGroupMapping
Set-SPAlternateURL
Set-SPAppAcquisitionConfiguration
Set-SPAppAutoProvisionConnection
Set-SPAppDisablingConfiguration
Set-SPAppDomain
Set-SPAppHostingQuotaConfiguration
Set-SPApplicationCredentialKey
Set-SPAppManagementDeploymentId
Set-SPAppPrincipalPermission
Set-SPAppScaleProfile
Set-SPAppSiteDomain
Set-SPAppSiteSubscriptionName
Set-SPAppStateUpdateInterval
Set-SPAppStoreConfiguration
Set-SPAppStoreWebServiceConfiguration
Set-SPAuthenticationRealm
Set-SPBingMapsBlock
Set-SPBingMapsKey
Set-SPBrowserCustomerExperienceImprovementProgram
Set-SPBusinessDataCatalogEntityNotificationWeb
Set-SPBusinessDataCatalogMetadataObject
Set-SPBusinessDataCatalogServiceApplication
Set-SPBusinessDataCatalogThrottleConfig
Set-SPCentralAdministration
Set-SPClaimProvider
Set-SPContentDatabase
Set-SPContentDeploymentJob
Set-SPContentDeploymentPath
Set-SPCustomLayoutsPage
Set-SPDataConnectionFile
Set-SPDefaultProfileConfig
Set-SPDesignerSettings
Set-SPDiagnosticConfig
Set-SPDiagnosticsProvider
Set-SPDistributedCacheClientSetting
Set-SPEduServiceSetting
Set-SPEnterpriseSearchAdministrationComponent
Set-SPEnterpriseSearchContentEnrichmentConfiguration
Set-SPEnterpriseSearchCrawlContentSource
Set-SPEnterpriseSearchCrawlDatabase
Set-SPEnterpriseSearchCrawlLogReadPermission
Set-SPEnterpriseSearchCrawlRule
Set-SPEnterpriseSearchFileFormatState
Set-SPEnterpriseSearchLinguisticComponentsStatus
Set-SPEnterpriseSearchLinksDatabase
Set-SPEnterpriseSearchMetadataCategory
Set-SPEnterpriseSearchMetadataCrawledProperty
Set-SPEnterpriseSearchMetadataManagedProperty
Set-SPEnterpriseSearchMetadataMapping
Set-SPEnterpriseSearchPrimaryHostController
Set-SPEnterpriseSearchQueryAuthority
Set-SPEnterpriseSearchQueryKeyword
Set-SPEnterpriseSearchQueryScope
Set-SPEnterpriseSearchQueryScopeRule
Set-SPEnterpriseSearchQuerySpellingCorrection
Set-SPEnterpriseSearchRankingModel
Set-SPEnterpriseSearchResultItemType
Set-SPEnterpriseSearchResultSource
Set-SPEnterpriseSearchService
Set-SPEnterpriseSearchServiceApplication
Set-SPEnterpriseSearchServiceApplicationProxy
Set-SPEnterpriseSearchServiceInstance
Set-SPEnterpriseSearchTopology
Set-SPExcelBIServer
Set-SPExcelDataConnectionLibrary
Set-SPExcelDataProvider
Set-SPExcelFileLocation
Set-SPExcelServiceApplication
Set-SPExcelUserDefinedFunction
Set-SPFarmConfig
Set-SPInfoPathFormsService
Set-SPInfoPathFormTemplate
Set-SPInfoPathWebServiceProxy
Set-SPInternalAppStateUpdateInterval
Set-SPIRMSettings
Set-SPLogLevel
Set-SPManagedAccount
Set-SPMetadataServiceApplication
Set-SPMetadataServiceApplicationProxy
Set-SPMicrofeedOptions
Set-SPMobileMessagingAccount
Set-SPO365LinkSettings
Set-SPOfficeStoreAppsDefaultActivation
Set-SPPassPhrase
Set-SPPerformancePointSecureDataValues
Set-SPPerformancePointServiceApplication
Set-SPPowerPointConversionServiceApplication
Set-SPProfileServiceApplication
Set-SPProfileServiceApplicationProxy
Set-SPProfileServiceApplicationSecurity
Set-SPProjectDatabaseQuota
Set-SPProjectEventServiceSettings
Set-SPProjectOdataConfiguration
Set-SPProjectPCSSettings
Set-SPProjectPermissionMode
Set-SPProjectQueueSettings
Set-SPProjectServiceApplication
Set-SPProjectUserSync
Set-SPProjectUserSyncDisabledSyncThreshold
Set-SPProjectUserSyncFullSyncThreshold
Set-SPProjectUserSyncOffPeakSyncThreshold
Set-SPRequestManagementSettings
Set-SPRoutingMachineInfo
Set-SPRoutingMachinePool
Set-SPRoutingRule
Set-SPScaleOutDatabaseDataRange
Set-SPScaleOutDatabaseDataSubRange
Set-SPSecureStoreApplication
Set-SPSecureStoreDefaultProvider
Set-SPSecureStoreServiceApplication
Set-SPSecurityTokenServiceConfig
Set-SPServer
Set-SPServerScaleOutDatabaseDataRange
Set-SPServerScaleOutDatabaseDataSubRange
Set-SPServiceApplication
Set-SPServiceApplicationEndpoint
Set-SPServiceApplicationPool
Set-SPServiceApplicationSecurity
Set-SPServiceHostConfig
Set-SPSessionStateService
Set-SPSite
Set-SPSiteAdministration
Set-SPSiteSubscriptionConfig
Set-SPSiteSubscriptionEdiscoveryHub
Set-SPSiteSubscriptionIRMConfig
Set-SPSiteSubscriptionMetadataConfig
Set-SPSiteSubscriptionProfileConfig
Set-SPSiteURL
Set-SPStateServiceApplication
Set-SPStateServiceApplicationProxy
Set-SPStateServiceDatabase
Set-SPSubscriptionSettingsServiceApplication
Set-SPThrottlingRule
Set-SPTimerJob
Set-SPTopologyServiceApplication
Set-SPTopologyServiceApplicationProxy
Set-SPTranslationServiceApplication
Set-SPTranslationServiceApplicationProxy
Set-SPTranslationThrottlingSetting
Set-SPTrustedIdentityTokenIssuer
Set-SPTrustedRootAuthority
Set-SPTrustedSecurityTokenIssuer
Set-SPTrustedServiceTokenIssuer
Set-SPUsageApplication
Set-SPUsageDefinition
Set-SPUsageService
Set-SPUser
Set-SPVisioExternalData
Set-SPVisioPerformance
Set-SPVisioSafeDataProvider
Set-SPVisioServiceApplication
Set-SPWeb
Set-SPWebApplication
Set-SPWebApplicationHttpThrottlingMonitor
Set-SPWOPIBinding
Set-SPWOPIZone
Set-SPWordConversionServiceApplication
Set-SPWorkflowConfig
Set-SPWorkManagementServiceApplication
Set-SPWorkManagementServiceApplicationProxy
Split-SPScaleOutDatabase
Split-SPServerScaleOutDatabase
Start-SPAdminJob
Start-SPAssignment
Start-SPContentDeploymentJob
Start-SPDiagnosticsSession
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance
Start-SPEnterpriseSearchServiceInstance
Start-SPInfoPathFormTemplate
Start-SPProjectGenerateWsdl
Start-SPService
Start-SPServiceInstance
Start-SPTimerJob
Stop-SPAssignment
Stop-SPContentTypeReplication
Stop-SPDiagnosticsSession
Stop-SPDistributedCacheServiceInstance
Stop-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance
Stop-SPEnterpriseSearchServiceInstance
Stop-SPInfoPathFormTemplate
Stop-SPService
Stop-SPServiceInstance
Stop-SPTaxonomyReplication
Suspend-SPEnterpriseSearchServiceApplication
Suspend-SPStateServiceDatabase
Sync-SPProjectPermissions
Test-SPContentDatabase
Test-SPInfoPathFormTemplate
Test-SPO365LinkSettings
Test-SPProjectServiceApplication
Test-SPProjectWebInstance
Test-SPSite
Uninstall-FASTSearchAdminDatabase
Uninstall-SPAppInstance
Uninstall-SPDataConnectionFile
Uninstall-SPFeature
Uninstall-SPHelpCollection
Uninstall-SPInfoPathFormTemplate
Uninstall-SPSolution
Uninstall-SPUserSolution
Uninstall-SPWebPartPack
Unpublish-SPServiceApplication
Update-SPAppCatalogConfiguration
Update-SPAppInstance
Update-SPDistributedCacheSize
Update-SPFarmEncryptionKey
Update-SPHelp
Update-SPInfoPathAdminFileUrl
Update-SPInfoPathFormTemplate
Update-SPInfoPathUserFileUrl
Update-SPProfilePhotoStore
Update-SPProfileSync
Update-SPRepopulateMicroblogFeedCache
Update-SPRepopulateMicroblogLMTCache
Update-SPSecureStoreApplicationServerKey
Update-SPSecureStoreCredentialMapping
Update-SPSecureStoreGroupCredentialMapping
Update-SPSecureStoreMasterKey
Update-SPSolution
Update-SPUserSolution
Update-SPWOPIProofKey
Upgrade-SPAppManagementServiceApplication
Upgrade-SPContentDatabase
Upgrade-SPEnterpriseSearchServiceApplication
Upgrade-SPEnterpriseSearchServiceApplicationSiteSettings
Upgrade-SPFarm
Upgrade-SPProfileServiceApplication
Upgrade-SPSingleSignOnDatabase
Upgrade-SPSite
Upgrade-SPSiteMapDatabase
minutes to read • Edit Online

Add-SPOGeoAdministrator
In ths Article

Adds a new SharePoint user or security group as GeoAdministrator to a multi-geo tenant.

Syntax
Add-SPOGeoAdministrator -UserPrincipalName <string> -GroupAlias <string> -ObjectId <guid> [<CommonParameters>]

Description
This cmdlet requires a connection to a multi-geo tenant to run correctly. You must be a SharePoint Online global
Administrator to run this cmdlet.

Examples
EXAMPLE 1

Add-SPOGeoAdministrator -UserPrincipalName admin@contoso.onmicrosoft.com

Adds the user **admin@contoso.onmicrosoft.com** as administrator to the SharePoint Online multi-geo tenant.

Parameters
-GroupAlias
PARAMVALUE: String

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectId
PARAMVALUE: Guid

Type: Guid
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UserPrincipalName
PARAMVALUE: String

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Get-SPOGeoAdministrator
Remove-SPOGeoAdministrator
minutes to read • Edit Online

Add-SPOHubSiteAssociation
In ths Article

Associates a site with a hub site.

Syntax
Add-SPOHubSiteAssociation [-Site] <SpoSitePipeBind> -HubSite <SpoHubSitePipeBind> [<CommonParameters>]

Description
Use this cmdlet to associate a site with a hub site.

Examples
Example 1

Add-SPOHubSiteAssociation https://contoso.sharepoint.com/sites/Research -HubSite


https://contoso.sharepoint.com/sites/Marketing

This example associates the research site with the marketing hub site.

Parameters
-HubSite
URL of the hub site.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
URL of the site to join to the hub site.

Type: SpoSitePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Notes
If the site or hub site doesn't exist, this cmdlet returns a "File not found" error.
If the site is already a hub site, this cmdlet returns a "This site is already a HubSite" error.
minutes to read • Edit Online

Add-SPOHubToHubAssociation
In ths Article

Associates a hub site to a hub site.

Syntax
Add-SPOHubToHubAssociation [-Source] <SpoHubSitePipeBind> -Target <SpoHubSitePipeBind> [<CommonParameters>]

Description
Use this cmdlet to associate a hub site to a hub site.

Examples
Example 1

Add-SPOHubToHubAssociation -Source https://contoso.sharepoint.com/sites/Research -Target


https://contoso.sharepoint.com/sites/ResearchAndDevelopment

This example associates the source hub site 'Research' with the target hub site 'ResearchAndDevelopment'.

Parameters
-Source
Source Hub site to be associated with the Target Hub Site.

Type: SpoSitePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Target
Target Hub to associate the source Hub to.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPOOrgAssetsLibrary
In ths Article

Designates a library to be used as a central location for organization assets across the tenant.

Syntax
Add-SPOOrgAssetsLibrary -LibraryUrl <String> [-ThumbnailUrl <String>] [-OrgAssetType <OrgAssetType>] [-CdnType
<SPOTenantCdnType>]
[<CommonParameters>]

Description
The Add-SPOOrgAssetsLibrary cmdlet designates a library to be a central location for organization assets across
the tenant. Once this cmdlet is run, assets stored within this library are available to sites across the tenant. The
name publicly displayed for the library will be the name of the library on the SharePoint site. Note that it may take
from a couple of hours to a day for changes to be reflected.

Examples
Example 1
This example adds https://contoso.sharepoint.com/sites/branding/Assets as a designated library for organization
assets. Assets is the name of the SharePoint library added and will be the name publicly displayed for the library.
The thumbnail publicly displayed for the library is contosologo.jpg, from that same library.

Add-SPOOrgAssetsLibrary -LibraryURL https://contoso.sharepoint.com/sites/branding/Assets -ThumbnailURL


https://contoso.sharepoint.com/sites/branding/Assets/contosologo.jpg

Parameters
-CdnType
Specifies the CDN type. The valid values are public or private.

Type: SPOTenantCdnType
Required: False
Position: Named
Default value: Private
Accept pipeline input: False
Accept wildcard characters: False

-LibraryUrl
Indicates the absolute URL of the library to be designated as a central location for organization assets.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OrgAssetType
Indicates the type of content in this library. Currently supported values are ImageDocumentLibrary, which is set by
default, and OfficeTemplateLibrary.

Type: OrgAssetType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ThumbnailUrl
Indicates the URL of the background image used when the library is publicly displayed. If no thumbnail URL is
indicated, the card will have a gray background.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPOOrgAssetsLibrary
Set-SPOOrgAssetsLibrary
Remove-SPOOrgAssetsLibrary
minutes to read • Edit Online

Add-SPOSiteCollectionAppCatalog
In ths Article

Adds a Site Collection scoped App Catalog to a site

Syntax
Add-SPOSiteCollectionAppCatalog -Site <SpoSitePipeBind> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
.

Examples
Example 1

Add-SPOSiteCollectionAppCatalog -Site "https://contoso.sharepoint.com/sites/FinanceTeamsite"

This will add a SiteCollection app catalog to the specified site

Parameters
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Url of the site to add the app catalog to.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPOSiteDesign
In ths Article

Creates a new site design available to users when they create a new site from the SharePoint home page.

Syntax
Add-SPOSiteDesign
-Title <string>
-WebTemplate <string>
-SiteScripts <SPOSiteScriptPipeBind[]>
[-Description <string>]
[-PreviewImageUrl <string>]
[-PreviewImageAltText <string>]
[-IsDefault]
[<CommonParameters>]

Description
Creates a new site design available to users when they create a new site from the SharePoint home page.

Examples
Example 1
This example creates a new site design.

Add-SPOSiteDesign `
-Title "Contoso customer tracking" `
-WebTemplate "64" `
-SiteScripts "" `
-Description "Tracks key customer data in a list" `
-PreviewImageUrl "https://contoso.sharepoint.com/SiteAssets/site-preview.png" `
-PreviewImageAltText "site preview"

Parameters
-Description
The display description of the site design.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IsDefault
A switch that if provided, applies the site design to the default site template. For more information, see Customize a
default site design.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreviewImageAltText
The alt text description of the image for accessibility.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreviewImageUrl
The URL of a preview image. If none is specified, SharePoint uses a generic image. Recommended size is 400 x 421
pixels.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteScripts
An array of one or more site scripts. Each is identified by an ID. The scripts run in the order listed.

Type: SPOSiteScriptPipeBind[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title
The display name of the site design.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebTemplate
Identifies which base template to add the design to. Use the value 64 for the Team site template, and the value 68
for the Communication site template.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPOSiteDesignTask
In ths Article

Similar to Invoke-SPOSiteDesign, this command is used to apply a published site design to a specified site
collection target. It schedules the operation, allowing for the application of larger site scripts (Invoke-
SPOSiteDesign is limited to 30 actions and subactions). The supported site templates you can apply a site design
to include: "modern" team site (with O365 group), "modern" team site (without an O365 group); communication
site; classic team site; and classic publishing site.

Syntax
Add-SPOSiteDesignTask -SiteDesignId <guid> -WebUrl <string> [<CommonParameters>]

Description
This command is used to apply a published site design to a specified site collection target. It schedules the
operation, allowing for the application of larger site scripts (Invoke-SPOSiteDesign is limited to 30 actions and
subactions).
This command is intended to replace Invoke-SPOSiteDesign and is useful when you need to apply a large number
of actions or multiple site scripts.

NOTE
This command only creates the request. To check on the job status or to view details of the scheduled run, use the
commands in the related section below.

Examples
Example 1
This example applies a site design that includes two site scripts - totaling over 30 site script actions. Executing the
commands will schedule the site design to be queued and run against the designated site collection.

Add-SPOSiteDesignTask -SiteDesignId 501z8c32-4147-44d4-8607-26c2f67cae82 -WebUrl


"https://contoso.sharepoint.com/sites/projectawesome"

Parameters
-SiteDesignId
The ID of the site design to apply.
Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebUrl
The URL of the site collection where the site design will be applied.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPOSiteDesignTask
Invoke-SPOSiteDesign
minutes to read • Edit Online

Add-SPOSiteScript
In ths Article

Uploads a new site script for use either directly or in a site design.

Syntax
Add-SPOSiteScript -Title <string> -Content <string> [-Description <string>] [<CommonParameters>]

Description
Uploads a new site script for use either directly or in a site design.

Examples
Example 1
This example adds a new site logo from the following script in a file.

{
"$schema": "schema.json",
"actions": [
{
"verb": "setSiteLogo",
"url": "https://contoso.sharepoint.com/SiteAssets/company-logo.png"
}
]
}

Get-Content 'c:\scripts\site-script.json' -Raw | Add-SPOSiteScript -Title "Customer logo" -Description "Applies


customer logo for customer sites"

Example 2
This example sets the external sharing capabilities of the site to the ExternalUserAndGuestSharing option. We also
add a site design for a Communication site (68) which uses this script.
$script = @'
{
"$schema": "schema.json",
"actions": [
{
"verb": "setSiteExternalSharingCapability",
"capability": "ExternalUserAndGuestSharing"
}
],
"bindata": { },
"version": 1
};
'@

Add-SPOSiteScript -Title "External User and Guest Sharing site script" -Description "A site script to manage
the
guest access of a site" -Content $script

Id : ea9e3a52-7c12-4da8-a901-4912be8a76bc
Title : External User and Guest Sharing site script
Description : A site script to manage theguest access of a site
Content :
Version : 0

Add-SPOSiteDesign -Title "Communication Site with External Users and Guest Sharing" -WebTemplate "68" -
SiteScripts "ea9e3a52-7c12-4da8-a901-4912be8a76bc"

Parameters
-Content
The JSON value that describes the script. For more information, see the JSON reference.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
A description of the script.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title
The display name of the site design.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPOTenantCdnOrigin
In ths Article

Configures a new origin to public or private content delivery network (CDN ). Requires Tenant administrator
permissions.

Syntax
Add-SPOTenantCdnOrigin -CdnType <SPOTenantCdnType> [-Confirm] -OriginUrl <String> [-WhatIf]
[<CommonParameters>]

Description
Configures a new origin to public or private CDN, on either Tenant level or on a single Site level. Effectively, a
tenant admin points out to a document library, or a folder in the document library and requests that content in that
library should be retrievable by using a CDN.
You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.

Examples
Example 1

Add-SPOTenantCdnOrigin -CdnType public -OriginUrl /sites/site/subfolder

This example configures a public CDN on a site level.

Parameters
-CdnType
Specifies the CDN type. The valid values are: public or private.

Type: SPOTenantCdnType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OriginUrl
Specifies a path to the doc library to be configured. It can be provided in two ways: relative path, or a mask.
Relative-Relative path depends on the OriginScope. If the originScope is Tenant, a path must be a relative path
under the tenant root. If the originScope is Site, a path must be a relative path under the given Site. The path must
point to the valid Document Library or a folder within a document library.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Add-SPOTheme
In ths Article

Creates a new custom theme, or overwrites an existing theme to modify its settings.

Syntax
Add-SPOTheme -Identity <SpoThemePipeBind> -IsInverted <bool> -Overwrite -Palette <SpoThemePalettePipeBind>
[<CommonParameters>]

Description
The Add-SPOTheme cmdlet creates a new theme or updates an existing theme. The color palette settings can be
passed as either a hash table or a dictionary.
Adding a theme does not apply the theme to any sites. It adds the theme to your tenant store, and then the theme
is available in the list of themes under the Change the look option for modern pages.

Examples
Example 1
In this example, a new theme named "Custom Cyan" is created, with color palette settings that are various shades of
cyan. Note that the settings are passed as a hash table.
$themepalette = @{
"themePrimary" = "#00ffff";
"themeLighterAlt" = "#f3fcfc";
"themeLighter" = "#daffff";
"themeLight" = "#affefe";
"themeTertiary" = "#76ffff";
"themeSecondary" = "#39ffff";
"themeDarkAlt" = "#00c4c4";
"themeDark" = "#009090";
"themeDarker" = "#005252";
"neutralLighterAlt" = "#f8f8f8";
"neutralLighter" = "#f4f4f4";
"neutralLight" = "#eaeaea";
"neutralQuaternaryAlt" = "#dadada";
"neutralQuaternary" = "#d0d0d0";
"neutralTertiaryAlt" = "#c8c8c8";
"neutralTertiary" = "#a6a6a6";
"neutralSecondaryAlt" = "#767676";
"neutralSecondary" = "#666666";
"neutralPrimary" = "#333";
"neutralPrimaryAlt" = "#3c3c3c";
"neutralDark" = "#212121";
"black" = "#000000";
"white" = "#fff";
"primaryBackground" = "#fff";
"primaryText" = "#333"
}

Add-SPOTheme -Identity "Custom Cyan" -Palette $themepalette -IsInverted $false

NOTE
Prior to the December 2017 release of the SPO Management Shell, the Add-SPOTheme cmdlet required that color palette
settings be passed as a dictionary. We recommend that you use the latest version of the SPO Management Shell, or use the
HashToDictionary function to convert a hash table to a dictionary if needed.

Example 2
If you want to update an existing theme (to modify some of its color settings, for example), use the same syntax as
shown previously, but add the -Overwrite flag to the Add-SPOTheme cmdlet.

Add-SPOTheme -Identity "Custom Cyan" -Palette $themepalette -IsInverted $false -Overwrite

Parameters
-Identity

Type: SpoThemePalettePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsInverted
Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Palette

Type: SpoThemePalettePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPOUser
In ths Article

Adds an existing Office 365 user or an Office 365 security group to a SharePoint group.

Syntax
Add-SPOUser -Group <String> -LoginName <String> -Site <SpoSitePipeBind> [<CommonParameters>]

Description
Along with the group memberships that are normally required to run Windows PowerShell, you must be a
SharePoint Online global administrator and a site collection administrator to use the Add-SPOUser cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
------------ Example 1 --------------------

Add-SPOUser -Site https://contoso.sharepoint.com/sites/sc1 -LoginName joe.healy@contoso.com -Group "SC1 Owners"

Example 1 adds a user who has the e-mail address joe.healy@contoso.com to the group "SC1 Owners" in the site
collection https://contoso.sharepoint.com/sites/sc1.
------------ Example 2 --------------------

Add-SPOUser -Site https://contoso.sharepoint.com -LoginName melissa.kerr@contoso.com -Group "Team Site Members"

Example 2 adds a user who has the e-mail address melissa.kerr@contoso.com to the group "Team Site Members"
in the site collection https://contoso.sharepoint.com.

Parameters
-Group
Specifies the name of the SharePoint group to add the user or the security group to.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoginName
Specifies the login name of the user to add.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the URL of the site collection to which you want to add the user.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
New -SPOSiteGroup
Get-SPOUser
Set-SPOUser
Remove-SPOUser
minutes to read • Edit Online

Approve-SPOTenantServicePrincipalPermissionGrant
In ths Article

Approves a permission request for the current tenant's "SharePoint Online Client" service principal.

Syntax
Approve-SPOTenantServicePrincipalPermissionGrant -Resource <string> -Scope <string>

Description
Adds a permission for the current tenant's "SharePoint Online Client" service principal. Can be used to add needed
permissions to the service principal without specifically requesting them in the SharePoint Framework solution file
(sppkg).

Examples
------------------EXAMPLE 1------------------

Approve-SPOTenantServicePrincipalPermissionGrant -Resource "Microsoft Graph" -Scope "Mail.Read"

Adds a permission scope for the 'Microsoft Graph' resource with scope claim 'Mail.Read'.

Parameters
-Resource
Resource of the permission request to add.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Scope of the permission request to add.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Approve-SPOTenantServicePrincipalPermissionRequest
In ths Article

Approves a permission request for the current tenant's "SharePoint Online Client" service principal

Syntax
Approve-SPOTenantServicePrincipalPermissionRequest -RequestId <Guid>

Description
Approves a permission request for the current tenant's "SharePoint Online Client" service principal
The return value of a successful call is a permission grant object. See the "Permission grant object" section of the
Get-SPOTenantServicePrincipalPermissionGrants help documentation for more information about a permission
grant object.
To get the collection of permission grants for the "SharePoint Online Client" service principal, use the Get-
SPOTenantServicePrincipalPermissionGrants command.
Approving a permission request also removes that request from the list of permission requests.

Examples
------------------EXAMPLE 1------------------

$requests = Get-SPOTenantServicePrincipalPermissionRequests
$requestToApprove = $requests | ? { $_.Resource -eq 'Office 365 SharePoint Online' -and $_.Scope -eq
'MyFiles.Read' } | Select-Object -First 1

if ($requestToApprove -ne $null)


{
Approve-SPOTenantServicePrincipalPermissionRequest -RequestId $requestToApprove.Id
}

Approves the permission request for the 'Office 365 SharePoint Online' resource with scope claim 'MyFiles.Read'.
If there is no request with those properties, then no approve action will be taken.

Parameters
-RequestId
The ID of the permission request to approve
Type: Guid
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Connect-SPOService
In ths Article

Connects a SharePoint Online global administrator to a SharePoint Online connection (the SharePoint Online
Administration Center). This cmdlet must be run before any other SharePoint Online cmdlets can run.

Syntax
Connect-SPOService -AuthenticationUrl <String> [-ClientTag <String>] [-Credential <CredentialCmdletPipeBind>]
-Url <UrlCmdletPipeBind> [<CommonParameters>]

Connect-SPOService [-ClientTag <String>] [-Credential <CredentialCmdletPipeBind>]


[-Region <AADCrossTenantAuthenticationLocation>] -Url <UrlCmdletPipeBind> [<CommonParameters>]

Description
The Connect-SPOService cmdlet connects a SharePoint Online global administrator to the SharePoint Online
Administration Center.
Only a single SharePoint Online service connection is maintained from any single Windows PowerShell session. In
other words, this is a per-organization administrator connection. Running the Connect-SPOService cmdlet twice
implicitly disconnects the previous connection. The Windows PowerShell session will be set to serve the new
SharePoint Online global administrator specified.
A delegated partner administrator has to swap connections for different organizations within the same Windows
PowerShell session.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.com

Example 1 shows how a SharePoint Online global administrator with credential admin@contoso.com connects to
a SharePoint Online Administration Center that has the URL https://contoso-admin.sharepoint.com.
-----------------------EXAMPLE 2-----------------------------
$username = "admin@contoso.sharepoint.com"
$password = "password"
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-
securestring $Password -asplaintext -force)
Connect-SPOService -Url https://contoso-admin.sharepoint.com -Credential $cred

Example 2 shows how a SharePoint Online global administrator with a username and password connects to a
SharePoint Online Administration Center that has the URL https://contoso-admin.sharepoint.com.
-----------------------EXAMPLE 3-----------------------------

Connect-SPOService -Url https://contoso-admin.sharepoint.com

Prompts for credentials. This is required if the account is using multi-factor authentication.

Parameters
-AuthenticationUrl
Location for AAD Cross-Tenant Authentication service. Can be optionally used if non-default Cross-Tenant
Authentication Service is used.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClientTag
Permits appending a client tag to existing client tag. Used optionally in the CSOM http traffic to identify used script
or solution.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential
Specifies the credentials to use to connect. If no credentials are presented, a dialog will prompt for the credentials.
The credentials must be those of a SharePoint Online global administrator who can access the SharePoint Online
Administration Center site.

Type: CredentialCmdletPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Region
The valid values are: Default | ITAR | Germany | China
The default value is "default".

NOTE
The ITAR value is for United States Government cloud tenancies only.

Type: AADCrossTenantAuthenticationLocation
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the SharePoint Online Administration Center site.

Type: UrlCmdletPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Introduction to the SharePoint Online management shell
Getting started with SharePoint Online Management Shell
Disconnect-SPOService
minutes to read • Edit Online

ConvertTo-SPOMigrationEncryptedPackage
In ths Article

Use this Cmdlet to convert your XML files into a new encrypted migration package.

Syntax
ConvertTo-SPOMigrationEncryptedPackage -EncryptionParameters <EncryptionParameters> -MigrationSourceLocations
<MigrationPackageLocation> [-NoLogFile] -TargetFilesPath <String> -TargetPackagePath <String>
[<CommonParameters>]

ConvertTo-SPOMigrationEncryptedPackage -EncryptionParameters <EncryptionParameters> [-NoLogFile]


-SourceFilesPath <String> -SourcePackagePath <String> -TargetFilesPath <String> -TargetPackagePath <String>
[<CommonParameters>]

Description
This command convert the XML file on your temporary XML folder files into a new set of targeted migration
encrypted metadata files to the target directory.

Examples
Example 1

ConvertTo-SPOMigrationEncryptedPackage -EncryptionParameters SHA256 -MigrationSourceLocations


$MigrationPackageLocation -NoLogFile -TargetFilesPath $TargetFilesPath -TargetPackagePath $TargetPackagePath

Changes a migration package to a migration encrypted package on the "migrationSourceLocations" , with log file
on the current tenant
Example 2

ConvertTo-SPOMigrationEncryptedPackage -EncryptionParameters SHA384 -MigrationSourceLocations


$MigrationPackageLocation -TargetFilesPath $TargetFilesPath -TargetPackagePath $TargetPackagePath

Same as example1 but without log file and using an encryption type SHA384

Parameters
-EncryptionParameters
Parameters of the encryption, it doesn't accept wildcard characters. It accepts parameters like SHA384, SHA256,
etc.
Type: EncryptionParameters
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MigrationSourceLocations
Possible Source locations to migrate

Type: MigrationPackageLocation
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoLogFile
Switch Parameter to determine if you should get or not a log file.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceFilesPath
Defines the temporary Path where are located the XML source files.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourcePackagePath
Defines the source package path location.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetFilesPath
Defines the temporary Path where are located the XML source files.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetPackagePath
Defines the source package path location of the package to be encrypted.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
ConvertTo-SPOMigrationTargetedPackage
Migrate to SharePoint Online using PowerShell
minutes to read • Edit Online

ConvertTo-SPOMigrationTargetedPackage
In ths Article

Use this cmdlet to convert your XML files into a new migration package.

Syntax
ConvertTo-SPOMigrationTargetedPackage [-SourceFilesPath] <String> [-SourcePackagePath] <String> [[-
OutputPackagePath] <String>] [-TargetWebUrl] <String> [-AzureADUserCredentials <CredentialCmdletPipeBind>] -
Credentials <CredentialCmdletPipeBind> [-NoAzureADLookup] [-NoLogFile] [-ParallelImport] [-PartitionSizeInBytes
<Int64>] -TargetDocumentLibraryPath <String> [-TargetDocumentLibrarySubFolderPath <String>] [-TargetEnvironment
<TargetEnvironment>] [-UserMappingFile <String>] [<CommonParameters>]

ConvertTo-SPOMigrationTargetedPackage [-SourceFilesPath] <String> [-SourcePackagePath] <String> [[-


OutputPackagePath] <String>] [-TargetWebUrl] <String> [-AzureADUserCredentials <CredentialCmdletPipeBind>] -
Credentials <CredentialCmdletPipeBind> [-NoAzureADLookup] [-NoLogFile] [-ParallelImport] [-PartitionSizeInBytes
<Int64>] [-TargetEnvironment <TargetEnvironment>] -TargetListPath <String> [-UserMappingFile <String>]
[<CommonParameters>]

Description
Use this cmdlet to create a migration package from one Library to Another Library in form of a package. It
converts the XML files and saves them as a new set of targeted migration package metadata files to the target
directory.

Examples
Example 1
This example shows how to convert a package to a targeted one by looking up data in the target site collection. It
uses the '-ParallelImport' parameter to boost file share migration performance.

$finalPackages = ConvertTo-SPOMigrationTargetedPackage -ParallelImport -SourceFilesPath $sourceFiles -


SourcePackagePath $sourcePackage -OutputPackagePath $targetPackage -Credentials $cred -TargetWebUrl $targetWeb
-TargetDocumentLibraryPath $targetDocLib

Parameters
-AzureADUserCredentials
Receives Azure Active Directory User Credentials
Type: CredentialCmdletPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credentials
Fill out the Regular Credentials (Get-Credential)

Type: CredentialCmdletPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoAzureADLookup
Switch parameter that says if the command should or should not look up for Azure AD.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoLogFile
Switch Parameter to determine if you should get or not a log file.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputPackagePath
Output package path

Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParallelImport
Switch parameter to boost file share migration performance.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionSizeInBytes
Define the partition size in Bytes where it will be located the target package.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceFilesPath
Defines the temporary Path where are located the XML source files.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourcePackagePath
Defines the source package path location.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDocumentLibraryPath
Defines the target document library path.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDocumentLibrarySubFolderPath
Defines the target document library subfolder path.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetEnvironment
Defines the Target environment: Production, ProductionChina, None or OnPremises.

Type: TargetEnvironment
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetListPath
Defines the Target list path

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetWebUrl
Defines the Target Web URL of the package.

Type: String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserMappingFile
Defines the file mapping of the user.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
ConvertTo-SPOMigrationEncryptedPackage
minutes to read • Edit Online

Deny-SPOTenantServicePrincipalPermissionRequest
In ths Article

Denies a permission request for the current tenant's "SharePoint Online Client" service principal

Syntax
Deny-SPOTenantServicePrincipalPermissionRequest -RequestId <Guid>

Description
Denies a permission request for the current tenant's "SharePoint Online Client" service principal
Denying a permission request removes that request from the list of permission requests.

Examples
------------------EXAMPLE 1------------------

$requests = Get-SPOTenantServicePrincipalPermissionRequests
$requestToDeny = $requests | ? { $_.Resource -eq 'Office 365 SharePoint Online' -and $_.Scope -eq
'MyFiles.Read' } | Select-Object -First 1

if ($requestToDeny -ne $null)


{
Deny-SPOTenantServicePrincipalPermissionRequest -RequestId $requestToDeny.Id
}

Denies the permission request for the 'Office 365 SharePoint Online' resource with scope claim 'MyFiles.Read'. If
there is no request with those properties, then no deny action will be taken.

Parameters
-RequestId
The ID of the permission request to deny

Type: Guid
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-SPOTenantServicePrincipal
In ths Article

Disables the current tenant's "SharePoint Online Client" service principal.

Syntax
Disable-SPOTenantServicePrincipal

Description
Disables the current tenant's "SharePoint Online Client" service principal.
When the service principal's account is disabled, clients and components that use this service principal will not be
able to request an access token for this service principal.

Examples
------------------EXAMPLE 1------------------

Disable-SPOTenantServicePrincipal

Disables the current tenant's "SharePoint Online Client" service principal.


minutes to read • Edit Online

Disconnect-SPOService
In ths Article

Disconnects from a SharePoint Online service.

Syntax
Disconnect-SPOService [<CommonParameters>]

Description
The Disconnect-SPOService cmdlet explicitly disconnects a previously created SharePoint Online service
connection.
Global administrators can disconnect the service by running the Disconnect-SPOService cmdlet or by running the
Connect-SPOService cmdlet to initiate another connection. For more information, see Connect-SPOService .

Even after a connection is terminated, operations that were started before the connection is terminated will run to
completion. In other words, long-running operations will not be terminated by running the Disconnect-SPOService
cmdlet or the Connect-SPOService cmdlet.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
------------ Example 1 --------------------

Disconnect-SPOService

This example disconnects the service for the tenant.

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Connect-SPOService
minutes to read • Edit Online

Enable-SPOCommSite
In ths Article

Enables the modern communication site experience on an existing site. At this time, based on early adopter
feedback, we have decided to postpone rolling out this feature. We apologize for any inconvenience and will
communicate a new schedule via Message Center, once it is available. You can also check [Microsoft 365 Roadmap]
(https://www.microsoft.com/microsoft-365/roadmap) for latest updates to this feature.

Syntax
Enable-SPOCommSite [-SiteUrl] <string> [-DesignPackageId] <GUID>

Description
Use this cmdlet to enable the modern communication site experience at the classic root site of a tenant. You must
use the SharePoint admin powershell version 8715.1200 or greater. Use of this cmdlet is subject to rollout of
capability.
Current limitations
1. This cmdlet can only be run on the root site of a tenant. Typically the root site url is
https://tenantname.sharepoint.com
2. The root site should not currently have the classic publishing feature enabled (at the site or web level). What is
classic publishing feature?
3. The root site should not have had the classic publishing feature enabled in the past (at the site or web level)
4. The site must have quick launch site navigation enabled. How do I do this?
On successful execution of the cmdlet, customers can expect
1. A new modern home page will be created for the root site (only the root site web, not subsites of the root site if
there are any)
2. Full width pages with horizontal nav will be available (top nav from classic view will be hidden, can be seen in
classic pages like the site settings page)
3. NoScript will be turned ON
4. Minor Versioning on the Site Pages library will be enabled
5. Site Pages will be the default content type in the Site Pages library
6. No change in permissions or content in the root site

Examples
Example 1

Enable-SPOCommSite -SiteUrl https://contoso.sharepoint.com

This example enables the communication site experience at this https://contoso.sharepoint.com site.
Example 2

$orgName=""
$rootSiteURL = ""
Connect-SPOService -Url https://$orgName-admin.sharepoint.com
Enable-SPOCommSite -SiteUrl $rootSiteURL

STEP BY STEP INSTRUCTIONS


1. Install latest SharePoint Online Management Shell (version 8715.1200 or greater) from here. If you have an older
version installed, please uninstall it from Windows Add/Remove programs and then install the latest version.
Alternatively, if you have used Install-Module Microsoft.Online.SharePoint.PowerShell to install the SharePoint
Online Management Shell, you can run Update-Module Microsoft.Online.SharePoint.PowerShell to update the
PowerShell module to the latest available version.
2. Make sure you have the SharePoint admin credentials for the tenant
3. Make sure you have the correct root site URL. Typically its https://tenantname.sharepoint.com
4. Copy the above PowerShell command(s) into a notepad and fill in the missing details denoted by <>
5. Open SharePoint Online Management Shell from your computer
6. Execute the PowerShell commands from your notepad
TROUBLESHOOTING
Error case 1: Wrong credentials
If the SharePoint admin user credentials is wrong or invalid, you will see this error:

Connect-SPOService : The sign-in name or password does not match one in the Microsoft account system.

Error case 2: Feature is not yet enabled for your tenant


The use of this cmdlet is subject to the feature rollout. If the feature is not yet available for your tenant, the cmdlet
will not execute and will show this error:

Enable-SPOCommSite : The requested operation is part of an experimental feature that is not supported in the
current environment.

Error case 3: Site URL input is not of root site


Currently only the root site of a tenant is supported for this cmdlet. IF the site URL input is wrong, you will see this
error:

Enable-SPOCommSite : The site provided is not the root site collection. Please provide a valid root site URL.

Error case 4: Site URL input is invalid


If the site URL input points to a site that does not exist, you will see the following error message:

Enable-SPOCommSite : File Not Found.

Error case 5: Classic publishing feature is currently enabled


We do not support root site that currently have or have had in the past enabled the classic publishing features. If
you see this error, your root site is not eligible for this feature enablement

Enable-SPOCommSite : The operation cannot be performed because the Publishing feature is enabled on the
site.

Parameters
-DesignPackageId
GUID identifying the communication site design. This is not a required input. If no input is provided, the topic
design will be applied to the new home page. here are the IDs for the supported design packages:
1. Topic: 96c933ac-3698-44c7-9f4a-5fd17d71af9e
2. Showcase: 6142d2a0-63a5-4ba0-aede-d9fefca2c767
3. Blank: f6cc5403-0d63-442e-96c0-285923709ffc

Type: GUID
Required: False
Position: Named
Default value: 96c933ac-3698-44c7-9f4a-5fd17d71af9e
Accept pipeline input: False
Accept wildcard characters: False

-SiteUrl
URL of the site for enabling the modern communication site experience. This is a required parameter

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Enable-SPOTenantServicePrincipal
In ths Article

Enables the current tenant's "SharePoint Online Client" service principal.

Syntax
Enable-SPOTenantServicePrincipal [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Enables the current tenant's "SharePoint Online Client" service principal.

Examples
------------------EXAMPLE 1------------------

Enable-SPOTenantServicePrincipal

Enables the current tenant's "SharePoint Online Client" service principal.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Export-SPOQueryLogs
In ths Article

Export query logs for a user in an Office 365 tenant.

Syntax
Export-SPOQueryLogs [-StartTime <DateTime>] -LoginName <String> -OutputFolder <String> [<CommonParameters>]

Description
Export the query logs for a user in an Office 365 tenant. The result of the export is stored in the current working
folder or a specified folder, in the two files loginName_queries.csv and loginName_personalQueries.csv.
The output of the queries.csv will be for example:

QUERYTIME QUERYTEX T

5/31/2018 09:16 Querytext1

5/31/2018 08:16 Querytext2

You have to be a tenant admin to run the cmdlet.


For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
------------ Example 1 --------------------

Export-SPOQueryLogs -LoginName user1@contoso.sharepoint.com

Example 1 exports the query log for a user who has the e-mail address user1@contoso.sharepoint.com to the two
files user1@contoso.sharepoint.com_queries.csv and user1@contoso.sharepoint.com_personalQueries.csv, in the
current working folder.
------------ Example 2 --------------------

`powershell
Export-SPOQueryLogs -LoginName user1@contoso.sharepoint.com -StartTime "2018-10-21" -OutputFolder
"c:\users\contosoadmin\Documents"

Example 2 exports the query log from the starting time 21. October 2018, for a user who has the e-mail address
user1@contoso.sharepoint.com, to the two files user1@contoso.sharepoint.com_queries.csv and
user1@contoso.sharepoint.com_personalQueries.csv, in the folder c:\users\contosoadmin\Documents.

Parameters
-LoginName
Specifies the login name of the user to export.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFolder
Target folder where the CSV file is generated.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
Specifies from which point of time to export the logs from. Use the date format YYYY -MM -DD.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object

Related Links
Introduction to the SharePoint Online management shell
Set up the SharePoint Online Management Shell Windows PowerShell environment
minutes to read • Edit Online

Export-SPOUserInfo
In ths Article

Export user information from site user information list.

Syntax
Export-SPOUserInfo -LoginName <String> -Site <SpoSitePipeBind> -OutputFolder <String> [<CommonParameters>]

Description
Export user information from site user information list.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
------------ Example 1 --------------------

Export-SPOUserInfo -LoginName joe.healy@contoso.com -site https://contoso.sharepoint.com/sites/sc1 -


OutputFolder "C:\users\admin\exportfolder"

Example 1 exports a user data who has the e-mail address joe.healy@contoso.com from the site collection
https://contoso.sharepoint.com/sites/sc1 to folder C:\users\admin\exportfolder.
------------ Example 2 --------------------

$sites = Get-SPOSite -IncludePersonalSite $true


$user = "joe.healy@contoso.com"
foreach ($site in $sites)
{
Export-SPOUserInfo -LoginName $user -site $site.Url -OutputFolder
"C:\users\admin\exportfolder"
}

Example 2 exports user data who has email address joe.healy@contoso.com from all site collections to folder
C:\users\admin\exportfolder.

Parameters
-LoginName
Specifies the login name of the user to export.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFolder
Target folder where the CSV file is generated.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the URL of the site collection to which you want to export the user.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
New -SPOSiteGroup
Get-SPOUser
Set-SPOUser
Remove-SPOUser
minutes to read • Edit Online

Export-SPOUserProfile
In ths Article

Export user profile data to csv file.

Syntax
Export-SPOUserProfile -LoginName <String> -OutputFolder <String> [<CommonParameters>]

Description
Export user profile data to csv file.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
------------ Example 1 --------------------

Export-SPOUserProfile -LoginName joe.healy@contoso.com -OutputFolder "C:\users\admin\exportfolder"

Example 1 exports user data who has the e-mail address joe.healy@contoso.com to a folder
"C:\users\admin\exportfolder".

Parameters
-LoginName
Specifies the login name of the user who's data is exported.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputFolder
Specifies the output folder location where the CSV file is created.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Export-SPOUserInfo
minutes to read • Edit Online

Get-SPOAppErrors
In ths Article

Returns application errors.

Syntax
Get-SPOAppErrors [-EndTimeInUtc <DateTime>] -ProductId <Guid> [-StartTimeInUtc <DateTime>] [<CommonParameters>]

Description
The Get-SPOAppErrors cmdlet returns application monitoring errors (if available) for the application that is specified
by ProductId between StartTimeInUtc in Coordinated Universal Time (UTC ) and EndTimeInUtc in UTC.
Based on server configuration, errors are available for a limited time. The default is seven days. Older errors are
purged. Date time values that are older than 50 years or later than 20 years from today are considered invalid
Each error includes the error message, time in UTC that error happened, the site where the error happened, and the
error type. Values for error type are as follows: 0 - None, 1 - Install Error, 2 - Upgrade Error, 3 - Runtime Error.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
------------ Example 1 --------------------

Get-SPOAppErrors -ProductId ba51729b-e017-409d-681a-66f1dd18f0f4

This example returns a collection of monitoring error message(s) for application whose GUID is ba51729b-e017-
409d-681a-66f1dd18f0f4.

Parameters
-EndTimeInUtc
Specifies the end time in UTC to search for monitoring errors. If no end time is given, the default value current time
in UTC is used.
Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProductId
Specifies the application's GUID.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTimeInUtc
Specifies the start time in UTC to search for monitoring errors (for example, 01032011:12:00). If no start time is
given, the default value 72 hours before the current time is used.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppInfo
minutes to read • Edit Online

Get-SPOAppInfo
In ths Article

Returns all installed applications.

Syntax
Get-SPOAppInfo [[-ProductId] <Guid>] [[-Name] <String>] [<CommonParameters>]

Description
The Get-SPOAppInfo cmdlet gets all the installed applications from an external marketplace or from the App
Catalog that contain Name in their application names or the installed application with mentioned ProductId.
ProductId takes precedence if not empty.
Either ProductId or Name must be given. Name is ignored if ProductId is specified.
The returned collection of installed applications contains Product ID (GUID ), Product name and Source. Values for
source type are as follows: 0 = App Catalog and 1 = Marketplace.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832.

Examples
------------ Example 1 --------------------

Get-SPOAppInfo -Name "Excel Service"

Example 1 returns all the installed applications from the external marketplace or from the App Catalog that contain
"Excel Service" in their application names.
------------ Example 2 --------------------

Get-SPOAppInfo -ProductId 6751729b-e017-409d-681a-66f1dd18f0ff

Example 2 returns the installed application that has the GUID 6751729b-e017-409d-681a-66f1dd18f0ff.
------------ Example 3 --------------------

Get-SPOAppInfo -Name " " | Sort Name

Example 3 returns all the installed applications that have a space in the name and sorts them in ascending order.
Parameters
-Name
Specifies the application's name.

Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProductId
Specifies the application's GUID.

Type: Guid
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Get-SPOBrowserIdleSignOut
In ths Article

Syntax
Get-SPOBrowserIdleSignOut [<CommonParameters>]

Description
Use this cmdlet to retrieve the current configuration values for Idle session sign-out policy, the time at which users
are warned and subsequently signed out of Office 365 after a period of browser inactivity in SharePoint and
OneDrive.

Examples
Example 1

Get-SPOBrowserIdleSignOut

This example retrieves the current configuration values for Idle session sign-out
minutes to read • Edit Online

Get-SPOBuiltInDesignPackageVisibility
In ths Article

Gets the visibility of the available built-in Design Packages.

Syntax
Get-SPOBuiltInDesignPackageVisibility [-DesignPackage <DesignPackageType>] [<CommonParameters>]

Description
Use this cmdlet to retrieve the current visibility state of each built-in design package.

Examples
Example 1

Get-SPOBuiltInDesignPackageVisibility -DesignPackage Showcase

This example retrieves the current visibility state of Showcase built-in design package.
Example 2

Get-SPOBuiltInDesignPackageVisibility

This example retrieves the current visibility state of each built-in design package.

Parameters
-DesignPackage
Name of the design package, available names are
Topic
Showcase
Blank
TeamSite

Type: DesignPackageType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOCrossGeoMovedUsers
In ths Article

In a multi-geo tenant returns the SharePoint Online user (or users) that had been moved.

Syntax
Get-SPOCrossGeoMovedUsers -Direction <String> [<CommonParameters>]

Description
This cmdlet allows you to get the moved users out and in the current SPO Site. It requires a connection to a multi-
geo tenant to run correctly. You must be a SharePoint Online global Administrator to get the moved users out and
in the current SPO site.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOCrossGeoMovedUsers -Direction MoveIn

Get the cross users that have been moved in the current SPO site
-----------------------EXAMPLE 2-----------------------------

Get-SPOCrossGeoMovedUsers -Direction MoveOut

Get the cross users that have been moved out the current SPO site

Parameters
-Direction
PARAMVALUE: String

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
minutes to read • Edit Online

Get-SPOCrossGeoMoveReport
In ths Article

Provides a report of objects moved between geo locations.

Syntax
Get-SPOCrossGeoMoveReport -MoveJobType <JobType> [-Limit <uint32>] [-MoveStartTime <datetime>] [-MoveEndTime
<datetime>] [-MoveState <MoveState>] [-MoveDirection <MoveDirection>] [<CommonParameters>]

Description
Use this cmdlet to return a report of objects moved between geo locations based on the specified parameters.

Examples
Example 1

Get-SPOCrossGeoMoveReport -MoveJobType SiteMove -MoveState Failed

This example returns the failed site moves between geo locations.

Parameters
-Limit
Limit the number of items to return for the report.

Type: uint32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveDirection
The direction of the move to limit the report to. Valid values are:
All
MoveIn
MoveOut
Type: MoveDirection
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveEndTime
The end time to limit the move report to.

Type: datetime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveJobType
The type of job to limit the report to. Valid values are:
GroupMove
SiteMove
UserMove

Type: JobType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveStartTime
The start time to limit the move report to.

Type: datetime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveState
The type of state to limit the report to. Valid values are:
All
Failed
InProgress
NotStarted
NotSupported
Queued
Rescheduled
Stopped
Success
Type: MoveState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOCrossGeoUsers
In ths Article

Returns the SharePoint Online users in a multi-geo tenant that match the criteria.

Syntax
Get-SPOCrossGeoUsers -ValidDataLocation <Boolean> [<CommonParameters>]

Description
The Get-SPOCrossGeoUsers cmdlet is used to return the SharePoint Online users that match a given criteria. The
ValidDataLocation parameter is a switch used to validate the location of the data. This cmdlet requires a connection
to a multi-geo tenant to run correctly. You must be a SharePoint Online global Administrator to run this cmdlet.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOCrossGeoUsers -ValidDataLocation

Returns all of the SharePoint Online users in a multi-geo tenant and validates the data location.
-----------------------EXAMPLE 2-----------------------------

Get-SPOCrossGeoUsers

Returns all of the SharePoint Online users in a multi-geo tenant without validating data location.

Parameters
-ValidDataLocation
PARAMVALUE: $true | $false

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
ConvertTo-SPOMigrationTargetedPackage
minutes to read • Edit Online

Get-SPODataEncryptionPolicy
In ths Article

Syntax
Get-SPODataEncryptionPolicy [-Identity] <SpoSitePipeBind> [<CommonParameters>]

Description
Use the Get-DataEncryptionPolicy cmdlet to view customer encryption status for your geo tenant.
For more information, see Controlling your data in Office 365 using Customer Key

Examples
Example 1

Get-SPODataEncryptionPolicy -Identity https://contoso-admin.sharepoint.com

The output from this cmdlet includes:


The URI of the primary key.
The URI of the secondary key.
The encryption status for the geo. Possible states include:
Unregistered: Customer Key encryption has not yet been applied.
Registering: Customer Key encryption has been applied and your files are in the process of being
encrypted. If your geo is in this state, you'll also be shown information on what percentage of sites in the
geo are complete so that you can monitor encryption progress.
Registered: Customer Key encryption has been applied, and all files in all sites have been encrypted.
Rolling: A key roll is in progress. If your geo is in this state, you'll also be shown information on what
percentage of sites have completed the key roll operation so that you can monitor progress.

Parameters
-Identity
Specifies the URL of the admin site collection.
Type: SpoSitePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPODeletedSite
In ths Article

Returns all deleted site collections from the Recycle Bin.

Syntax
Get-SPODeletedSite [[-Identity] <SpoSitePipeBind>] [-IncludeOnlyPersonalSite] [-Limit <String>]
[<CommonParameters>]

Get-SPODeletedSite [[-Identity] <SpoSitePipeBind>] [-IncludePersonalSite] [-Limit <String>]


[<CommonParameters>]

Description
The Get-SPODeletedSite cmdlet returns all deleted site collections that match the given criteria from the Recycle
Bin.
By default the cmdlet only returns site and site collections that are not Personal Sites (My Sites). To include
personal sites, use the IncludePersonalSite parameter. To return only Personal Sites, use the
IncludeOnlyPersonalSite parameter.
These two Switch Parameters are in different parameter sets, so you can only use either one of them but not both.
This action does not restore these returned sites or site collection. It only returns their properties so that you can
see what sites or site collections have been deleted. To restore the site or site collections, forward the results to the
Restore-SPODeletedSite cmdlet in the pipeline.

You must be a SharePoint Online global administrator and a site collection administrator for the deleted site
collections to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
------------ Example 1 --------------------

Get-SPODeletedSite -IncludePersonalSite

The command in this example returns all deleted site collections from the Recycle Bin including Personal Sites.

Parameters
-Identity
Specifies the URL of the deleted site collection to be returned.

Type: SpoSitePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncludeOnlyPersonalSite
Use this switch parameter to only include Personal Sites in the returned results.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludePersonalSite
Use this switch parameter to include Personal Sites with the returned results.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Limit
Specifies the maximum number of site collections to return. It can be any number. To retrieve all site collections, use
ALL. The default value is 200.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Restore-SPODeletedSite
Remove-SPODeletedSite
minutes to read • Edit Online

Get-SPOExternalUser
In ths Article

Returns external users in the tenant.

Syntax
Get-SPOExternalUser [[-Position] <Int32>] [[-PageSize] <Int32>] [[-Filter] <String>] [[-SortOrder] <SortOrder>]
[[-SiteUrl] <String>] [-ShowOnlyUsersWithAcceptingAccountNotMatchInvitedAccount <Boolean>] [<CommonParameters>]

Description
The Get-SPOExternalUser cmdlet returns external users that are located in the tenant based on specified criteria.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOExternalUser -Position 0 -PageSize 2

Example 1 returns the first two external users in the collection.


-----------------------EXAMPLE 2-----------------------------

Get-SPOExternalUser -Position 2 -PageSize 2

Example 2 returns two external users from the third page of the collection.
-----------------------EXAMPLE 3-----------------------------

Get-SPOExternalUser -Position 0 -PageSize 30 -SiteUrl https://contoso.sharepoint.com

Example 3 returns the first 30 users that match the SiteUrl https://contoso.sharepoint.com.

Parameters
-Filter
Limits the results to only those users whose first name, last name, or email address begins with the text in the
string using a case-insensitive comparison.
Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PageSize
Specifies the maximum number of users to be returned in the collection.
The value must be less than or equal to 50.

Type: Int32
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Position
Use to specify the zero-based index of the position in the sorted collection of the first result to be returned.

Type: Int32
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowOnlyUsersWithAcceptingAccountNotMatchInvitedAccount
Shows users who have accepted an invite but not using the account the invite was sent to.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteUrl
Specifies the site to retrieve external users for.
If no site is specified, the external users for all sites are returned.

Type: String
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SortOrder
Specifies the sort results in Ascending or Descending order on the SPOUser.Email property should occur.
Type: SortOrder
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Remove-SPOExternalUser
minutes to read • Edit Online

Get-SPOGeoAdministrator
In ths Article

This cmdlet returns the SharePoint Online user or security group accounts with global administrative privileges in
the current Multi-Geographics tenant.

Syntax
Get-SPOGeoAdministrator [<CommonParameters>]

Description
You may only use parameters from one parameter set and you may not combine parameters from different
parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets
https://go.microsoft.com/fwlink/?LinkID=187810.
The Get-SPOGeoAdministrator cmdlet has a single parameter set and matches a user or a list of users which has the
ability to do changes globally in the geo location that you are connected to.
Running this cmdlet on a non-multi-geo tenant organization will return error -4.
You must be a SharePoint Online or global administrator and you must have a the Multi-Geo Capabilities in Office
365 service plan to run the Get-SPOGeoAdministrator cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832.

Examples
Example 1

Get-SPOGeoAdministrator

This cmdlet will output a SharePoint Online user or security group that is Multi-Geographic administrators on the
current multi-geo tenant.

Related Links
Add or remove a geo administrator
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Add-SPOGeoAdministrator
Remove-SPOGeoAdministrator
minutes to read • Edit Online

Get-SPOGeoMoveCrossCompatibilityStatus
In ths Article

This cmdlet returns the compatibility status between geographic locations.

Syntax
Get-SPOGeoMoveCrossCompatibilityStatus [<CommonParameters>]

Description
This cmdlet returns the compatibility between sites and locations for a move in a multi-geo SharePoint Online
tenant.

Examples
EXAMPLE 1

Get-SPOGeoMoveCrossCompatibilityStatus

Get the compatibility status for all locations.


CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -
InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
minutes to read • Edit Online

Get-SPOGeoStorageQuota
In ths Article

This cmdlet gets the storage quota on a multi-geo tenant.

Syntax
Get-SPOGeoStorageQuota [-AllLocations] [<CommonParameters>]

Description
This cmdlet shows the storage on the current location or all locations in a multi-geo tenant.
This Cmdlet requires a connection to a multi-geo tenant to run correctly. You must be a SharePoint Online global
Administrator to get the storage on current location or all locations in a multi-geo SPO tenant.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOGeoStorageQuota -AllLocations

Get the storage size quota of all locations.


-----------------------EXAMPLE 2-----------------------------

Get-SPOGeoStorageQuota

Get the storage size quota of the current location.

Parameters
-AllLocations
PARAMVALUE: SwitchParameter

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Set-SPOGeoStorageQuota
minutes to read • Edit Online

Get-SPOHideDefaultThemes
In ths Article

Queries the current SPOHideDefaultThemes setting. SPO stands for SharePoint Online.

Description
The Get-SPOHideDefaultThemes cmdlet retrieves the current Set-SPOHideDefaultThemes setting. You
might want to use this cmdlet in a PowerShell script to read the setting and then take different actions based on
whether the default themes are hidden. This cmdlet does not have any parameters.

NOTE
This cmdlet was named Get-HideDefaultThemes until the December 2017 release of the SPO Management Shell. We
recommend that you use the latest version of the PowerShell cmdlets.

Examples
Example 1

Get-SPOHideDefaultThemes

Related Links
Getting started with SharePoint Online Management Shell
Set-SPOHideDefaultThemes
minutes to read • Edit Online

Get-SPOHomeSite
In ths Article

Returns the home site url for your tenant.

Syntax
Get-SPOHomeSite [<CommonParameters>]

Description
Use this cmdlet to get the home site url for your tenant.

Examples
Example 1

Get-PnPHomeSite

This example returns the home site url for your tenant.
minutes to read • Edit Online

Get-SPOHubSite
In ths Article

Lists hub sites or hub site information.

Syntax
Get-SPOHubSite [-Identity] <SpoHubSitePipeBind>
[<CommonParameters>]

Description
Lists all hub sites found on the SharePoint tenant. If you provide -Identity the cmdlet returns detailed information
about the specific hub. You can find which hub a site is associated with by providing the site's identity with this
cmdlet.
If the hub site doesn't exist, this cmdlet returns a "File not found" error.

NOTE
If a deleted hub site appears in the output of this cmdlet you may not have run Unregister-SPOHubSite on the deleted hub
site.

Examples
Example 1

Get-SPOHubSite

This example lists all hub sites in the tenant.


Example 2

Get-SPOHubSite -Identity https://contoso.sharepoint.com/sites/online-marketing

ID : 44252d09-62c4-4913-9eb0-a2a8b8d7f863
Title : Marketing Hub
SiteId : 44252d09-62c4-4913-9eb0-a2a8b8d7f863
SiteUrl : https://contoso.sharepoint.com/sites/Marketing
LogoUrl : https://contoso.sharepoint.com/sites/Marketing/SiteAssets/hublogo.png
Description : Hub for the Marketing division
Permissions : {Wilke, Nestor}
SiteDesignId : 00000000-0000-0000-0000-000000000000
RequiresJoinApproval : False
HideNameInNavigation : False
This example begins with the online-marketing site. The cmdlet finds the associated hub site, which is marketing.
Then it lists all the details about the marketing hub site.

Parameters
-Identity
URL of the hub site. If not specified, the cmdlet lists all hub sites in the tenant.

Type: SpoSitePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOMigrationJobProgress
In ths Article

This cmdlet lets you report on SPO migration jobs that are in progress.

Syntax
Get-SPOMigrationJobProgress -AzureQueueUri <String> -Credentials <CredentialCmdletPipeBind>
[-DontWaitForEndJob] [-EncryptionParameters <EncryptionParameters>] [-JobIds <Guid[]>] [-NoLogFile]
[-TargetWebUrl <String>] [<CommonParameters>]

Get-SPOMigrationJobProgress -Credentials <CredentialCmdletPipeBind> [-DontWaitForEndJob]


[-EncryptionParameters <EncryptionParameters>] [-JobIds <Guid[]>]
-MigrationPackageAzureLocations <MigrationPackageAzureLocations> [-NoLogFile] [-TargetWebUrl <String>]
[<CommonParameters>]

Description
This cmdlet lets you report on SPO migration jobs that are in progress.

Examples
-----------------------EXAMPLE 1-----------------------------

$myQueueUri =

Get-SPOMigrationJobProgress -AzureQueueUri $myQueueUri

This will report on ALL jobs within the report queue.


-----------------------EXAMPLE 2-----------------------------

$jobIds = @(,....)

Get-SPOMigrationJobProgress -AzureQueueUri $myQueueUri -JobIds $jobIds

This will report only jobs defined within the $jobIds collection from the report queue.
-----------------------EXAMPLE 3-----------------------------

$targetWebUrl =
$creds =

Get-SPOMigrationJobProgress - AzureQueueUri $myQueueUri - TargetWebUrl $targetWebUrl -Credentials $creds

This will report on any currently queued or in progress jobs and wait for all jobs to complete.
-----------------------EXAMPLE 4-----------------------------

$targetWebUrl =
$creds =

Get-SPOMigrationJobProgress - AzureQueueUri $myQueueUri - TargetWebUrl $targetWebUrl -Credentials $creds -


DontWaitForJobEnd

This will report on any currently queued or in progress jobs and not wait for all jobs to complete.

Parameters
-AzureQueueUri
An optional fully qualified URL and SAS token representing the Azure Storage Reporting Queue where import
operations will list events during import.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credentials
Optional credentials of a site collection administrator to use to connect to the site collection. The credentials should
supply the username in UPN format (e.g. user@company.onmicrosoft.com). If this property is not set, the current
tenant admin credentials from the session's previous call to Connect-SPOService will be used to connect to the site
collection.

Type: CredentialCmdletPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DontWaitForEndJob
Tells the cmdlet to not wait for the job to end. It will only process as many messages as are currently in the queue
and then terminate. If this flag is set to $false, it will wait for the job to end before terminating.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EncryptionParameters
PARAMVALUE: EncryptionParameters
Type: EncryptionParameters
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobIds
Id of a previously created migration job that exists on the target site collection.

Type: Guid[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MigrationPackageAzureLocations
A set of fully qualified URLs and SAS tokens representing the Azure Blob Storage containers that hold the package
content and metadata files and an optional Azure Storage Reporting Queue. This object is returned during
successful processing of the Set-SPOMigrationPackageAzureSource

Type: MigrationPackageAzureLocations
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoLogFile
Indicates to not create a log file. The default is to create a new CopyMigrationPackage log file within the directory
specified within the SourcePackagePath parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetWebUrl
The fully qualified target web URL where the package will be imported into. This must include the same
TargetWebURL that was used during ConvertTo-SPOMigrationTargetedPackage .

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Get-SPOMigrationJobStatus
In ths Article

Use this cmdlet to monitor the status of a submitted SharePoint Online migration job.

Syntax
Get-SPOMigrationJobStatus -Credentials <CredentialCmdletPipeBind> [-JobId <Guid>] [-NoLogFile]
-TargetWebUrl <String> [<CommonParameters>]

Description
This cmdlet will check the status of a migration job.

Examples
-----------------------EXAMPLE 1-----------------------------

$targetWebUrl = "https://contoso.sharepoint.com/sites/migrationtest"
$credentials = Get-Credential
Get-SPOMigrationJobStatus -TargetWebUrl $targetWebUrl -Credentials $credentials -JobId "779c4b3b-ec24-4705-
bb58-c38f4329418c"

Get the status of your SPO Migration Job. You can obtain the Job id when submit package data to create new SPO
migration job via the Invoke-SPOMigrationEncryptUploadSubmit cmdlet

Parameters
-Credentials
The credentials of a site collection administrator to use to connect to the site collection. The credentials should
supply the username in UPN format (e.g. user@company.onmicrosoft.com). If this property is not set, the current
tenant admin credentials from the session's previous call to Connect-SPOService will be used to connect to the site
collection.

Type: CredentialCmdletPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
(optional) The ID of a migration job that exists on the target site collection.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoLogFile
(optional) Indicates to not create a log file. The default is to create a new DeleteMigrationJob log file within the
current directory.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetWebUrl
The fully qualified target web URL where the package will be imported. This must include the same TargetWebUrl
that was used during ConvertTo-SPOMigrationTargetedPackage .

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Get-SPOAppErrors
minutes to read • Edit Online

Get-SPOMultiGeoCompanyAllowedDataLocation
In ths Article

Returns the SharePoint Online Multi geo allowed data locations.

Syntax
Get-SPOMultiGeoCompanyAllowedDataLocation [<CommonParameters>]

Examples
Example 1

Get-SPOMultiGeoCompanyAllowedDataLocation

This example returns the SharePoint Online Multi geo allowed data locations.
minutes to read • Edit Online

Get-SPOMultiGeoExperience
In ths Article

Syntax
Get-SPOMultiGeoExperience [<CommonParameters>]

Description
Use this cmdlet to get the multi geo experience mode. For more information see Enabling SharePoint Multi-Geo in
your satellite geo location

Examples
Example 1

Get-SPOMultiGeoExperience

This example will show you whether the geo location is in SPO or ODB mode.
minutes to read • Edit Online

Get-SPOOrgAssetsLibrary
In ths Article

Displays information about all libraries designated as locations for organization assets.

Syntax
Get-SPOOrgAssetsLibrary [<CommonParameters>]

Description
The Get-SPOOrgAssetsLibrary cmdlet displays information about all libraries designated as locations for
organization assets.
Once this cmdlet is run, it will display the name and URL of the site where assets are originally stored, as well as
the display name, server relative library URL, list ID, OrgAssetType and thumbnail URL for any associated libraries.

Examples
Example 1
This example displays the name and URL of the site where assets are originally stored. It also provides a list of any
associated libraries and shows the respective display name, server relative library URL, list ID, OrgAssetType and
thumbnail URL.

Get-SPOOrgAssetsLibrary

Related Links
Add-SPOOrgAssetsLibrary
Set-SPOOrgAssetsLibrary
Remove-SPOOrgAssetsLibrary
minutes to read • Edit Online

Get-SPOOrgNewsSite
In ths Article

Lists URLs of all the configured organizational news sites. Requires Tenant administrator permissions.

Syntax
Get-SPOOrgNewsSite [<CommonParameters>]

Description
Lists URLs of all the organizational authoritative news sites.

Examples
EXAMPLE 1

Get-SPOOrgNewsSite

The example returns a list of organizational news sites from the Tenant.

Inputs
None

Outputs
System.Object

Related Links
Set-SPOOrgNewsSite
Remove-SPOOrgNewsSite
minutes to read • Edit Online

Get-SPOPublicCdnOrigins
In ths Article

This cmdlet returns a list of CDN Origins in your SharePoint Online Tenant

Syntax
Get-SPOPublicCdnOrigins [<CommonParameters>]

Description
List CDN Origins in your Tenant by id or url.

Examples
Example 1

Get-SPOPublicCdnOrigins | Fl

Id : 16530053476cf3efe88b499076356d0205504b2451688c20a65d561c951783e0859ac590
Url : HTTPS:/CONTOSO.SHAREPOINT.COM/SITES/CDN/CDNFILESLIBRARY

This example returns a list of CDN Origins.

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
New -SPOPublicCdnOrigin
Remove-SPOPublicCdnOrigin
minutes to read • Edit Online

Get-SPOSite
In ths Article

Returns one or more site collections.

Syntax
Get-SPOSite [[-Identity] <SpoSitePipeBind>] [-Detailed] [-Limit <String>] [<CommonParameters>]

Get-SPOSite [-Detailed] [-Filter <String>] [-IncludePersonalSite <Boolean>] [-Limit <String>]


[-Template <String>] [<CommonParameters>]

Get-SPOSite [-Identity] <SpoSitePipeBind> [-DisableSharingForNonOwnersStatus] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets.
The Get-SPOSite cmdlet retrieves and returns properties of all site collections that match the given criteria.
With version 5361 of the SharePoint Online Management Shell, you may experience the following:
Additional site collections are now displayed. For example, all group and video sites along with team sites will be
displayed.
The Detailed parameter has been deprecated. It will continue to work with earlier versions

NOTE
Site collections in the Recycle Bin will not be retrieved by using the Get-SPOSite cmdlet.

You need to be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832.

NOTE
If Site Collection Storage Management is enabled for the tenant, you will not be able to set quota and will have a generic
error returned. To workaround this issue, set the site collection storage management to "manual" temporarily, set your
quotas and then set the site collection storage management setting back to its original setting.
Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOSite

Example 1 returns all site collections.


-----------------------EXAMPLE 2-----------------------------

Get-SPOSite -Identity https://contoso.sharepoint.com

Example 2 lists the site collection with detailed properties.


-----------------------EXAMPLE 3-----------------------------

Get-SPOSite -Identity https://contoso.sharepoint.com -DisableSharingForNonOwnersStatus

Example 3 Updates status on if the non owners of a site collection can share the site collection (does not set this
value).
-----------------------EXAMPLE 4-----------------------------

Get-SPOSite -Template GROUP#0 -IncludePersonalSite:$false

This example enumerates Group Site Collections in a tenant.


-----------------------EXAMPLE 5-----------------------------

Get-SPOSite -Identity https://contoso.sharepoint.com/sites/groupname -detailed |fl

This example gets quota details for a Group Site.

Parameters
-Detailed
Use this parameter to get additional property information on a site collection. You will notice a slower response
time when the Detailed parameter is used.
The following properties are returned:
--ResourceUsageCurrent
--ResourceUsageAverage
--StorageUsageCurrent
--LockIssue
--WebsCount
--CompatibilityLevel
--AllowSelfServiceUpgrade
--SiteDefinedSharingCapability-returns the stored value of the site policy.
--SharingCapability --returns the effective access level (the site policy and the tenant policy combined.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableSharingForNonOwnersStatus
This parameter prevents non-owners from sharing.

NOTE
This parameter is available only in SharePoint Online Management Shell Version 16.0.4613.1211 or later.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies the script block of the server-side filter to apply. The type must be a valid filter name and value must be in
the form {$_PropertyName <operator> "filterValue"} . Valid operators are as follows: eq, ne, like, notlike. Currently,
you can filter by these properties: Owner, Template, LockState, Url.

NOTE
The operator values are case-sensitive.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL of the site collection.

Type: SpoSitePipeBind
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-IncludePersonalSite
Displays personal sites when value is set to $true.
The values are $true and $false. By default, the value is $false which means no personal sites will be returned.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Limit
Specifies the maximum number of site collections to return. It can be any number. To retrieve all site collections, use
ALL. The default value is 200.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Displays sites of a specific template. For example, STS, STS#0 or STS#1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind

Outputs
System.Object
minutes to read • Edit Online

Get-SPOSiteCollectionAppCatalogs
In ths Article

Use this cmdlet to get the Site Collection App Catalog.

Syntax
Get-SPOSiteCollectionAppCatalogs [-Site] <SpoSitePipeBind> [<CommonParameters>]

Description
Use this cmdlet to get the Site Collection App Catalog. For more information, see Use the App Catalog to make
custom business apps available for your SharePoint environment

Examples
Example 1

Get-SPOSiteCollectionAppCatalogs -Site https://contoso.sharepoint.com/sites/Research

This example returns the Site Collection App Catalog for the site https://contoso.sharepoint.com/sites/Research.

Parameters
-Site
Url of the site

Type: SpoSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOSiteContentMoveState
In ths Article

This Cmdlet allows a SharePoint administrators to check the status of a site or group move.

Syntax
Get-SPOSiteContentMoveState [-GroupName] <String> [<CommonParameters>]

Get-SPOSiteContentMoveState [-SourceSiteUrl] <String> [<CommonParameters>]

Description
This command gets the information and the status of a move request of a user between sites in a SharePoint
Online Multi Geo tenant.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOSiteContentMoveState -GroupName "group@contoso.com"

Gets the status of the site content for the group "group@contoso.com"
-----------------------EXAMPLE 2-----------------------------

Get-SPOSiteContentMoveState -SourceSiteUrl $siteurl

Gets the status of the site content give on the variable $siteurl

Parameters
-GroupName
PARAMVALUE: String

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceSiteUrl
PARAMVALUE: String

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
minutes to read • Edit Online

Get-SPOSiteDataEncryptionPolicy
In ths Article

Validates the encryption of a Group Site, Team Site, or OneDrive for Business site if a Customer Key has been
registered for the site.

Syntax
Get-SPOSiteDataEncryptionPolicy [-Identity] <SpoSitePipeBind> [<CommonParameters>]

Description
When a Customer Key has been configured in the Azure tenant, it is possible to set and subsequently verify the
encryption status of a SharePoint Online or OneDrive for Business site. This cmdlet verifies the encryption status
of the particular site.
This cmdlet will return an error if the Azure tenant has not been configured with a Customer Key. See the Related
Links section for more information on how to configure the Customer Key.

Examples
Example 1

Get-SPOSiteDataEncryptionPolicy https://contoso.sharepoint.com/sites/Research

Verifies the encryption of the site https://contoso.sharepoint.com/sites/Research.

Parameters
-Identity
The URL of the Site Collection.

Type: SpoSitePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.String
The URI of the primary key.
Outputs
System.String
The URI of the secondary key.

Outputs
System.Object
The encryption status for the geo. Possible states include:
Unregistered: Customer Key encryption has not yet been applied.
Registering: Customer Key encryption has been applied and your files are in the process of being encrypted. If your
geo is in this state, you'll also be shown information on what percentage of sites in the geo are complete so that
you can monitor encryption progress.
Registered: Customer Key encryption has been applied, and all files in all sites have been encrypted.
Rolling: A key roll is in progress. If your geo is in this state, you'll also be shown information on what percentage of
sites have completed the key roll operation so that you can monitor progress.

Related Links
Register-SPODataEncryptionPolicy
Controlling your data in Office 365 using Customer Key
Office 365: Setting up Customer Key for SharePoint Online and OneDrive for Business
minutes to read • Edit Online

Get-SPOSiteDesign
In ths Article

Gets details about site designs that are on the SharePoint tenant. You can specify an ID of a specific site design to
retrieve. If there are no parameters listed, details about all site designs are listed.

Syntax
Get-SPOSiteDesign [[-Identity] <SPOSiteDesignPipeBind>] [<CommonParameters>]

Description
Gets details about site designs that are on the SharePoint tenant. You can specify an ID of a specific site design to
retrieve. If there are no parameters listed, details about all site designs are listed.

Examples
Example 1
This example and sample response show how to get site design details.

Get-SPOSiteDesign 44252d09-62c4-4913-9eb0-a2a8b8d7f863

Id : 44252d09-62c4-4913-9eb0-a2a8b8d7f863
Title : Contoso - Team Project
WebTemplate : 64
SiteScriptIds : {1306913c-8463-42ca-bd63-efad0fcdbba4}
Description : Use this design to apply Contoso theme and create
custom lists and add to nav

Parameters
-Identity
The ID of the site design to retrieve.

Type: SPOSiteDesignPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOSiteDesignRights
In ths Article

Displays a list of principals and their rights for usage of the site design. This can be used to determine the scope
that your site design has with users on the tenant.

Syntax
Get-SPOSiteDesignRights [-Identity] <SPOSiteDesignPipeBind> [<CommonParameters>]

Description
Displays a list of principals and their rights for usage of the site design. This can be used to determine the scope
that your site design has with users on the tenant.

Examples
Example 1
This example gets the rights for a site design.

Get-SPOSiteDesignRights 607aed52-6d61-490a-b692-c0f58a6981a1

DisplayName PrincipalName Rights


----------- ------------- ------
Nestor Wilke i:0#.f|membership|nestorw@contoso.onmicrosoft.com View

Parameters
-Identity
The ID of the site design to get scoping information.

Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOSiteDesignRun
In ths Article

Retrieves a list of site designs applied to a specified site collection.

Syntax
Get-SPOSiteDesignRun [-WebUrl] <String> [[-SiteDesignId] <SPOSiteDesignPipeBind>] [<CommonParameters>]

Description
Retrieves a list of site designs applied to a specified site collection. The WebUrl is required to know which site
collection to query. The returned output includes the ID of the scheduled job, the web and site IDs, and the site
design ID, version, and title.

Examples
------------ Example 1 --------------------
This example would return a list of the site designs applied to the specified site. Providing a specific site design ID
will return the details for just that applied site design.

PS C:\> Get-SPOSiteDesignRun -WebUrl "https://contoso.sharepoint.com/sites/project-playbook"

Id: | sean530z-55a3-4804-8b0a-80578626d6ef
SiteDesignId: | sean530b-4133-444e-9e31-fb0c07f69d3a
WebId: | 4f8509cd-7972-44d0-a14a-3c8ad69ee50f
SiteId: | d5d19d7c-sean-4625-9461-281bfc8a9ece
SiteDesignVersion: | 3
SiteDesignTitle: | Contoso Project Playbook

Parameters
-SiteDesignId
The ID of a specific site design. Use this optional parameter if you wish to only return details on a specific site
design run.

Type: SPOSiteDesignPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebUrl
The Url of the site collection.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Online.SharePoint.PowerShell.SPOSiteDesignPipeBind

Outputs
System.Object

Related Links
Get-SPOSiteDesignRunStatus
minutes to read • Edit Online

Get-SPOSiteDesignRunStatus
In ths Article

Retrieves and displays a list of all site script actions executed for a specified site design applied to a site.

Syntax
Get-SPOSiteDesignRunStatus [-Run] <SPOSiteDesignRun> [<CommonParameters>]

Description
Retrieves and displays a list of all site script actions executed for a specified site design applied to a site.

Examples
Example 1
This example gets the run for a specific site design applied to a site and sets it to a variable. This variable is then
passed into the command -run parameter. The result is a display of all the site script actions applied for that site
design run, including the script action title and outcome.

$myrun = Get-SPOSiteDesignRun -WebUrl "https://contoso.sharepoint.com/sites/project-playbook" -SiteDesignId


cefd782e-sean-4814-a68a-b33b116c302f

Get-SPOSiteDesignRunStatus -Run $myrun

OrdinalIndex: | 0
SiteScriptId: | sean530b-4133-444e-9e31-fb0c07f69d3a
SiteScriptTitle: | project tracker script for contoso legal
SiteScriptIndex: | 0
ActionIndex: | 0
ActionTitle: | Add principal contoso legal team to SPGroup Owners.
ActionKey: | 4f8509cd-0000-0000-0000-00000000
OutcomeCode: | Success
OutcomeText: |

OrdinalIndex: | 1
SiteScriptId: | sean530b-4133-444e-9e31-abc123abc123
SiteScriptTitle: | project tracker script for contoso legal
SiteScriptIndex: | 0
ActionIndex: | 1
ActionTitle: | Apply theme Contoso Legal.
ActionKey: | 4f8509cd-0000-0000-0000-00000000
OutcomeCode: | Success
OutcomeText: |

Parameters
-Run
The site design run for the desired set of script action details.

Type: SPOSiteDesignRun
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Online.SharePoint.PowerShell.SPOSiteDesignRun

Outputs
System.Object

Related Links
Get-SPOSiteDesignRun
minutes to read • Edit Online

Get-SPOSiteDesignTask
In ths Article

Cmdlet to get a scheduled site design script.

Syntax
Get-SPOSiteDesignTask -Identity <guid> -WebUrl <string> [<CommonParameters>]

Description
Used to retrieve a scheduled site design script. It takes the ID of the scheduled site design and the URL fo the
SPWeb where the site design is scheduled to be applied.

NOTE
This command only retrieves a previously scheduled request.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOSiteDesignTask -Identity 501z8c32-4147-44d4-8607-26c2f67cae82 -WebUrl


"https://contoso.sharepoint.com/sites/projectawesome"

This example returns a scheduled site design whose ID is 501z8c32-4147-44d4-8607-26c2f67cae82 and which
was applied on the site https://contoso.sharepoint.com/sites/projectawesome.

Parameters
-Identity
The ID of the scheduled site design to apply.

Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebUrl
The URL of the site collection where the site design will be applied.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPOSiteDesignTask
Get-SPOSiteDesignRun
Get-SPOSiteDesignRunStatus
minutes to read • Edit Online

Get-SPOSiteGroup
In ths Article

Gets all the groups on the specified site collection.

Syntax
Get-SPOSiteGroup [-Group <String>] [-Limit <Int32>] -Site <SpoSitePipeBind> [<CommonParameters>]

Description
Use the Get-SPOSiteGroup cmdlet to get all the groups on the specified site collection by using the Site parameter.
You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at SharePoint Online PowerShell.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOSiteGroup -Site https://contoso.sharepoint.com/sites/siteA

This example returns all the groups on the specified site collection https://contoso.sharepoint.com/sites/siteA.

Parameters
-Group
Specifies the group name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Limit
Specifies the maximum number of site collections to return. To retrieve all of the site collections, use Limit ALL. The
default value is 200.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the site collection scope.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Set-SPOSiteGroup
Remove-SPOSiteGroup
minutes to read • Edit Online

Get-SPOSiteRenameState
In ths Article

Returns the current rename job state of a SharePoint Online Site.

Syntax
Get-SPOSiteRenameState -Identity <SpoSitePipeBind> [-WhatIf] [-Confirm] [<CommonParameters>]

Get-SPOSiteRenameState [-State <RenameState>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Use this cmdlet to return the current rename job state of a SharePoint Online Site.

Examples
Example 1

Get-SPOSiteRenameState -Identity https://contoso.sharepoint.com/sites/ContosoWeb1

This example returns the rename job state of ContosoWeb1 Site.


Example 2

Get-SPOSiteRenameState -State InProgress

This example returns rename jobs that are in InProgress state.

Parameters
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The urls of the site to be renamed.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-State
The state of the rename job, possible values are
Success
InProgress
Fail

Type: RenameState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOSiteScript
In ths Article

Displays information about existing site scripts. When no parameter is provided, this cmdlet returns the Id , Title ,
Description , and Version of each site script. When a site script ID is provided, this cmdlet also returns the Content ,
which is the JSON of the site script.

Syntax
Get-SPOSiteScript [[-Identity] <SPOSiteScriptPipeBind>] [<CommonParameters>]

Description
Displays information about existing site scripts. When no parameter is provided, this cmdlet returns the Id, Title,
Description, and Version of each site script. When a site script ID is provided, this cmdlet also returns the
Content, which is the JSON of the site script.

Examples
Example 1
This example shows how to get script information for a specific script ID.

Get-SPOSiteScript 07702c07-0485-426f-b710-4704241caad9

Id : 07702c07-0485-426f-b710-4704241caad9
Title : Contoso theme
Description :
Content : {
"$schema": "schema.json",
"actions": [
{
"verb": "applyTheme",
"themeName": "Custom Cyan"
}
],
"bindata": { },
"version": 1
}
Version : 1

Parameters
-Identity
The ID of the site script to get information about.
Type: SPOSiteScriptPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOSiteScriptFromList
In ths Article

Creates site script syntax from an existing SharePoint list.

Syntax
Get-SPOSiteScriptFromList -ListUrl <string> [<CommonParameters>]

Description
Uses an existing SharePoint list to output a JSON blob that can be used to create a site script for use in a site
design.

Examples
Example 1
This example creates the site script output from an existing list - and writes it to a variable. This variable is then
referenced to create a site script.

$extracted = Get-SPOSiteScriptFromList -ListUrl "https://contoso.sharepoint.com/sites/strategy/customer-


contacts"
Add-SPOSiteScript `
-Title "Contoso Customer Tracker"
-Description "This creates a customer contact list"
-Content $extracted

Parameters
-ListUrl
The url of the list to be referenced for the JSON output.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOSiteScriptFromWeb
In ths Article

Creates site script syntax from an existing SharePoint site.

Syntax
Get-SPOSiteScriptFromWeb [-WebUrl] <string> [-IncludedLists <string[]>] [-IncludeBranding] [-IncludeTheme] [-
IncludeRegionalSettings] [-IncludeSiteExternalSharingCapability] [-IncludeLinksToExportedItems]
[<CommonParameters>]

Description
Uses an existing SharePoint site to output a JSON blob that can be used to create a site script for use in a site
design.

Examples
Example 1
This example creates the site script output from an existing site - and writes it to a variable. This variable is then
referenced to create a site script.

C:\> $extracted = Get-SPOSiteScriptFromWeb `


-WebUrl https://contoso.sharepoint.com/sites/template `
-IncludeBranding `
-IncludeTheme `
-IncludeRegionalSettings `
-IncludeSiteExternalSharingCapability `
-IncludeLinksToExportedItems `
-IncludedLists ("Shared Documents", "Lists/Project Activities")
C:\> Add-SPOSiteScript `
-Title "Contoso template site" `
-Description "This is a copy of a site collection." `
-Content $extracted

Parameters
-IncludeBranding
A switch that if provided, extracts the configuration of the site's branding.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IncludedLists
An array of one or more lists. Each is identified by the list url.

Type: string[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeLinksToExportedItems
A switch that if provided, extracts navigation links. In order to export navigation links pointing to lists, the list needs
to be included in the request as well.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeRegionalSettings
A switch that if provided, extracts the site's regional settings.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeSiteExternalSharingCapability
A switch that if provided, extracts the site's external sharing capability.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeTheme
A switch that if provided, extracts the site's custom theme by using the themeJson property.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebUrl
The url that starts with HTTPS of the site to retrieve the site script.

Type: string
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOSiteUserInvitations
In ths Article

Syntax
Get-SPOSiteUserInvitations [-Site] <SpoSitePipeBind> [-EmailAddress] <string> [<CommonParameters>]

Description
.

Examples
Example 1

Parameters
-EmailAddress
.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
.

Type: SpoSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOStorageEntity
In ths Article

Tenant properties allow tenant administrators to add properties in the app catalog that can be read by various
SharePoint Framework components. Because tenant properties are stored in the tenant app catalog, you must
provide the tenant app catalog site collection URL or the site collection app catalog URL in the following cmdlets.
This cmdlet is used to get a value in the property bag.

Syntax
Get-SPOStorageEntity [-Site] <SpoSitePipeBind> [-Key] <string> [<CommonParameters>]

Description
Use this cmdlet to get a value in the property bag.

Examples
Example 1

Get-SPOStorageEntity -Site "https://tenant-name.sharepoint.com/sites/app-catalog" -Key "MyCustomValues"

This example returns the whole entry in the property bag.

Parameters
-Key
The key in the property bag that should be returned.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
URL to the tenant or site collection app catalog.
Type: SpoSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPOTenant
In ths Article

Returns SharePoint Online organization properties.

Syntax
Get-SPOTenant [<CommonParameters>]

Description
The Get-SPOTenant cmdlet returns organization-level site collection properties such as StorageQuota,
StorageQuotaAllocated, ResourceQuota, ResourceQuotaAllocated and SiteCreationMode.
Currently, there are no parameters for this cmdlet.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
------------ Example 1 --------------------

Get-SPOTenant

This example returns the organization-level site collection properties such as StorageQuota,
StorageQuotaAllocated, ResourceQuota, ResourceQuotaAllocated, SiteCreationMode and OneDriveStorageQuota.

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
minutes to read • Edit Online

Get-SPOTenantCdnEnabled
In ths Article

Returns whether Public content delivery network (CDN ) or Private CDN is enabled on the tenant level. Requires
Tenant administrator permissions.

Syntax
Get-SPOTenantCdnEnabled -CdnType <SPOTenantCdnType> [<CommonParameters>]

Description
Returns whether Public content delivery network (CDN ) or Private CDN is enabled on the tenant level.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOTenantCdnEnabled -CdnType Public

The example returns a CDN with a type of public.

Parameters
-CdnType
Specifies the CDN type. The valid values are Public or Private.

Type: SPOTenantCdnType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Get-SPOTenantCdnOrigins
In ths Article

Lists all the configured origins under the tenancy or under a given site. Requires Tenant administrator permissions.

Syntax
Get-SPOTenantCdnOrigins -CdnType <SPOTenantCdnType> [<CommonParameters>]

Description
Lists all the configured origins under the tenancy or under a given site.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOTenantCdnOrigins -CdnType Public

The example returns a list of origins from the Tenant.

Parameters
-CdnType
Specifies the CDN type. The valid values are: Public or Private.

Type: SPOTenantCdnType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Get-SPOTenantCdnPolicies
In ths Article

Get the public or private Policies applied on your SharePoint Online Tenant. Requires Tenant administrator
permissions.

Syntax
Get-SPOTenantCdnPolicies -CdnType <SPOTenantCdnType> [<CommonParameters>]

Description
This cmdlet gets the public or private policies applied to a SharePoint Online organization tenant.

Examples
Example 1

Get-SPOTenantCdnPolicies -CdnType Public

This example returns public CDN policies of your tenant.


Example 2

Get-SPOTenantCdnPolicies -CdnType Private

This example returns private CDN policies of your tenant.

Parameters
-CdnType
Type of CDN on the current SPO Tenant (Public,Private)

Type: SPOTenantCdnType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Set-SPOTenantCdnEnabled
minutes to read • Edit Online

Get-SPOTenantContentTypeReplicationParameters
In ths Article

Gets content types for replication parameters

Syntax
Get-SPOTenantContentTypeReplicationParameters [<CommonParameters>]

Description
Before you run the cmdlets, please use Connect-SPOService to connect to SharePoint Online first. This Cmdlets gets
the content types that are being replicated from primary location to satellite

Examples
Example 1

Get-SPOTenantContentTypeReplicationParameters

Gets content types for replication parameters

Related Links
Introduction to the SharePoint Online management shell
SharePoint Online Management Shell Download
Get-SPOAppErrors
Get-SPOTenantTaxonomyReplicationParameters
Set-SPOTenantTaxonomyReplicationParameters
Set-SPOTenantContentTypeReplicationParameters
minutes to read • Edit Online

Get-SPOTenantLogEntry
In ths Article

Retrieves SharePoint Online company logs.

Syntax
Get-SPOTenantLogEntry [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>] [[-MaxRows] <UInt32>]
-CorrelationId <Guid> [<CommonParameters>]

Get-SPOTenantLogEntry [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>] [[-MaxRows] <UInt32>]


-Source <Int32> [<CommonParameters>]

Get-SPOTenantLogEntry [[-StartTimeInUtc] <DateTime>] [[-EndTimeInUtc] <DateTime>] [[-MaxRows] <UInt32>]


-User <String> [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets.
The Get-SPOTenantLogEntry cmdlet cannot retrieve all SharePoint Online errors. This cmdlet retrieves a subset of
errors that happen due to external systems.
For Beta 2, the only company logs available are for Business Connectivity Services (BCS ).

NOTE
If you do not use any parameter, the first 1000 rows in descending time range are returned.

You must be a SharePoint Online global administrator to run the cmdlet.


For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOTenantLogEntry

This example retrieves all logs that are available.


-----------------------EXAMPLE 2-----------------------------

Get-SPOTenantLogEntry -MaxRows 500

This example retrieves the first 500 log entries.


-----------------------EXAMPLE 3-----------------------------

$endTimeinUTC = Get-SPOTenantLogLastAvailableTimeInUtc
$startTimeinUTC = $endTimeinUTC.AddDays(-14)
$tenantlogs = Get-SPOTenantLogEntry -StartTimeinUtc $startTimeinUTC -EndTimeinUTC $endTimeinUTC

This example retrieves log entries recorded over that previous 14 days.
-----------------------EXAMPLE 4-----------------------------

$endTimeinUTC = Get-SPOTenantLogLastAvailableTimeInUtc
$startTimeinUTC = $endTimeinUTC.AddDays(-14)
$tenantlogs = Get-SPOTenantLogEntry -StartTimeinUtc $startTimeinUTC -EndTimeinUTC $endTimeinUTC -CorrelationId
e2c2be70-6382-4ce7-8a44-ae7dadff5597

This example retrieves log entries recorded over that previous 14 days that have the CorrelationId of "e2c2be70-
6382-4ce7-8a44-ae7dadff5597".

Parameters
-CorrelationId
Specifies the Correlation ID as a filter.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTimeInUtc
Specifies the end time in UTC to search for logs.

Type: DateTime
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxRows
Specifies the maximum number of rows in the descending order of timestamp. The value must be less than 5000.
The default value is 1000.
Type: UInt32
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Source
Specifies the component that logs the errors.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTimeInUtc
Specifies the start time in Coordinated Universal Time (UTC ) to search for the logs (for example, 01032011:12:00).

Type: DateTime
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-User
Specifies the log-on identity as a filter.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Get-SPOTenantLogLastAvailableTimeInUtc
In ths Article

Returns the most recent time when the SharePoint Online organization logs were collected.

Syntax
Get-SPOTenantLogLastAvailableTimeInUtc [<CommonParameters>]

Description
This cmdlet retrieves the time in Coordinated Universal Time (UTC ) when the logs were last collected. After you
know the time, you can use the Get-SPOTenantLogEntry cmdlet to retrieve the logs.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOTenantLogLastAvailableTimeInUtc

This example returns the time in UTC when the SharePoint Online organization logs were most recently collected.

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Get-SPOTenantLogEntry
minutes to read • Edit Online

Get-SPOTenantOrgRelation
In ths Article

{{ Fill in the Synopsis }}

Syntax
Get-SPOTenantOrgRelation [<CommonParameters>]

Description
{{ Fill in the Description }}

Examples
Example 1

Get-SPOTenantOrgRelation

{{ Add example description here }}

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Get-SPOTenantOrgRelationByPartner
In ths Article

{{ Fill in the Synopsis }}

Syntax
Get-SPOTenantOrgRelationByPartner [-PartnerCompanyId] <Guid> [[-PartnerInstanceId] <Guid>] [<CommonParameters>]

Description
{{ Fill in the Description }}

Examples
Example 1

{{ Add example description here }}

Parameters
-PartnerCompanyId
{{ Fill PartnerCompanyId Description }}

Type: Guid
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartnerInstanceId
{{ Fill PartnerInstanceId Description }}

Type: Guid
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Get-SPOTenantOrgRelationByScenario
In ths Article

{{ Fill in the Synopsis }}

Syntax
Get-SPOTenantOrgRelationByScenario [-Scenario] <OrgRelationScenario> [-PartnerRole] <OrgRelationRole>
[<CommonParameters>]

Description
{{ Fill in the Description }}

Examples
Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Parameters
-PartnerRole
{{ Fill PartnerRole Description }}

Type: OrgRelationRole
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scenario
{{ Fill Scenario Description }}

Type: OrgRelationScenario
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Get-SPOTenantServicePrincipalPermissionGrants
In ths Article

Gets the collection of permission grants for the "SharePoint Online Client" service principal

Syntax
Get-SPOTenantServicePrincipalPermissionGrants

Description
Gets the collection of permission grants for the "SharePoint Online Client" service principal.
A permission grant contains the following properties:
ClientId: The objectId of the service principal granted consent to impersonate the user when accessing the
resource (represented by the resourceId).
ConsentType: Whether consent was provided by the administrator on behalf of the organization or whether
consent was provided by an individual. The possible values are "AllPrincipals" or "Principal".
ObjectId: The unique identifier for the permission grant.
(Coming soon) Resource: The resource to which access has been granted.

ResourceId: The objectId of the resource service principal to which access has been granted.
Scope: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.

Examples
------------------EXAMPLE 1------------------

Get-SPOTenantServicePrincipalPermissionGrants

Gets the collection of permission grants for the "SharePoint Online Client" service principal.
minutes to read • Edit Online

Get-SPOTenantServicePrincipalPermissionRequests
In ths Article

Gets the collection of permission requests for the "SharePoint Online Client" service principal

Syntax
Get-SPOTenantServicePrincipalPermissionRequests

Description
Gets the collection of permission requests for the "SharePoint Online Client" service principal.
Permission request object
A permission request contains the following properties:
Id: The identifier of the request.
Resource: The resource that the application requires access to.
Scope: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.

Examples
------------------EXAMPLE 1------------------

Get-SPOTenantServicePrincipalPermissionRequests

Gets the collection of permission requests for the "SharePoint Online Client" service principal.
minutes to read • Edit Online

Get-SPOTenantSyncClientRestriction
In ths Article

Returns the current configuration status.

Syntax
Get-SPOTenantSyncClientRestriction [<CommonParameters>]

Description
You must be a SharePoint Online global administrator to run the cmdlet.
Requires a valid Connect-SPOService context to identify the tenant. For information on how to connect to the
tenant, see Connect-SPOService .
The Get-SPOTenantSyncClientRestriction cmdlet returns whether the TenantRestrictionEnabled property is true or
false and DomainGUIDs that are currently in the safe recipient list which is represented by the AllowedDomainList
property.
The Get-SPOTenantSyncClientRestriction cmdlet also returns the current state of the BlockMacSync parameter.
The Get-SPOTenantSyncClientRestriction cmdlet also returns the current state of the GrooveBlockOption
parameter.
The Get-SPOTenantSyncClientRestriction cmdlet does not have any parameters.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOTenantSyncClientRestriction

This example returns a current boolean value of the TenantRestrictionEnabled and BlockMacSync properties and a
current set list of domains GUIDs in the AllowedDomainList property.

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Get-SPOTenantTaxonomyReplicationParameters
In ths Article

Get the replication parameters to manage Multi-Geo taxonomy replication.

Syntax
Get-SPOTenantTaxonomyReplicationParameters [<CommonParameters>]

Description
Before using this cmdlet, make sure you connect to Sharepoint Online using Connect-SPOService and the
desirable satellite location URL as the -Url parameter.
This Cmdlet gets the replication parameters and it works to get the replication taxonomy in a Multi-Geo tenant. It
works with the Set-SPOTenantTaxonomyReplicationParameters to set the parameters.
Get the sites to be replicated in a Multi-Geo taxonomy replication.

Examples
Example 1

Get-SPOTenantTaxonomyReplicationParameters

Gets the replication groups that are being replicated on the current tenant.

Related Links
Introduction to the SharePoint Online management shell
SharePoint Online Management Shell Download
Get-SPOAppErrors
Set-SPOTenantTaxonomyReplicationParameters
Get-SPOTenantContentTypeReplicationParameters
Set-SPOTenantContentTypeReplicationParameters
minutes to read • Edit Online

Get-SPOTheme
In ths Article

Retrieves settings for an existing theme.

Description
The Get-SPOTheme cmdlet returns the settings for a named existing theme, or for all uploaded themes if no
name is provided.

Examples
Example 1
This example shows how to use the Get-SPOTheme cmdlet to return the settings for the "Custom Cyan" theme
created in the example for the Add-SPOTheme cmdlet. Note that this example uses the PowerShell
ConvertTo-Json filter to display the theme in JSON format.

Get-SPOTheme -Name "Custom Cyan" | ConvertTo-Json

{
"Name": "Custom Cyan",
"Palette": {
"themeLight": "#affefe",
"themeTertiary": "#76ffff",
"black": "#000000",
"neutralSecondary": "#666666",
"neutralTertiaryAlt": "#c8c8c8",
"themeSecondary": "#39ffff",
"themeDarker": "#005252",
"primaryBackground": "#fff",
"neutralQuaternary": "#d0d0d0",
"neutralPrimaryAlt": "#3c3c3c",
"neutralPrimary": "#333",
"themeDark": "#009090",
"themeLighter": "#daffff",
"neutralTertiary": "#a6a6a6",
"neutralQuaternaryAlt": "#dadada",
"themeLighterAlt": "#f3fcfc",
"white": "#fff",
"neutralSecondaryAlt": "#767676",
"neutralLighter": "#f4f4f4",
"neutralLight": "#eaeaea",
"neutralDark": "#212121",
"themeDarkAlt": "#00c4c4",
"neutralLighterAlt": "#f8f8f8",
"primaryText": "#333",
"themePrimary": "#00ffff"
},
"IsInverted": false
}

Example 2
To return all uploaded themes, use the Get-SPOTheme command with no arguments.

Get-SPOTheme
minutes to read • Edit Online

Get-SPOUnifiedGroup
In ths Article

Retrieves the Preferred Data Location for the specified Office 365 Group.

Syntax
Get-SPOUnifiedGroup [-GroupAlias] <string> [<CommonParameters>]

Description
Retrieves the Preferred Data Location (PDL ) for the specified Office 365 Group. The customer tenant must be
multi-geo enabled.

Examples
Example 1

Get-SPOUnifiedGroup -GroupAlias EUTeam

Returns the PDL for the Office 365 Group named 'EUTeam'.

Parameters
-GroupAlias
The alias of the Office 365 Group.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Move a SharePoint site to a different geo location
minutes to read • Edit Online

Get-SPOUnifiedGroupMoveState
In ths Article

Returns the state of an Office 365 Group move between Preferred Data Locations.

Syntax
Get-SPOUnifiedGroupMoveState [-GroupAlias] <string> [<CommonParameters>]

Description
Retrieves the state of the Office 365 Group move to the Preferred Data Location (PDL ) for the specified. The
customer tenant must be multi-geo enabled.

Examples
Example 1

Get-SPOUnifiedGroupMoveState -GroupAlias EUTeam

Returns the status of the move between geos for the Office 365 Group named 'EUTeam'.

Parameters
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupAlias
The alias of the Office 365 Group.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.Object
The move status for the Office 365 Group. Possible values are:
Ready to Trigger: The move has not started.
Scheduled: The move is in queue but has not yet started.
InProgress (n/4): The move is in progress in one of the following states: Validation (1/4), Backup (2/4), Restore
(3/4), Cleanup (4/4).
Success: The move has completed successfully.
Failed: The move failed.

Notes
You can also apply the -Verbose option to see additional information about the move.

Related Links
Move a SharePoint site to a different geo location
minutes to read • Edit Online

Get-SPOUser
In ths Article

Returns the SharePoint Online user or security group accounts that match a given search criteria.

Syntax
Get-SPOUser [-Group <String>] [-Limit <String>] -Site <SpoSitePipeBind> [<CommonParameters>]

Get-SPOUser [-Limit <String>] -Site <SpoSitePipeBind> [<CommonParameters>]

Get-SPOUser [-LoginName <String>] -Site <SpoSitePipeBind> [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPOUser cmdlet matches one and only one user or security group.
You must be a SharePoint Online global administrator and a site collection administrator to run the Get-SPOUser
cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOUser -Site https://contoso.sharepoint.com/sites/finance

Example 1 returns all user or security group accounts from the site collection
https://contoso.sharepoint.com/sites/finance.
-----------------------EXAMPLE 2-----------------------------

Get-SPOUser -Site https://contoso.sharepoint.com/sites/finance -LoginName melissa.kerr@contoso.com

Example 2 returns one user or security group account whose user name is HYPERLINK
"mailto:melissa.kerr@contoso.com" melissa.kerr@contoso.com from the site collection
https://contoso.sharepoint.com/sites/finance.
-----------------------EXAMPLE 3-----------------------------

Get-SPOUser -Site https://contoso.sharepoint.com/sites/finance -Group "Team Site Members"

Example 3 returns one user or security group account inside group Team Site Members from the site collection
https://contoso.sharepoint.com/sites/finance.

Parameters
-Group
Specifies the group to get the users from.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Limit
Specifies the maximum number of users returned. The default value is to return 500 users. To return all users
specify the value "All".

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoginName
Specifies the user name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the URL of the site collection to get the user from.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Remove-SPOUser
Set-SPOUser
minutes to read • Edit Online

Get-SPOUserAndContentMoveState
In ths Article

This cmdlet allows a SharePoint administrators to check the status of a user or site move across geo locations.

Syntax
Get-SPOUserAndContentMoveState [-Limit <UInt32>] [-MoveDirection <Direction>] [-MoveEndTime <DateTime>]
[-MoveStartTime <DateTime>] [-MoveState <State>] [<CommonParameters>]

Get-SPOUserAndContentMoveState -OdbMoveId <Guid> [<CommonParameters>]

Get-SPOUserAndContentMoveState -UserPrincipalName <String> [<CommonParameters>]

Description
This command gets the information and the status of a move request of a user between sites in a SharePoint
Online Multi Geo tenant.
The following are the available move states:

STATUS DESCRIPTION

NotStarted The move has not started.

InProgress The move is in progress in one of the following states:


Validation, Backup, Restore, Cleanup.

Success The move has completed successfully.

Failed The move failed.

Examples
Example 1

Get-SPOUserAndContentMoveState -OdbMoveId b298219e-3440-10b8-8931-46e805e2b85b

Obtain the move state by OneDrive Move Job ID


Example 2
Get-SPOUserAndContentMoveState -MoveState NotStarted

Getting which moves are being done in a particular state


Example 3

Get-SPOUserAndContentMoveState -MoveDirection All

Gives you the output for users moving in and out from the geo location you are logged into
Example 4

Get-SPOUserAndContentMoveState -MoveDirection In

Gives you the output for users moving into the geo location that you are logged into
Example 5

Get-SPOUserAndContentMoveState -MoveDirection Out

Gives you the output for users moving out from the geo location that you are logged into
Example 6

Get-SPOUserAndContentMoveState -UserPrincipalName jezz@contoso.com

Obtains the status of the move for jezz@contoso.com

Parameters
-Limit
Get the limit of user on a single call of the parameter

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveDirection
Allows you to define the direction of the user move in relation to your current SharePoint location

Type: Direction
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveEndTime
Allows you to obtain the moves that are scheduled to end by a particular time, as defined in UTC

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveStartTime
Allows you to obtain the moves that are scheduled to begin at a particular time, as defined in UTC

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveState
Move State current status.

Type: State
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OdbMoveId
Onedrive GUID MoveID that you get when you start a job.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserPrincipalName
User Principal name is the unique property on Azure AD for each user.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Start-SPOUserAndContentMove
minutes to read • Edit Online

Get-SPOUserOneDriveLocation
In ths Article

This cmdlet will return the user principal name, current location, and corresponding OneDrive for Business url, and
the site ID. This cmdlet only supports Multi-Geo OneDrive sites.

Syntax
Get-SPOUserOneDriveLocation -UserPrincipalName <String> [<CommonParameters>]

Description
This command will return information about the OneDrive location for the specified user.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOUserOneDriveLocation -UserPrincipalName admin@contoso.com

Get the current location the user's OneDrive location, url, and site ID.

Parameters
-UserPrincipalName
PARAMVALUE: String

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
minutes to read • Edit Online

Get-SPOWebTemplate
In ths Article

Displays all site templates that match the given identity.

Syntax
Get-SPOWebTemplate [[-LocaleId] <UInt32>] [-CompatibilityLevel <Int32>] [-Name <String>] [-Title <String>]
[<CommonParameters>]

Description
The Get-SPOWebTemplate cmdlet displays all site templates that match the given identity and are available in
SharePoint Online.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOWebTemplate

Example 1 returns all the site templates in the language of the administrator site.
-----------------------EXAMPLE 2-----------------------------

Get-SPOWebTemplate -LocaleID 1036

Example 2 returns a list of all the French site templates.

Parameters
-CompatibilityLevel
Specifies the compatibility level of the site template.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-LocaleId
Specifies the Locale ID of the site template.

Type: UInt32
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the site template.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title
Specifies the Locale ID of the site template.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Grant-SPOHubSiteRights
In ths Article

Grants rights to users or mail-enabled security groups to associate their site with a hub site.

Syntax
Grant-SPOHubSiteRights [-Identity] <SpoHubSitePipeBind> -Principals
<string[]> -Rights {Join} [<CommonParameters>]

Description
Applies permissions to a set of users or mail-enabled security groups. Use this cmdlet to scope visibility of who can
associate their site with the hub site when using the SharePoint user interface. Hub sites are public by default. Once
you set permissions, only those groups or users you specified can associate their site with the hub site.
To view which users or groups have permissions to a site, use the Get-SPOHubSite cmdlet.

Examples
Example 1

Grant-SPOHubSiteRights https://contoso.sharepoint.com/sites/Marketing
-Principals nestorw@contoso.onmicrosoft.com
-Rights Join

This example shows how to grant rights to Nestor (a user at the fictional Contoso site) to associate his sites with
the marketing hub site.

Parameters
-Identity
URL of the hub site.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Principals
One or more principles to add permissions for.
Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rights
Always set to the value Join. Any user or group with Join permissions can view and join the hub site.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Grant-SPOSiteDesignRights
In ths Article

Used to apply permissions to a set of users or a security group, effectively scoping the visibility of the site design in
the UX. They start off public, but after you set permissions, only those groups or users with permissions can access
the site design.

Syntax
Grant-SPOSiteDesignRights
[-Identity] <SPOSiteDesignPipeBind>
-Principals <string[]>
-Rights {View}
[<CommonParameters>]

Description
Used to apply permissions to a set of users or a security group, effectively scoping the visibility of the site design in
the UX. They start off public, but after you set permissions, only those groups or users with permissions can access
the site design.

Examples
Example 1
This example shows how to grant view rights on a site design to Nestor (a user at the fictional Contoso site).

Grant-SPOSiteDesignRights `
-Identity 44252d09-62c4-4913-9eb0-a2a8b8d7f863 `
-Principals "nestorw@contoso.onmicrosoft.com" `
-Rights View

Parameters
-Identity
The ID of the site design to get scoping information.

Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Principals
One or more principles to add permissions for.

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rights
Always set to the value View. Any user or group with view permissions can view and use the site design.

Type: SPOSiteDesignPrincipalRights
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Invoke-SPOMigrationEncryptUploadSubmit
In ths Article

Creates a new migration job in the target site collection

Syntax
Invoke-SPOMigrationEncryptUploadSubmit -Credentials <CredentialCmdletPipeBind>
-MigrationSourceLocations <MigrationPackageLocation> [-NoLogFile] -TargetWebUrl <String> [<CommonParameters>]

Invoke-SPOMigrationEncryptUploadSubmit -Credentials <CredentialCmdletPipeBind> [-NoLogFile]


-SourceFilesPath <String> -SourcePackagePath <String> -TargetWebUrl <String> [<CommonParameters>]

Description
Creates a new migration job in the target site collection, and then returns a GUID representing the JobID. This
command will upload encrypted source files and manifests into temporary Azure blob storage per job.

Examples
Example 1

$job = Invoke-SPOMigrationEncryptUploadSubmit -SourceFilesPath $sourceFiles -SourcePackagePath $spoPackagePath


-Credentials $cred -TargetWebUrl $targetWebUrl

This example shows how to submit package data to create a new migration job
Example 2

$sourceFiles = "sourceFiles"
$spoPackagePath = "packagePath"
$credentials = Get-Credential
$targetweburl = "https://contoso.sharepoint.com"
Invoke-SPOMigrationEncryptUploadSubmit -SourceFilesPath $sourceFiles -SourcePackagePath $spoPackagePath -
Credentials $credentials -TargetWebUrl $targetweburl

This example shows how to submit package data to create a new migration job.
This article contains the steps on how to create this package: https://support.office.com/en-us/article/upload-on-
premises-content-to-sharepoint-online-using-powershell-cmdlets-555049c6-15ef-45a6-9a1f-a1ef673b867c
Example 3
This example shows how to submit package data to create new migration jobs for parallel import.
$jobs = $finalPackages | % {Invoke-SPOMigrationEncryptUploadSubmit -SourceFilesPath $_.FilesDirectory.FullName
-SourcePackagePath $_.PackageDirectory.FullName -Credentials $cred -TargetWebUrl $targetWeb}

Parameters
-Credentials
Parameter to fill out credentials of the SPO tenant.

Type: CredentialCmdletPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MigrationSourceLocations
Migration Location where the package lies.

Type: MigrationPackageLocation
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoLogFile
Controls if a log will be created or not

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceFilesPath
Source files Path, string

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourcePackagePath
Source Package Path.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetWebUrl
Target web URL

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Upload on-premises content to SharePoint Online using PowerShell cmdlets
Get-SPOAppErrors
minutes to read • Edit Online

Invoke-SPOSiteDesign
In ths Article

Applies a published site design to a specified site collection target. This allows a site design to be applied to an
existing site collection. The supported site templates you can apply a site design to include: "modern" team site
(with O365 group), "modern" team site (without an O365 group); communication site; classic team site; and classic
publishing site.

Syntax
Invoke-SPOSiteDesign
[-Identity]
-WebUrl <string>
[<CommonParameters>]

Description
Applies a published site design to a specified site collection target. This allows a site design to be applied to an
existing site collection.

Examples
Example 1
This example applies a site design whose script creates two lists, formats several of the columns, adds the lists to
the site navigation, and then joins the site to an existing hub site.

Invoke-SPOSiteDesign -Identity 501z8c32-4147-44d4-8607-26c2f67cae82 -WebUrl


"https://contoso.sharepoint.com/sites/projectgo"

Title Outcome
---------------------------------------------- -------
Create or update list Project Activities Success
Update list description Success
Create column Project Status Success
Create column Effort (days) Success
Set custom formatter for field Project Status Success
Set custom formatter for field Effort (days) Success
Create or update list Project Collateral Success
Create column Due Date Success
Set custom formatter for field Due Date Success
Add Project Activities to left nav Success
Add Project Collateral to left nav Success
Add to Hub Site Success

Parameters
-Identity
The ID of the site design to apply.

Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebUrl
The URL of the site collection where the site design will be applied.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Invoke-SPOSiteSwap
In ths Article

Invokes a job to swap the location of a site with another site while archiving the original site.

Syntax
Invoke-SPOSiteSwap
-SourceUrl <string>
-TargetUrl <string>
-ArchiveUrl <string>
[-DisableRedirection]
[-Force]
[-NoWait]
[<CommonParameters>]

Description
Swaps the location of a source site with a target site while archiving the original target site.
When the swap is initiated, the target site is moved to the archive location and the source site is moved to the
target location. By default, a site redirect is created at the source location that will redirect traffic to the target
location.
If the target is the root site at https://tenant-name.sharepoint.com, then the following preparation activities should
be performed prior to performing the swap:
1. Any Featured links defined in SharePoint Start Page at https://tenant-
name.sharepoint.com/_layouts/15/sharepoint.aspx will not be displayed after performing the swap. If required, the
Featured links should be documented so they can be manually recreated after the swap.
2. Functionality such as external sharing and application interfaces are dependent on the policies and permissions
defined at the root site. Review the source site to ensure that it has the required policies and permissions as per the
existing root site. This includes external sharing settings as well as site permissions.
3. Larger tenants that have more than ~10,000 licenses may also need to run the Page Diagnostic Tool against the
source site. Any analysis results that have the category Attention required (Red) or Improvement opprtunities
(Orange) will need to be remediated before performing the swap.

The source and target sites can't be connected to an Office 365 group. They also can't be hub sites or associated
with a hub. If a site is a hub site, unregister it as a hub site, swap the root site, and then register the site as a hub
site. If a site is associated with a hub, disassociate the site, swap the root site, and then reassociate the site.

Examples
EXAMPLE 1

Invoke-SPOSiteSwap -SourceUrl https://contoso.sharepoint.com/sites/CommunicationSite -TargetUrl


https://contoso.sharepoint.com -ArchiveUrl https://contoso.sharepoint.com/sites/Archive
Archives the existing site at https://contoso.sharepoint.com to https://contoso.sharepoint.com/sites/Archive and
moves https://contoso.sharepoint.com/sites/CommunicationSite to https://contoso.sharepoint.com. A site redirect
will be created at https://contoso.sharepoint.com/sites/CommunicationSite that will redirect any requests to
https://contoso.sharepoint.com.
EXAMPLE 2

Invoke-SPOSiteSwap -SourceUrl https://contoso.sharepoint.com/sites/SearchSite -TargetUrl


https://contoso.sharepoint.com/search -ArchiveUrl https://contoso.sharepoint.com/sites/Archive

Archives the existing Search Center site at https://contoso.sharepoint.com/search to


https://contoso.sharepoint.com/sites/Archive and moves the https://contoso.sharepoint.com/sites/SearchSite to
https://contoso.sharepoint.com/search. A site redirect be created at
https://contoso.sharepoint.com/sites/SearchSite that will redirect any requests to
https://contoso.sharepoint.com/search.
EXAMPLE 3

Invoke-SPOSiteSwap -SourceUrl https://contoso.sharepoint.com/sites/CommunicationSite -TargetUrl


https://contoso.sharepoint.com -ArchiveUrl https://contoso.sharepoint.com/sites/Archive -DisableRedirection

Archives the existing site at https://contoso.sharepoint.com to https://contoso.sharepoint.com/sites/Archive and


moves https://contoso.sharepoint.com/sites/CommunicationSite to https://contoso.sharepoint.com. A site redirect
will not be created at https://contoso.sharepoint.com/sites/CommunicationSite.
EXAMPLE 4

Invoke-SPOSiteSwap -SourceUrl https://contoso.sharepoint.com/sites/SearchSite -TargetUrl


https://contoso.sharepoint.com/search -ArchiveUrl https://contoso.sharepoint.com/sites/Archive -Force

Archives the existing Search Center site at https://contoso.sharepoint.com/search to


https://contoso.sharepoint.com/sites/Archive and moves the https://contoso.sharepoint.com/sites/SearchSite to
https://contoso.sharepoint.com/search. A site redirect be created at
https://contoso.sharepoint.com/sites/SearchSite that will redirect any requests to
https://contoso.sharepoint.com/search. Any warnings identified by the Page Diagnostic Tool will be ignored and the
swap will be initiated. However, any errors identified by the Page Diagnostic Tool will still prevent the swap from
being initiated.

Parameters
-ArchiveUrl
URL that the target site will be archived to. There should be no existing site, including a deleted site in the Recycle
Bin, at this location before performing the swap.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableRedirection
Disables the site redirect from being created at the Source URL location.
Type: Switch Parameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overrides and ignores any warnings that have been identified by the Page Diagnostic Tool that are preventing a
swap from being initiated. Any errors identified by the Page Diagnostic Tool will still always prevent a swap from
being initiated regardless of this parameter.

Type: Switch Parameter


Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoWait
This parameter is reserved for internal Microsoft use.

Type: Switch Parameter


Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceUrl
URL of the source site. The site at this location must exist before performing the swap.
If the target is the root site at https://tenant-name.sharepoint.com then the source site must be either a Team Site
(STS#0), a Modern Team Site (STS#3), or a Communication Site (SITEPAGEPUBLISHING#0).

If the target is the search center site at https://tenant-name.sharepoint.com/search then the source site must be
either a Search Center Site (SRCHCEN#0) or a Basic Search Center Site (SRCHCENTERLITE#0).

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetUrl
URL of the target site that the source site will be swapped to. The site at this location must exist before performing
the swap.
The target site must be either:
The root site at https://tenant-name.sharepoint.com; or
The search center site at https://tenant-name.sharepoint.com/search.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Modernize your root site
Manage site redirects
Page Diagnostic Tool
minutes to read • Edit Online

New-SPODataConnectionSetting
In ths Article

Creates a new Business Data Connectivity service connection.

Syntax
New-SPODataConnectionSetting -AuthenticationMode <ODataAuthenticationMode> -ServiceAddressURL <Uri>
-ServiceContext <SPServiceContextPipeBind> -Name <String> [-AssignmentCollection <SPAssignmentCollection>]
[-ExtensionProvider <String>] [-SecureStoreTargetApplicationId <String>] [<CommonParameters>]

Description
Use the New-SPODataConnectionSetting cmdlet to create a new Business Data Connectivity service connection and
its associated metadata properties in the farm. To see the metadata settings, use the
Get-SPODataConnectionSettingMetaData cmdlet.

This cmdlet applies to an on-premises environment only. You cannot use this command in the SharePoint Online
Management Shell.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831 (https://go.microsoft.com/fwlink/p/?
LinkId=251831).

Examples
------------------EXAMPLE------------------

New-SPODataConnectionSetting -Name "ContosoServiceApp" -ServiceContext "http://contoso" -ServiceAddressURL


"https://expensereporting.cloudapp.net/expensereporting.svc" -AuthenticationMode "Credentials" -
SecureStoreTargetApplicationId "DallasUserName"

This example creates a new Business Data Connectivity service connection named ContosoServiceApp.
In this process, a Microsoft Business Connectivity Services connection metadata object is created.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationMode
Specifies the type of authentication mode required for the Business Connectivity Services connection.
The value for the authentication mode is any one of the following options:

Type: ODataAuthenticationMode
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExtensionProvider
{{Fill ExtensionProvider Description}}

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Business Connectivity Services connection object.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecureStoreTargetApplicationId
Specifies the Secure Store Target Application ID. Works in conjunction with the AuthenticationMode parameter.
The value for the SecureStoreTargetApplicationId parameter is any one of the following options:
--Credentials --WindowsCredentials --DigestCredentials --ClientCertificate

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ServiceAddressURL
Specifies the URL for the OData service. The URL does not have be Internet facing. This is the final destination
from which data is retrieved.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context which is in the form of an instance of an SPServiceContext object, an
SPSiteAdministration object identifier, or a SPSite object. An example of a service context value is an identifier
from the ID field, a string identifier, a URI, or a string representation of a GUID.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPODataConnectionSetting
Remove-SPODataConnectionSetting
Set-SPODataConnectionSetting
minutes to read • Edit Online

New-SPOMigrationEncryptionParameters
In ths Article

Creates a new random encryption key for a migration job or package.

Syntax
New-SPOMigrationEncryptionParameters [<CommonParameters>]

Description
Creates a random encryption key for submission of a migration job or creation of a migration package. For use
with Submit-SPOMigrationJob , ConvertTo-SPOMigrationEncryptedPackage , and Set-SPOMigrationPackageAzureSource in
the -EncryptedParameter parameter for each cmdlet.

Examples
EXAMPLE 1

$o = New-SPOMigrationEncryptionParameters

Outputs a random encryption key and saves it in the $o variable.

Outputs
System.Byte
EncryptionKey: The randomly generated encryption key using
System.Security.Cryptography.AesCryptoServiceProvider class.

Outputs
Microsoft.Online.SharePoint.Migration.SPMigrationJobEncryptionMethod
EncryptionMethod: The encryption algorithm used to generate the EncryptionKey. Currently hardcoded to
AES256BC.

Related Links
Submit-SPOMigrationjob
ConvertTo-SPOMigrationEncryptedPackage
Set-SPOMigrationPackageAzureSource
Introduction to the SharePoint Online management shell
SharePoint Online Management Shell Download
minutes to read • Edit Online

New-SPOMigrationPackage
In ths Article

Cmdlet to create a new migration package based on source files in a local or network shared folder.

Syntax
New-SPOMigrationPackage [-SourceFilesPath] <String> [-OutputPackagePath] <String> [[-TargetWebUrl] <String>]
[[-TargetDocumentLibraryPath] <String>] [[-TargetDocumentLibrarySubFolderPath] <String>] [-IgnoreHidden]
[-IncludeFileSharePermissions] [-NoAzureADLookup] [-NoLogFile] [-ReplaceInvalidCharacters]
[<CommonParameters>]

Description
Cmdlet to create a new migration package based on source files in a local or network shared folder.

NOTE
Limits on the SPO package size and file size

LIM IT M AX SIZE (GB) DESCRIPTIO N

Package Size 2-4 The whole package can't exceed 4Gb

File Size 2 A single file inside the source folder can't


exceed 2 Gb.

Target Size - target site should remain non-accessible


to end user until migration is complete

NOTE
Limits on HTTP Get

LIM IT API GET (CHARS) DESCRIPTIO N

Action GET on API 260 chars The size of the API GET request can't
exceed 260 chars

Examples
-----------------------EXAMPLE 1-----------------------------
New-SPOMigrationPackage -SourceFilesPath \\fileserver\share\folder1 -OutputPackagePath
d:\MigrationPackages\Folder1_SrcPkg

New-SPOMigrationPackage -SourceFilesPath \\fileserver\share\folder1 -OutputPackagePath


d:\MigrationPackages\Folder1_SrcPkg -TargetWebUrl https://contoso.sharepoint.com/sites/TargetSite/TargetWeb -
TargetDocumentLibraryPath "Shared Documents" -TargetDocumentLibrarySubFolderPath "Sub Folder/Target Folder"

This example creates a new set of migration source package metadata files, using default URL values, in the
d:\MigrationPackages\Folder1_SrcPkg directory based on content files found in the \fileserver\share\folder1
source location.
-----------------------EXAMPLE 2-----------------------------

New-SPOMigrationPackage -SourceFilesPath \\fileserver\share\folder1 -OutputPackagePath


d:\MigrationPackages\Folder1_SrcPkg -TargetWebUrl https://contoso.sharepoint.com/sites/TargetSite/TargetWeb -
TargetDocumentLibraryPath "Shared Documents"

This example creates a new set of migration source package metadata files in the
d:\MigrationPackages\Folder1_SrcPkg directory based on content files found in the \fileserver\share\folder1
source location. The package is prepared using the document library path
"https://contoso.sharepoint.com/sites/TargetSite/TargetWeb/Shared Documents".

Parameters
-IgnoreHidden
Switch to ignore hidden files and folders.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeFileSharePermissions
Used to include permissions and sharing information into the generated manifest files in the package metadata.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoAzureADLookup
Switch to not lookup local user accounts in Azure Active Directory.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoLogFile
Used to not create a log file. The default is to create a new CreateMigrationPackage log file within the directory
specified within the OutputPackagePath parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputPackagePath
The directory location where the output package metadata files will be saved. If the directory does not exist, it will
be created.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReplaceInvalidCharacters
Switch to replace characters in file and folder names that would be invalid in SharePoint Online.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceFilesPath
The directory location where the source content files exist. This directory will be enumerated to create the package
metadata files.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDocumentLibraryPath
The web relative document library to use as the document library part of the base URL in the package metadata. If
this is not supplied, "Documents" will be used within the package metadata instead.
Type: String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDocumentLibrarySubFolderPath
Specifies the document library relative subfolder to use as the folder path part of the base URL in the package
metadata. If this is not provided, no value will be used within the package metadata. The files will be homed under
the document library root.

Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetWebUrl
The fully qualified web URL to use as the web address part of the base URL in the package metadata. If this is not
provided, "http://fileserver/sites/user" will be used instead within the package metadata.

Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

New-
SPOnlineApplicationPrincipalManagementServiceApplication
Proxy
In ths Article

Creates a new SharePoint Online management Application Proxy Name

Syntax
New-SPOnlineApplicationPrincipalManagementServiceApplicationProxy
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup] -Name <String>
-OnlineTenantUri <String> [-WhatIf] [<CommonParameters>]

Description
This Cmdlet is used to create a new Application Proxy name, for example usually when you run this script you
onboard your SharePoint Online (SPO ) tenant and your SharePoint server cloud SSA to cloud hybrid search.

Examples
EXAMPLE 1

New-SPOnlineApplicationPrincipalManagementServiceApplicationProxy -Name $SPO_MANAGEMENT_APPPROXY_NAME -


OnlineTenantUri $PortalUrl -DefaultProxyGroup

Found the proxies for the tenant on the variable $PortalUrl on the Default Proxy Group.

Parameters
-AssignmentCollection
After the creation of the new Principal Management Service Application proxy assign it to the collection.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Search Proxies on the default Proxy Group

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
SPO Management AppProxy Name.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OnlineTenantUri
Define the online Tenant URI.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Introduction to the SharePoint Online management shell
SharePoint Online Management Shell Download
Get-SPOAppErrors
Start-SPOUserAndContentMove
Full Download to Hybrid Scripts
minutes to read • Edit Online

New-SPOPublicCdnOrigin
In ths Article

Creates a new public CDN on a document library in your Sharepoint Online Tenant

Syntax
New-SPOPublicCdnOrigin [-Url] <String> [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This Cmdlet creates a new Public CDN Origin in your SPO Tenant

Examples
EXAMPLE 1

New-SPOPublicCdnOrigin -URL https://contoso.sharepoint.com/sites/CDN/CDNFilesLibrary/

This example shows how to you can setup a new Public CDN on a document library in your SharePoint online
tenant.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specify the URL that will be enabled for Public CDN in your tenant

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Introduction to the SharePoint Online management shell
SharePoint Online Management Shell Download
Get-SPOAppErrors
Get-SPOPublicCdnOrigins
Remove-SPOPublicCdnOrigin
minutes to read • Edit Online

New-SPOSdnProvider
In ths Article

Adds a new Software-Defined Networking (SDN ) provider

Syntax
New-SPOSdnProvider [-Identity] <String> [-License] <String> [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This Cmdlet creates a new Software-Defined Networking, and it receives two parameters, the Identity (ID ) of the
Hive and the License key of the Hive.

Examples
EXAMPLE 1

New-SPOSdnProvider -ID "Hive" -License ""

This example creates the Hive for a SDN Provider.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
PARAMVALUE: String

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-License
PARAMVALUE: String

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Introduction to the SharePoint Online management shell
SharePoint Online Management Shell Download
Get-SPOAppErrors
Remove-SPOSdnProvider
minutes to read • Edit Online

New-SPOSite
In ths Article

Creates a new SharePoint Online site collection for the current company.

Syntax
New-SPOSite [-CompatibilityLevel <Int32>] [-LocaleId <UInt32>] [-NoWait] -Owner <String>
[-ResourceQuota <Double>] -StorageQuota <Int64> [-Template <String>] [-TimeZoneId <Int32>] [-Title <String>]
-Url <UrlCmdletPipeBind> [<CommonParameters>]

Description
The New-SPOSite cmdlet creates a new site collection for the current company. However, creating a new SharePoint
Online site collection fails if a deleted site with the same URL exists in the Recycle Bin.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

New-SPOSite -Url https://contoso.sharepoint.com/sites/mynewsite -Owner joe.healy@contoso.com -StorageQuota 1000


-Title "My new site collection"

Example 1 creates a new site collection for the current company with specified site URL, title and owner. The
storage quota is set to 1000 megabytes.
-----------------------EXAMPLE 2-----------------------------

New-SPOSite -Url https://contoso.sharepoint.com/sites/mynewsite -Owner joe.healy@contoso.com -StorageQuota 1000


-CompatibilityLevel 15 -LocaleID 1033 -ResourceQuota 300 -Template "STS#0" -TimeZoneId 13 -Title "My new site
collection"

Example 2 creates a new site collection for the current company with specified site URL, title, owner and template.
The storage quota is set to 1000 megabytes and the resource quota is set to 300 megabytes. The template
compatibility level is set to 15 which means that the site collection only supports the SharePoint 2013 template.
The language is set to English - United States (LocaleID = 1033) and the time zone is set to (GMT-08:00) Pacific
Time (US and Canada) (TimeZone = 13).
-----------------------EXAMPLE 3-----------------------------
New-SPOSite -Url https://contoso.sharepoint.com/sites/accounting -Owner admin@contoso.com -StorageQuota 100 -
NoWait -ResourceQuota 50 -Template STS#0

Example 3 creates a new site collection for the current company with specified site URL, owner and template. The
storage quota is set to 100 megabytes and the resource quota is set to 50 megabytes. This cmdlet is executed
immediately without delay.

Parameters
-CompatibilityLevel
Specifies the version of templates to use when you are creating a new site collection. This value sets the initial
CompatibilityLevel value for the site collection. The values for this parameter can be SharePoint Server. When this
parameter is not specified, the CompatibilityLevel will be by default the highest possible version for the Web
application.

NOTE
For SharePoint Online Preview, it can only be set to "14" or "15". "14" indicates SharePoint 2010 Products, "15" indicates
SharePoint 2013. Other values are not valid and will cause error.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocaleId
Specifies the language of this site collection. For more information, see Locale IDs Assigned by Microsoft
(https://go.microsoft.com/fwlink/p/?LinkId=242911). The Template and LocaleId parameters must be a valid
combination as returned from the Get-SPOWebTemplate cmdlet.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoWait
Specifies to continue executing script immediately.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the user name of the site collection's primary owner. The owner must be a email-enabled user instead of a
security group or an email-enabled security group.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceQuota
Specifies the quota for this site collection in Sandboxed Solutions units. This value must not exceed the company's
aggregate available Sandboxed Solutions quota. The default value is 0. For more information, see Resource Usage
Limits on Sandboxed Solutions in SharePoint (https://msdn.microsoft.com/en-us/library/gg615462.aspx). Note
that this parameter is now obsolete and has been deprecated.

Type: Double
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageQuota
Specifies the storage quota for this site collection in megabytes. This value must not exceed the company's
available quota.

Type: Int64
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the site collection template type. Use the Get-SPOWebTemplate cmdlet to get the list of valid templates. If
no template is specified, one can be added later. The Template and LocaleId parameters must be a valid
combination as returned from the Get-SPOWebTemplate cmdlet.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeZoneId
Specifies the time zone of the site collection. For more information, see SPRegionalSettings.TimeZones Property
(https://go.microsoft.com/fwlink/p/?LinkId=242912).
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title
Specifies the title of the site collection.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the full URL of the new site collection. It must be in a valid managed path in the company's site. For
example, for company contoso, valid managed paths are https://contoso.sharepoint.com/sites and
https://contoso.sharepoint.com/teams.

Type: UrlCmdletPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOSite
Set-SPOSite
minutes to read • Edit Online

New-SPOSiteGroup
In ths Article

Creates a new group in a SharePoint Online site collection.

Syntax
New-SPOSiteGroup -Group <String> -PermissionLevels <String[]> -Site <SpoSitePipeBind> [<CommonParameters>]

Description
A SharePoint group is a set of individual users. SharePoint groups enable you to manage sets of users instead of
individual users.
You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

New-SPOSiteGroup -Site https://contoso.sharepoint.com/sites/siteA -Group "Project Leads" -PermissionLevels


"Full Control"

This example creates a group named Project Leads with the Full Control permission level on the site collection
https://contoso.sharepoint.com/sites/siteA.
-----------------------EXAMPLE 2-----------------------------

New-SPOSiteGroup -Site https://contoso.sharepoint.com/sites/marketing -Group "NewGroupName" -PermissionLevels


"Design"

This example creates a group named NewGroupName with the Design permission level on the site collection
https://contoso.sharepoint.com/sites/marketing.

Parameters
-Group
Specifies the name of the group to add.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionLevels
Specifies the permission levels to grant to the newly created group. It can be any permission level that exists on the
site collection on which the group is being created.

NOTE
Permission Levels, are defined on the top-level site of the site collection, please see How to create and edit permission levels
for more information.

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the site collection to add the group to.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
New -SPOSite
minutes to read • Edit Online

New-SPOTenantOrgRelation
In ths Article

{{ Fill in the Synopsis }}

Syntax
New-SPOTenantOrgRelation [-Scenario] <OrgRelationScenario> [-PartnerRole] <OrgRelationRole> [-PartnerCompanyId]
<Guid> [-PartnerInstanceId <Guid>] [-PartnerSiteSubscriptionId <Guid>] [<CommonParameters>]

Description
{{ Fill in the Description }}

Examples
Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Parameters
-PartnerCompanyId
{{ Fill PartnerCompanyId Description }}

Type: Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartnerInstanceId
{{ Fill PartnerInstanceId Description }}

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PartnerRole
{{ Fill PartnerRole Description }}

Type: OrgRelationRole
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartnerSiteSubscriptionId
{{ Fill PartnerSiteSubscriptionId Description }}

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scenario
{{ Fill Scenario Description }}

Type: OrgRelationScenario
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Register-SPODataEncryptionPolicy
In ths Article

Cmdlet to register customer encryption status for your geo tenant. For more information, see Controlling your
data in Office 365 using Customer Key (https://docs.microsoft.com/microsoft-365/compliance/controlling-your-
data-using-customer-key)

Syntax
Register-SPODataEncryptionPolicy [-Identity] <SpoSitePipeBind> -PrimaryKeyVaultName <string> -PrimaryKeyName
<string> -PrimaryKeyVersion <guid> -SecondaryKeyVaultName <string> -SecondaryKeyName <string> -
SecondaryKeyVersion <guid> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Use the Update-DataEncryptionPolicy cmdlet to register customer encryption status for your geo tenant. For more
information, see Controlling your data in Office 365 using Customer Key

Examples
Example 1

Register-SPODataEncryptionPolicy -Identity https://contoso.sharepoint.com -PrimaryKeyVaultName -PrimaryKeyName


-PrimaryKeyVersion

This example registers the DEP used with SharePoint Online and OneDrive for Business to start using the given
primary key

Parameters
-Confirm
The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet
depends on if the cmdlet requires confirmation before proceeding.
Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the
command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact
syntax: -Confirm:$false.
Most other cmdlets (for example, New -* and Set-* cmdlets) don't have a built-in pause. For these cmdlets,
specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command
before proceeding.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL of the admin site collection.

Type: SpoSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrimaryKeyName
The name of the primary key

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrimaryKeyVaultName
The name of the primary key vault

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrimaryKeyVersion
The version of the primary key

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryKeyName
The name of the secondary key
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryKeyVaultName
The name of the secondary key vault

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryKeyVersion
The version of the secondary key

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would
occur without actually applying those changes. You don't need to specify a value with this switch.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Register-SPOHubSite
In ths Article

Enables the hub site feature on a site to make it a hub site. For more information visit SharePoint hub sites
overview (https://docs.microsoft.com/sharepoint/dev/features/hub-site/hub-site-overview ).

Syntax
Register-SPOHubSite -Site <SpoSitePipeBind> -Principals <string[]> [<CommonParameters>]

Description
Use this cmdlet to register an existing site collection as a hub site.

IMPORTANT
A maximum of 2000 hub sites may be created per tenant, with 'unlimited' number of site collections associated to a hub site.

NOTE
It can take up to 2-4 hours for the changes to appear.

Examples
Example 1

Register-SPOHubSite https://contoso.sharepoint.com/sites/Marketing -Principals $null

This example registers the marketing site on Contoso as hub site without setting any principals for it.

Parameters
-Principals
Specifies One or more principles (user or group) to be granted rights to the specified HubSite. Can be used to filter
who can associate sites to this hub site.

Type: string[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Site
Specifies the URL of the site collection to which to enable the hub site features.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Notes
If the site doesn't exist, this cmdlet returns a "File not found" error.
If the site is already a hub site, this cmdlet returns a "This site is already a HubSite" error.
If the site is already associated with another hub site, this cmdlet returns a "This site is currently associated with a
HubSite" error. You'll need to run the Remove-SPOHubSiteAssociation cmdlet first before you can make the site a
hub site.
minutes to read • Edit Online

Remove-SPODataConnectionSetting
In ths Article

Removes a Business Connectivity Services connection.

Syntax
Remove-SPODataConnectionSetting [-Identity] <ODataConnectionSettings>
-ServiceContext <SPServiceContextPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Remove-SPODataConnectionSetting -ServiceContext <SPServiceContextPipeBind> -Name <String>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Remove-SPODataConnectionSetting cmdlet to remove a Business Connectivity Services connection for a
particular Business Connectivity Services service application in the farm.
The metadata object associated with the Business Connectivity Services connection is also deleted.
This cmdlet applies to an on-premises environment only. You cannot use this command in the SharePoint Online
Management Shell.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831 (https://go.microsoft.com/fwlink/p/?
LinkId=251831).

Examples
-----------------------EXAMPLE 1-----------------------------

Remove-SPODataConnectionSetting -ServiceContext "http://contoso" -Name "ContosoServiceApp"

This example removes the Business Connectivity Services connection named ContosoServiceApp. Metadata
properties are also removed.
-----------------------EXAMPLE 2-----------------------------

Remove-SPODataConnectionSetting -ServiceContext "http://contoso" -Name "ContosoServiceApp-metadata"


This example removes the Business Connectivity Services connection metadata named ContosoServiceApp.
The associated Business Connectivity Services connection object is also removed.
-----------------------EXAMPLE 3-----------------------------

$ConnectionVariable = Get-SPODataConnectionSettingMetadata -ServiceContext http://contoso -Name


"ContosoServiceApp"

Remove-SPODataConnectionSetting -Identity $ConnectionVariable -ServiceContext "http://contoso"

This example removes the Business Connectivity Services and its associated metadata connection named
ContosoServiceApp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the OData Connection Settings object.

Type: ODataConnectionSettings
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Name
Specifies the name of the existing Business Connectivity Services connection.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context which is in the form of an instance of an SPServiceContext object, an
SPSiteAdministration object identifier, or a SPSite object. An example of a service context value is an identifier
from the ID field, a string identifier, a URI, or a string representation of a GUID.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPODataConnectionSetting
New -SPODataConnectionSetting
Set-SPODataConnectionSetting
minutes to read • Edit Online

Remove-SPODeletedSite
In ths Article

Removes a SharePoint Online deleted site collection from the Recycle Bin.

Syntax
Remove-SPODeletedSite [-Confirm] -Identity <SpoSitePipeBind> [-NoWait] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPODeletedSite cmdlet permanently removes a SharePoint Online deleted site collection from the
Recycle Bin.
You must be a SharePoint Administrator or Global Administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).
Note: As of today, the modern admin center UI does not allow permanent deletion of group connected site, but the
use of this cmdlet does allow the deletion, but when this occurs it does not delete the associated group, just the site.

Examples
-----------------------EXAMPLE-----------------------------

Remove-SPODeletedSite -Identity https://contoso.sharepoint.com/sites/sitetoremove

This example removes a SharePoint Online deleted site collection named


https://contoso.sharepoint.com/sites/sitetoremove from the Recycle Bin and deletes it permanently.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL of the site collection to remove.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoWait
PARAMVALUE: SwitchParameter

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Remove-SPOSite
Get-SPODeletedSite
minutes to read • Edit Online

Remove-SPOExternalUser
In ths Article

Removes a collection of external users from the tenancy's folder.

Syntax
Remove-SPOExternalUser [-Confirm] -UniqueIDs <String[]> [-WhatIf] [<CommonParameters>]

Description
The Remove-SPOExternalUser cmdlet permanently removes a collection of external users from the tenancy's folder.
Users who are removed lose access to all tenant resources.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE-----------------------------

$user = Get-SPOExternalUser -Filter someone@example.com


Remove-SPOExternalUser -UniqueIDs @($user.UniqueId)

This example removes a specific external user who has the address "someone@example.com". Organization
members may still see the external user name displayed in the Shared With dialog, but the external user will not be
able to sign in and will not be able to access any tenant resources.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UniqueIDs
Specifies an ID that can be used to identify an external user based on their Windows Live ID.
Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOExternalUser
minutes to read • Edit Online

Remove-SPOGeoAdministrator
In ths Article

Removes a new SharePoint user or security Group in the current Multi-Geo Tenant.

Syntax
Remove-SPOGeoAdministrator [-LoginName] <String> [<CommonParameters>]

Description
This cmdlet contains a single parameter set. You may only use parameters from one parameter set and you may
not combine parameters from different parameter sets. For more information about how to use parameter sets, see
Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Remove-SPOGeoAdministrator cmdlet matches a user or a security group and remove the GeoAdministrator
privileges in the SharePoint Organization.
You must be a SharePoint Online global administrator, and you must have a Multi-Geo Tenant to run the
Remove-SPOGeoAdministrator cmdlet successfully.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
Example 1

Remove-SPOGeoAdministrator contosoadmin

Remove the GeoAdministrator privileges to the user contosoadmin of the SharePoint Online multi-geo tenant.
Example 2

Remove-SPOGeoAdministrator -LoginName contosoadmin

Same as example 1, but using the LoginName parameter explicitly.

Parameters
-LoginName
It's the user Principal Name or UPN of a user. Typically the username that he uses to log in.
Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Add-SPOGeoAdministrator
Get-SPOGeoAdministrator
minutes to read • Edit Online

Remove-SPOHomeSite
In ths Article

Removes the current SharePoint Online Home site setting.

Syntax
Remove-SPOHomeSite [<CommonParameters>]

Description
Use this cmdlet to remove the current SharePoint Online Home Site setting.

Examples
Example 1

Remove-SPOHomeSite

This example removes the current SharerPoint Online Home Site setting.
minutes to read • Edit Online

Remove-SPOHubSiteAssociation
In ths Article

Removes a site from its associated hub site.

Syntax
Remove-SPOHubSiteAssociation [-Site] <SpoSitePipeBind>
[<CommonParameters>]

Description
Use this cmdlet to remove an association between a site and a hub site.

IMPORTANT
This cmdlet is currently in preview and is subject to change. It is not currently supported for use in production environments.

If the site or hub site doesn't exist, this cmdlet returns a "File not found" error.

Examples
Example 1

Remove-SPOHubSiteAssociation https://contoso.sharepoint.com/sites/Research

This example removes the research site from the marketing hub site.

Parameters
-Site
URL of the site to remove from the hub site.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPOHubToHubAssociation
In ths Article

Removes the selected hub site from its parent hub.

Syntax
Remove-SPOHubToHubAssociation [-HubSite] <SpoHubSitePipeBind> [<CommonParameters>]

Description
Use this cmdlet to remove the selected hub site from its parent hub.

Examples
Example 1

Remove-SPOHubToHubAssociation -HubSite https://contoso.sharepoint.com/sites/Research

This example removes https://contoso.sharepoint.com/sites/Research from its parent Hub.

Parameters
-Hubsite
Url of the Hub site to be removed from its parent Hub.

Type: SpoHubSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPOMigrationJob
In ths Article

Cmdlet to remove a previously created migration job from the specified site collection.

Syntax
Remove-SPOMigrationJob [-TargetWebUrl] <String> [-JobId] <Guid> -Credentials <CredentialCmdletPipeBind>
[-NoLogFile] [<CommonParameters>]

Description
Cmdlet to remove a previously created migration job from the specified site collection.

Examples
-----------------------EXAMPLE-----------------------------

Remove-SPOMigrationJob -JobId 4da9e777-3e38-4804-96d9-ddeebe7dfa79 -TargetUrl


https://contoso.sharepoint.com/sites/TargetSite

This example removes the specified migration job from the site collection
"https://contoso.sharepoint.com/sites/TargetSite".

Parameters
-Credentials
Optional credentials of a site collection administrator to use to connect to the site collection. The credentials should
supply the username in UPN format (e.g. user@company.onmicrosoft.com). If this property is not set, the current
tenant admin credentials from the session's previous call to Connect-SPOService will be used to connect to the site
collection.

Type: CredentialCmdletPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
Id of a previously created migration job that exists on the target site collection.
Type: Guid
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoLogFile
Indicates to not create a log file. The default is to create a new DeleteMigrationJob log file within the current
directory.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetWebUrl
The fully qualified URL of the site collection where the job will be deleted if found.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Remove-SPOMultiGeoCompanyAllowedDataLocation
In ths Article

Use this cmdlet to remove a multi geo allowed location.

Syntax
Remove-SPOMultiGeoCompanyAllowedDataLocation [-Location] <string> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Removes a specified multi-geo location that was previously allowed by Set-
SPOMultiGeoCompanyAllowedDataLocation.

Examples
Example 1

Remove-SPOMultiGeoCompanyAllowedDataLocation -Location AUS

Removes AUS (Australia) as an allowed mutli-geo location.

Parameters
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location
The Preferred Data Location (PDL ) to remove.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPOMultiGeoCompanyAllowedDataLocation
minutes to read • Edit Online

Remove-SPOOrgAssetsLibrary
In ths Article

Removes a library that was designated as a central location for organization assets across the tenant.

Syntax
Remove-SPOOrgAssetsLibrary [-LibraryUrl <String>] [-ListId <Guid>] [<CommonParameters>]

Description
The Remove-SPOOrgAssetsLibrary cmdlet removes a library that was designated as a central location for
organization assets across the tenant. Once this cmdlet is run, this library will no longer be accessible from the
"Your organization" tab in the file picker. When running the cmdlet, either the library URL or library ID (not both)
needs to be indicated.
Once the library is removed, CDN will still be enabled for this library. To disable CDN for this library, use Remove-
SPOTenantCdnOrigin with the server relative URL (example: /sites/branding/assets).

Examples
Example 1
This example removes https://contoso.sharepoint.com/sites/branding/Assets as a designated library using the
library ID. Assets within this library will no longer be accessible from the "Your organization" tab in the file picker.

Remove-SPOOrgAssetsLibrary -ListId 58454454-6546-6466-9769-646464623988

Parameters
-LibraryUrl
Indicates the server relative URL of the library to be removed as a central location for organization assets.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ListId
Indicates the library ID for the library to be removed as a central location for organization assets.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPOOrgAssetsLibrary
Set-SPOOrgAssetsLibrary
Get-SPOOrgAssetsLibrary
minutes to read • Edit Online

Remove-SPOOrgNewsSite
In ths Article

Removes a given site from the list of organizational news sites based on its URL in your Sharepoint Online Tenant

Syntax
Remove-SPOOrgNewsSite -OrgNewsSiteUrl <String> [<CommonParameters>]

Description
This cmdlet will remove a site from list of organizational news sites based on its URL.

Examples
EXAMPLE 1

Remove-SPOOrgNewsSite -OrgNewsSiteUrl https://contoso.sharepoint.com/sites/Marketing

This example removes https://contoso.sharepoint.com/sites/Marketing from the list of organizational news sites.

Parameters
-OrgNewsSiteUrl
The URL of a site to be marked as an organizational news site.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPOOrgNewsSite
Set-SPOOrgNewsSite
minutes to read • Edit Online

Remove-SPOPublicCdnOrigin
In ths Article

Removes a given public CDN origin based on its identity (id) in your Sharepoint Online Tenant

Syntax
Remove-SPOPublicCdnOrigin [-Identity] <String> [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet will remove a Public CDN Origin based on its identity.

Examples
EXAMPLE 1

#Get a list of CDN origins

Get-SPOPublicCdnOrigins
Id Url
-- ---
11270051ee79e73829f6e7a3ee5d900d49c4fc5901645c642b799ecb62787a5069ca80fb
HTTPS://CONTOSO.SHAREPOINT.COM/SITES/CDN...
#then remove the CDN by Identity id GUID.
Remove-SPOPublicCdnOrigin -Identity 11270051ee79e73829f6e7a3ee5d900d49c4fc5901645c642b799ecb62787a5069ca80fb

This example returns a list of CDN origins and then removes an origin based on the identity.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
It's the unique identifier of the Public CDN path, it can be queried using the Cmdlet Get-SpoPublicCdnOrigins
Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Add-SPOGeoAdministrator
New -SPOPublicCdnOrigin
minutes to read • Edit Online

Remove-SPOSdnProvider
In ths Article

Removes Software-Defined Networking (SDN ) Support in your SharePoint Online tenant

Syntax
Remove-SPOSdnProvider [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Removes SDN Support in your SharePoint Online tenant

Examples
EXAMPLE 1

Remove-SPOSdnProvider -Confirm:false

This command removes the SDN support for your Online Tenant without confirmation.
-----------------------EXAMPLE 2-----------------------------

Remove-SPOSdnProvider -Confirm:true -WhatIf

This command will prompt for a confirmation before "simulating" that it will remove the support for SDN in the
current SPO tenant (-WhatIf)

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Get-SPOAppErrors
New -SPOSdnProvider
minutes to read • Edit Online

Remove-SPOSite
In ths Article

Sends a SharePoint Online site collection to the SharePoint Online Recycle Bin.

Syntax
Remove-SPOSite [-Confirm] -Identity <SpoSitePipeBind> [-NoWait] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPOSite cmdlet does not delete a site collection from the site collections list permanently. Instead, the
removed site collection is moved to the Recycle Bin. You can use the Restore-SPODeletedSite cmdlet to restore a site
collection from the Recycle Bin. To delete a site collection permanently, first move the site collection to the Recycle
Bin by using the Remove-SPOSite cmdlet and then delete it from the Recycle Bin by using the
Remove-SPODeletedSite cmdlet.

You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

Remove-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -NoWait

This example immediately removes the site collection named https://contoso.sharepoint.com/sites/site1 from the
site collections list and moves it to the Recycle Bin.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL of the site collection to remove.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoWait
Specifies to continue executing script immediately.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Remove-SPODeletedSite
Restore-SPODeletedSite
minutes to read • Edit Online

Remove-SPOSiteCollectionAppCatalog
In ths Article

Removes the site collection app catalog.

Syntax
Remove-SPOSiteCollectionAppCatalog [-Site] <SpoSitePipeBind> [<CommonParameters>]

Description
Use this cmdlet to remove the site collection app catalog.

Examples
Example 1

Remove-SPOSiteCollectionAppCatalog -Site https://contoso.sharepoint.com/sites/Research

This example removes the site collection app catalog from the site https://contoso.sharepoint.com/sites/Research.

Parameters
-Site
Url of the site collection.

Type: SpoSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPOSiteCollectionAppCatalogById
In ths Article

Removes the site collection app catalog by the id of the site collection.

Syntax
Remove-SPOSiteCollectionAppCatalogById -SiteId <guid> [<CommonParameters>]

Description
Use this cmdlet to remove the site collection app catalog by the id of the site collection.

Examples
Example 1

Remove-SPOSiteCollectionAppCatalogById -SiteId bdbd7458-8199-4e99-87ca-15fe9dc17a86

This example removes the site collection app catalog from the site with the id 'bdbd7458-8199-4e99-87ca-
15fe9dc17a86'.

Parameters
-SiteId
Guid of the site collection.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPOSiteDesign
In ths Article

Removes a site design. It no longer appears in the UI for creating a new site.

Syntax
Remove-SPOSiteDesign
[-Identity] <SPOSiteDesignPipeBind>
[<CommonParameters>]

Description
Removes a site design. It no longer appears in the UI for creating a new site.

Examples
Example 1
This example shows how to remove a site design.

Remove-SPOSiteDesign 21209d88-38de-4844-9823-f1f600a1179a

Parameters
-Identity
The ID of the site design to remove.

Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPOSiteDesignTask
In ths Article

Command to remove a scheduled site design script.

Syntax
Remove-SPOSiteDesignTask
-Identity <guid>
[<CommonParameters>]

Description
Removes a scheduled site design by providing the site design ID. If the execution of the associated site script has
already started the execution will not be terminated.

NOTE
This command only removes a scheduled request. To check on the job status or to view details of the scheduled run, use the
commands in the related section below.

Examples
Example 1
This example removes a previously scheduled site design.

Remove-SPOSiteDesignTask -Identity 501z8c32-4147-44d4-8607-26c2f67cae82

Parameters
-Identity
The ID of the site design to apply.

Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPOSiteDesignTask
Get-SPOSiteDesignRun
Get-SPOSiteDesignRunStatus
minutes to read • Edit Online

Remove-SPOSiteGroup
In ths Article

Removes a SharePoint Online group from a site collection.

Syntax
Remove-SPOSiteGroup -Identity <String> -Site <SpoSitePipeBind> [<CommonParameters>]

Description
Use the Remove-SPOSiteGroup cmdlet to remove a group from a site collection by specifying the name of the group
in the Identity parameter.
You must be a SharePoint Online global administrator and a site collection administrator to run the
Remove-SPOSiteGroup cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE-----------------------------

Remove-SPOSiteGroup -Site https://contoso.sharepoint.com/sites/marketing -Identity GroupToRemove

This example removes a group named GroupToRemove from the site collection
https://contoso.sharepoint.com/sites/marketing.

Parameters
-Identity
Specifies the name of the group to remove.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the site collection to remove the group from.
Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOSiteGroup
New -SPOSiteGroup
minutes to read • Edit Online

Remove-SPOSiteScript
In ths Article

Removes a site script.

Syntax
Remove-SPOSiteScript [-Identity] <SPOSiteScriptPipeBind> [<CommonParameters>]

Description
Removes a site script.

Examples
Example 1
This example shows how to remove a site design.

Remove-SPOSiteScript 5ea28194-6fe7-4e2c-ba84-c409368278e2

Parameters
-Identity
The ID of the site script to remove.

Type: SPOSiteScriptPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPOSiteUserInvitations
In ths Article

Syntax
Remove-SPOSiteUserInvitations [-Site] <SpoSitePipeBind> [-EmailAddress] <string> [-CountOnly]
[<CommonParameters>]

Description
.

Examples
Example 1

Remove-SPOSiteUserInvitations -Site https://contoso.sharepoint.com/sites/Research -EmailAddress


"someone@contoso.com"

This example removes the user with the mail address "someone@contoso.com" from the site with the url
https://contoso.sharepoint.com/sites/Research.

Parameters
-CountOnly

Type: SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAddress
Email Address of the user.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Site
Specifies the URL of the site collection.

Type: SpoSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPOStorageEntity
In ths Article

Tenant properties allow tenant administrators to add properties in the app catalog that can be read by various
SharePoint Framework components. Because tenant properties are stored in the tenant app catalog, you must
provide the tenant app catalog site collection URL or the site collection app catalog URL in the following cmdlets.
This cmdLet is used to remove a value in the property bag.

Syntax
Remove-SPOStorageEntity [-Site] <SpoSitePipeBind> [-Key] <string> [<CommonParameters>]

Description
Use this cmdlet to remove a value within the property bag.

Examples
Example 1

Remove-SPOStorageEntity "https://tenant-name.sharepoint.com/sites/app-catalog" -Key "MyCustomValue"

This example removes the value of my custom value.

Parameters
-Key
The key in the property bag that should be removed.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True
Accept wildcard characters: False

-Site
URL to the tenant or site collection app catalog.
Type: SpoSitePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPOTenantCdnOrigin
In ths Article

Removes a new origin from the Public or Private content delivery network (CDN ). Requires Tenant administrator
permissions.

Syntax
Remove-SPOTenantCdnOrigin -CdnType <SPOTenantCdnType> [-Confirm] -OriginUrl <String> [-WhatIf]
[<CommonParameters>]

Description
Removes a new origin from the Public or Private content delivery network (CDN ).

Examples
-----------------------EXAMPLE 1-----------------------------

Remove-SPOTenantCdnOrigin -CdnType Public -OriginUrl sites/pubsite/siteassets/subfolder

The example removes a CDN from a tenant level.


-----------------------EXAMPLE 2-----------------------------

Remove-SPOTenantCdnOrigin -CdnType Public -OriginScope Site -Site https://contoso.sharepoint.com/sites/pubsite


-OriginUrl siteassets/subfolder

The example removes a CDN from a site level.

Parameters
-CdnType
Specifies the CDN type. The valid values are: Public or Private.

Type: SPOTenantCdnType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OriginUrl
Specifies a path to the doc library to be configured. It can be provided in two ways: relative path, or a mask.
Relative-Relative path depends on the OriginScope. If the originScope is Tenant, a path must be a relative path
under the tenant root. If the originScope is Site, a path must be a relative path under the given Site. The path must
point to the valid Document Library or a folder with a document library.
Any asset stored under the path provided (in the container itself or any of its subfolders) will be exposed via CDN
Mask - Mask allows to configure a partial URL match. It must start with /, and must not include * anywhere else.
I.e. an origin "/masterpages" will expose all the assets under all the masterpages libraries, either under the tenant
root (means, anywhere in the tenancy) or in the given site collection, depends on the OriginScope parameter.
Equally, */masterpages/subfolder will enable items in "subfolder" and below.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Remove-SPOTenantOrgRelation
In ths Article

{{ Fill in the Synopsis }}

Syntax
Remove-SPOTenantOrgRelation [-Scenario] <OrgRelationScenario> [-PartnerRole] <OrgRelationRole> [-
PartnerCompanyId] <Guid> [-PartnerInstanceId <Guid>] [<CommonParameters>]

Description
{{ Fill in the Description }}

Examples
Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Parameters
-PartnerCompanyId
{{ Fill PartnerCompanyId Description }}

Type: Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartnerInstanceId
{{ Fill PartnerInstanceId Description }}

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PartnerRole
{{ Fill PartnerRole Description }}

Type: OrgRelationRole
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scenario
{{ Fill Scenario Description }}

Type: OrgRelationScenario
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Remove-SPOTenantSyncClientRestriction
In ths Article

Disables the feature for the tenancy.

Syntax
Remove-SPOTenantSyncClientRestriction [<CommonParameters>]

Description
You must be a SharePoint Online global administrator to run the cmdlet.
Requires a valid Connect-SPOService context to identify the tenant. For information on how to connect to the
tenant, see Connect-SPOService .
The Remove-SPOTenantSyncClientRestriction cmdlet disables the feature for tenancy, but does not remove any
present domain GUID entries from the safe sender recipient list. After the Remove-SPOTenantSyncClientRestriction
cmdlet is run it can take up to 24 hours for change to take effect. This parameter will also remove any values set
from the GrooveBlockOption parameter for syncing.
The Remove-SPOTenantSyncClientRestriction cmdlet does not have any parameters.

Examples
-----------------------EXAMPLE-----------------------------

Remove-SPOTenantSyncClientRestriction

This example returns the value of False for the TenantRestrictionEnabled property.

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Remove-SPOTheme
In ths Article

Removes a theme from the theme gallery.

Syntax
Remove-SPOTheme [-Identity] <SpoThemePipeBind> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-SPOTheme cmdlet removes a theme from your tenant store.

Examples
Example 1
This example removes the "Custom Cyan" theme that was used in the previous examples for the Add-SPOTheme
and Get-SPOTheme cmdlets.

Remove-SPOTheme -Name "Custom Cyan"

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
{{ Fill Identity Description }}

Type: SpoThemePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Online.SharePoint.PowerShell.SpoThemePipeBind

Outputs
System.Object
minutes to read • Edit Online

Remove-SPOUser
In ths Article

Removes a user or a security group from a site collection or a group.

Syntax
Remove-SPOUser [-Group <String>] -LoginName <String> -Site <SpoSitePipeBind> [<CommonParameters>]

Description
You must be a SharePoint Online global administrator and a site collection administrator to run the
Remove-SPOUser cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE-----------------------------

Remove-SPOUser -Site https://contoso.sharepoint.com/sites/sc1 -LoginName joe.healy@contoso.com -Group "SC1


Owners"

This example removes a user who has the email address joe.healy@contoso.com from the group SC1 Owners in
the site collection https://contoso.sharepoint.com/sites/sc1.

Parameters
-Group
Specifies the group to remove the user from. If not specified, the cmdlet removes the user from all groups.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoginName
Specifies the user name.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the site collection to remove the user from.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOUser
minutes to read • Edit Online

Remove-SPOUserInfo
In ths Article

Removes user from user information list of specific site collection.

Syntax
Remove-SPOUserInfo -LoginName <String> -Site <SpoSitePipeBind> [<CommonParameters>]

Description
Can be used to remove user from user information lists of the specific site collections.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
------------ Example 1 --------------------

Remove-SPOUserInfo -LoginName joe.healy@contoso.com -Site https://contoso.sharepoint.com/sites/sc1

Example 1 removes a user who has the e-mail address joe.healy@contoso.com from the user information list of
https://contoso.sharepoint.com/sites/sc1 site collection.

Parameters
-LoginName
Specifies the login name of the user to removed from user information list.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the URL of the site collection.
Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPOUserProfile
minutes to read • Edit Online

Remove-SPOUserProfile
In ths Article

Remove user profile from the tenant.

Syntax
Remove-SPOUserProfile -LoginName <String> [<CommonParameters>]

Description
Can be used to remove the SharePoint user profile from the tenant.

NOTE
The User must be first be deleted from AAD before the user profile can be deleted. You can use the Azure AD cmdlet
Remove-AzureADUser for this action

Examples
------------ Example 1 --------------------

Remove-SPOUserProfile -LoginName joe.healy@contoso.com

Example 1 removes a user who has the e-mail address joe.healy@contoso.com from the SharePoint Online User
Profiles of the particular tenant.

Parameters
-LoginName
Specifies the login name of the user which user profile is deleted.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPOUserInfo
minutes to read • Edit Online

Repair-SPOSite
In ths Article

Checks and repairs the site collection and its contents.

Syntax
Repair-SPOSite [-Confirm] -Identity <SpoSitePipeBind> [-RuleId <Guid>] [-RunAlways] [-WhatIf]
[<CommonParameters>]

Description
The Repair-SPOSite cmdlet runs one or all site collection health checks on the site collection and its contents. This
cmdlet will make changes if issues are found and automatically repairable.
The cmdlet reports the health check rules with a summary of the results. The rules might not support automatic
repair. Tests without repair mode can be initiated by running the Test-SPOSite cmdlet.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

Repair-SPOSite https://contoso.sharepoint.com/sites/marketing

This example runs all the site collection health checks in repair mode on the
https://contoso.sharepoint.com/sites/marketing site collection.
-----------------------EXAMPLE 2-----------------------------

Repair-SPOSite https://contoso.sharepoint.com/sites/marketing -RuleID "ee967197-ccbe-4c00-88e4-e6fab81145e1"

This example runs the Missing Galleries Check rule in repair mode on the
https://contoso.sharepoint.com/sites/marketing site collection.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SharePoint Online site collection on which to run the repairs.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RuleId
Specifies a health check rule to run.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunAlways
Displays a message that explains the effect of the command instead of executing the command.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Test-SPOSite
minutes to read • Edit Online

Request-SPOPersonalSite
In ths Article

Requests that one or more users be enqueued for a Personal Site to be created.

Syntax
Request-SPOPersonalSite [-NoWait] -UserEmails <String[]> [<CommonParameters>]

Description
The Request-SPOPersonalSite cmdlet requests that the users specified be enqueued so that a Personal Site be
created for each. The actual Personal site is created by a Timer Job later.

NOTE
• You must specify a string array of user logins that contains one or more valid user email (logins) and cannot contain any
empty fields. The command will stop if it encounters any empty strings in the array. A maximum of 200 users can be specified.

• The actor executing this cmdlet must be at least assigned the SharePoint Online administrator role and have been assigned
a SharePoint Online license to be able to provision the OneDrive for Business sites. The users who the sites will be
provisioned for must also have a SharePoint license assigned.

• This cmdlet is NOT OneDrive Multi-Geo aware. If you need to request Personal Sites for Multi-Geo enabled tenants, you
must run this cmdlet for users in the region their data is to be hosted in. To retrieve users with a specific PDL, use the
following sample: Get-MSOLUser | Where {$_.PreferredDataLocation -eq "EUR"} .

Examples
----------------------EXAMPLE 1-----------------------

$emails = "user1@contoso.com", "user2@contoso.com"


Request-SPOPersonalSite -UserEmails $emails

This example requests that two users to be enqueued for the creation of a Personal Site.
----------------------EXAMPLE 2-----------------------

Request-SPOPersonalSite -UserEmails $emails

This example requests that many users to be queued for the creation of a Personal Site. The users are previously
defined using the variable $emails.
Parameters
-NoWait
Continues without the status being polled. Polling the action can slow it's progress if lots of user emails are
specified.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserEmails
Specifies one or more user logins to be enqueued for the creation of a Personal Site. The Personal site is created by
a Timer Job later. You can specify between 1 and 200 users.

NOTE
If you are Pre-Provisioning OneDrive for Many Users, it might take up to 24 hours for the OneDrive locations to be created.
If a user's OneDrive isn't ready after 24 hours, please contact Support.

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String[]

Outputs
System.Object
minutes to read • Edit Online

Request-SPOUpgradeEvaluationSite
In ths Article

Requests to create a copy of an existing site collection for the purposes of validating the effects of upgrade without
affecting the original site.

Syntax
Request-SPOUpgradeEvaluationSite [-Confirm] -Identity <SpoSitePipeBind> [-NoEmail] [-NoUpgrade] [-WhatIf]
[<CommonParameters>]

Description
The Request-SPOUpgradeEvaluationSite cmdlet lets the SharePoint Online global administrator request a copy of an
existing site collection for the purposes of validating the effects of upgrade without affecting the original site.
A request for an upgrade evaluation site is not automatically processed. Instead, it is scheduled to occur on the
background when it causes the least effect on the service.
You must be a SharePoint Online global administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

Request-SPOUpgradeEvaluationSite https://contoso.sharepoint.com/sites/marketing

Example 1 requests a site upgrade evaluation for the marketing site


https://contoso.sharepoint.com/sites/marketing using the default options of sending an email message and
automatically trying to upgrade the evaluation site.
-----------------------EXAMPLE 2-----------------------------

Request-SPOUpgradeEvaluationSite https://contoso.sharepoint.com/sites/marketing -NoEmail $true -NoUpgrade $true

This example requests a site upgrade evaluation for the marketing site
https://contoso.sharepoint.com/sites/marketing. It specifies to not send email messages and not automatically try
upgrade of the evaluation site. By using the cmdlet in this way, a SharePoint Online global administrator can make
changes to the upgrade evaluation site before starting the actual upgrade.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SharePoint Online site collection for which you want to request a copy for the new Upgrade or
Evaluation site collection.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoEmail
Specifies that the system not send the requester and site collection administrators an email message at the end of
the upgrade evaluation site creation process.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoUpgrade
Specifies that the system not perform an upgrade as part of the evaluation site creation process.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
Getting started with SharePoint Online Management Shell
Upgrade-SPOSite
minutes to read • Edit Online

Restore-SPODataEncryptionPolicy
In ths Article

Syntax
Restore-SPODataEncryptionPolicy [-Identity] <SpoSitePipeBind> -PrimaryKeyVaultName <string> -PrimaryKeyName
<string> -PrimaryKeyVersion <guid> -SecondaryKeyVaultName <string> -SecondaryKeyName <string> -
SecondaryKeyVersion <guid> [<CommonParameters>]

Description
Use this cmdlet to .

Examples
Example 1

This example.

Parameters
-Identity
URL of the site collection.

Type: SpoSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrimaryKeyName
.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PrimaryKeyVaultName
.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrimaryKeyVersion
.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryKeyName
.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryKeyVaultName
.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryKeyVersion
.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Restore-SPODeletedSite
In ths Article

Restores a SharePoint Online deleted site collection from the Recycle Bin.

Syntax
Restore-SPODeletedSite -Identity <SpoSitePipeBind> [-NoWait] [<CommonParameters>]

Description
You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
----------------------EXAMPLE-----------------------

Restore-SPODeletedSite -Identity https://contoso.sharepoint.com/sites/arecycledsite

This example restores a SharePoint Online deleted site collection named


"https://contoso.sharepoint.com/sites/arecycledsite" from the Recycle Bin.

Parameters
-Identity
Specifies the URL of the site collection to restore.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoWait
Specifies to continue executing script immediately.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPODeletedSite
Remove-SPODeletedSite
minutes to read • Edit Online

Revoke-SPOHubSiteRights
In ths Article

Revokes rights for specified principals to a hub.

Syntax
Revoke-SPOHubSiteRights [-Identity] <SpoHubSitePipeBind> -Principals <string[]> [<CommonParameters>]

Description
Revokes rights for specified principals to the given hub site. The specified principals will no longer be able to
associate sites with the hub. To find which principals have access to a hub site, use the Get-SPOHubSite cmdlet.

NOTE
If the hub site doesn't exist, this cmdlet returns a "File not found" error.

Examples
Example 1

Revoke-SPOHubSiteRights https://contoso.sharepoint.com/sites/Marketing `
-Principals "nestorw@contoso.onmicrosoft.com"

This example shows how to revoke rights so that Nestor can no longer join sites to the Marketing hub site.

Parameters
-Identity
URL of the hub site.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Principals
One or more principles to revoke the permissions for.
Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Revoke-SPOSiteDesignRights
In ths Article

Revokes rights for specified principals from a site design.

Syntax
Revoke-SPOSiteDesignRights [-Identity] <SPOSiteDesignPipeBind> -Principals <string[]> [<CommonParameters>]

Description
Revokes rights for specified principals from a site design.

Examples
Example 1
This example shows how to revoke rights to a site design for Nestor.

Revoke-SPOSiteDesignRights 44252d09-62c4-4913-9eb0-a2a8b8d7f863 `
-Principals "nestorw@contoso.onmicrosoft.com"

Parameters
-Identity
The ID of the site design from which to revoke rights.

Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Principals
One or more principals to revoke rights on the specified site design.

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Revoke-SPOTenantServicePrincipalPermission
In ths Article

Revokes a permission that was previously granted to the "SharePoint Online Client" service principal

Syntax
Revoke-SPOTenantServicePrincipalPermission -ObjectId <String>

Description
Revokes a permission that was previously granted to the "SharePoint Online Client" service principal.

Examples
------------------EXAMPLE 1------------------

$grants = Get-SPOTenantServicePrincipalPermissionGrants
$grantToRemove = $grants | ? { $_.Resource -eq 'Office 365 SharePoint Online' -and $_.Scope -eq 'MyFiles.Read'
} | Select-Object -First 1

if ($grantToRemove -ne $null)


{
Revoke-SPOTenantServicePrincipalPermission -ObjectId $grantToRemove.ObjectId
}

Revokes the permission associated with the 'Office 365 SharePoint Online' resource and with scope claim
'MyFiles.Read'. If there is no permission with those properties, then no revoke action will be taken.

Parameters
-ObjectId
The Object ID of the permission grant to revoke

Type: string
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Revoke-SPOUserSession
In ths Article

Provides IT administrators the ability to invalidate a particular users' O365 sessions across all their devices.

Syntax
Revoke-SPOUserSession [-User] <String> [-Confirm] [-WhatIf] [<CommonParameters>]

Description
You must be a SharePoint Online global administrator to run the cmdlet.
Requires a valid Connect-SPOService context to identify the tenant. For information about how to connect to the
tenant, see Connect-SPOService .
When the cmdlet is ran the following will occur:
User will be signed out of browser, desktop and mobile applications accessing Office 365 resources across all
devices.
Will not be applicable for guest users.
Possible results for this cmdlet are:

RESULT REASON

Warning : We couldn't find the user@contoso.com. Check for Invalid input for -User parameter.
typos and try again.

We successfully signed out from all devices. Successful instantaneous revocation.

It can take up to an hour to sign out from all devices. Successful non-instantaneous revocation.

Sorry, something went wrong and we couldn't sign out from The cmdlet did not successfully execute.
any device.

The cmdlet will be available in the future, but it isn't ready for The cmdlet has been disabled for the tenant.
use in your organization yet.

Examples
----------------------EXAMPLE-----------------------

Revoke-SPOUserSession -User user1@contoso.com


This example signs out user1 in the contoso tenancy from all devices.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-User
Specifies a user name. For example, user1@contoso.com

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Set-SPOBrowserIdleSignOut
In ths Article

Syntax
Set-SPOBrowserIdleSignOut [-Enabled] <Boolean> [[-WarnAfter] <TimeSpan>] [[-SignOutAfter] <TimeSpan>]
[<CommonParameters>]

Description
Use this cmdlet to set the current configuration values for Idle session sign-out, the time at which users are warned
and subsequently signed out of Office 365 after a period of browser inactivity in SharePoint and OneDrive

Examples
Example 1

Set-SPOBrowserIdleSignOut -Enabled:$true -WarnAfter "0.00:45:00" -SignOutAfter "0.01:00:00"

This example enables the browser idle sign-out policy, sets a warning at 45 minutes and signs out users after a
period of 60 minutes of browser inactivity.
Example 2

Set-SPOBrowserIdleSignOut -Enabled:$true -WarnAfter (New-TimeSpan -Minutes 45) -SignOutAfter (New-TimeSpan -


Hours 1)

This example enables the browser idle sign-out policy, sets a warning at 45 minutes and signs out users after a
period of 60 minutes of browser inactivity. This example leverages the use of New -TimeSpan cmdlet to create the
required timespan values.

Parameters
-Enabled
Enables the browser idle sign-out policy

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SignOutAfter
Specifies a time interval. This parameter is used to specify a time value for Get-SPOBrowserIdleSignOut
parameters such as SignOutAfter. Specify the time interval in the following format:
[-]D.H:M:S.F

where:
D = Days (0 to 10675199)
H = Hours (0 to 23)
M = Minutes (0 to 59)
S = Seconds (0 to 59)
F = Fractions of a second (0 to 9999999)

Type: TimeSpan
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WarnAfter
Specifies a time interval. This parameter is used to specify a time value for Get-SPOBrowserIdleSignOut
parameters such as WarnAfter. Specify the time interval in the following format:
[-]D.H:M:S.F

where:
D = Days (0 to 10675199)
H = Hours (0 to 23)
M = Minutes (0 to 59)
S = Seconds (0 to 59)
F = Fractions of a second (0 to 9999999)

Type: TimeSpan
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Set-SPOBuiltInDesignPackageVisibility
In ths Article

Sets the visibility of the available built-in Design Packages at moment of site creation.

Syntax
Set-SPOBuiltInDesignPackageVisibility [-IsVisible] <Boolean> [-DesignPackage] <DesignPackageType>
[<CommonParameters>]

Description
Sets the visibility of the available built-in Design Packages. For more information, see Moving from Publishing
sites to Communication sites

Examples
Example 1

Set-SPOBuiltInDesignPackageVisibility -DesignPackage Showcase -IsVisible:$false

This example sets the visibility of Showcase design package to false.

Parameters
-DesignPackage
Name of the design package, available names are
Topic
Showcase
Blank
TeamSite

Type: DesignPackageType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsVisible
Determines if the design package is visible
Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Set-SPODataConnectionSetting
In ths Article

Sets or updates global properties for a Microsoft Business Connectivity Services connection.

Syntax
Set-SPODataConnectionSetting [-Identity] <ODataConnectionSettings> -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationMode <ODataAuthenticationMode>] [-Confirm]
[-ExtensionProvider <String>] [-SecureStoreTargetApplicationId <String>] [-ServiceAddressURL <Uri>] [-WhatIf]
[<CommonParameters>]

Set-SPODataConnectionSetting -ServiceContext <SPServiceContextPipeBind> -Name <String>


[-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationMode <ODataAuthenticationMode>] [-Confirm]
[-ExtensionProvider <String>] [-SecureStoreTargetApplicationId <String>] [-ServiceAddressURL <Uri>] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Set-SPODataConnectionSetting cmdlet to update the properties of an existing connection for a specific
Business Connectivity Services service application.
This cmdlet applies to an on-premises environment only. You cannot use this command in the SharePoint Online
Management Shell.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831 (https://go.microsoft.com/fwlink/p/?
LinkId=251831).

Examples
-------------EXAMPLE 1-----------

Set-SPODataConnectionSetting -Name "ContosoServiceApp" -ServiceContext "http://contoso" -AuthenticationMode


"PassThrough"

This example updates the properties of Business Connectivity Services connection named ContosoServiceApp.
-------------EXAMPLE 2-----------
$ConnectionVariable = Get-SPODataConnectionSetting -ServiceContext http://contoso -Name "ContosoServiceApp"

Set-SPODataConnectionSetting -Identity $ConnectionVariable -AuthenticationMode "PassThrough"

This example updates the properties of the Business Connectivity Services service connection named
ContosoServiceApp.
-------------EXAMPLE 3-----------

Set-SPODataConnectionSetting -Name "ContosoServiceApp" -ServiceContext "http://contoso" -AuthenticationMode


"PassThrough" -ExtensionProvider ""

This example updates the properties of Business Connectivity Services connection named ContosoServiceApp, the
authentication mode has been changed and extension provider value has been cleared.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationMode
Specifies the type of authentication mode that is required for the Business Connectivity Services connection.
The value for the authentication mode is any one of the following options:
--PassThrough --RevertToSelf --Credentials --WindowsCredentials --DigestCredentials --ClientCertificate --
Anonymous

Type: ODataAuthenticationMode
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExtensionProvider
{{Fill ExtensionProvider Description}}

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the OData Connection Settings object.

Type: ODataConnectionSettings
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the existing Business Connectivity Services connection.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecureStoreTargetApplicationId
Specifies the Secure Store Target Application ID. Works in conjunction with the AuthenticationMode parameter.
The value for the SecureStoreTargetApplicationId parameter is any one of the following options:
--Credentials --WindowsCredentials --DigestCredentials --ClientCertificate

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceAddressURL
Specifies the URL for the OData service. The URL does not have to be Internet facing. This is the final destination
from which data is retrieved.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context which is in the form of an instance of an SPServiceContext object, an
SPSiteAdministration object identifier, or a SPSite object: An example of a service context value is an identifier
from the ID field, a string identifier, a URI, or a string representation of a GUID.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPODataConnectionSetting
New -SPODataConnectionSetting
Remove-SPODataConnectionSetting
minutes to read • Edit Online

Set-SPODataConnectionSettingMetadata
In ths Article

Updates properties for the metadata of a Business Connectivity Services connection.

Syntax
Set-SPODataConnectionSettingMetadata [-Identity] <ODataConnectionSettings> -ServiceContext
<SPServiceContextPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationMode
<ODataAuthenticationMode>] [-Confirm] [-SecureStoreTargetApplicationId <String>] [-ServiceAddressMetadataURL
<Uri>] [-WhatIf] [<CommonParameters>]

Set-SPODataConnectionSettingMetadata -ServiceContext <SPServiceContextPipeBind> -Name <String> [-


AssignmentCollection <SPAssignmentCollection>] [-AuthenticationMode <ODataAuthenticationMode>] [-Confirm] [-
SecureStoreTargetApplicationId <String>] [-ServiceAddressMetadataURL <Uri>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Set-SPODataConnectionSettingMetaData cmdlet to update properties for a Business Connectivity Services
connection for a Business Connectivity Services service application in the farm.
This cmdlet applies to an on-premises environment only. You cannot use this command in the SharePoint Online
Management Shell.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831 (https://go.microsoft.com/fwlink/p/?
LinkId=251831).

Examples
--------------EXAMPLE 1-------------

Set-SPODataConnectionSettingMetadata -Name "ContosoServiceApp" -ServiceContext "http://contoso" -


AuthenticationMode "PassThrough"

This example updates the authentication mode of the metadata of Business Connectivity Services connection
named ContosoServiceApp.
--------------EXAMPLE 2-------------
$ConnectionVariable = Get-SPODataConnectionSettingMetadata -ServiceContext http://contoso -Name
"ContosoServiceApp"

Set-SPODataConnectionSettingMetadata -Identity $ConnectionVariable -AuthenticationMode "PassThrough"

This example updates the Metadata properties of the Business Connectivity Services connection named
ContosoServiceApp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationMode
Specifies the type of authentication mode that the Business Connectivity Services connection requires.
The value for the authentication mode is any one of the following options:
--PassThrough --RevertToSelf --Credentials --WindowsCredentials --DigestCredentials --ClientCertificate --
Anonymous

Type: ODataAuthenticationMode
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
Specifies the OData Connection Settings object.

Type: ODataConnectionSettings
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the existing Business Connectivity Services connection.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecureStoreTargetApplicationId
Specifies the Secure Store Target Application ID. Works in conjunction with the AuthenticationMode parameter.
The value for the SecureStoreTargetApplicationId parameter is any one of the following options:
--Credentials --WindowsCredentials --DigestCredentials --ClientCertificate

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceAddressMetadataURL
Specifies the metadata URL for the OData service. This URL does not have to be Internet facing. If a value is not
specified for a connection, a default value is used.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context which is in the form of an instance of an SPServiceContext object, an
SPSiteAdministration object identifier, or an SPSite object. An example of a service context value is an identifier
from the ID field, a string identifier, a URI, or a string representation of a GUID.
Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPODataConnectionSettingMetaData
minutes to read • Edit Online

Set-SPOGeoStorageQuota
In ths Article

This Cmdlet sets the Storage quota on a multi-geo tenant.

Syntax
Set-SPOGeoStorageQuota -GeoLocation <String> -StorageQuotaMB <Int64> [<CommonParameters>]

Description
This Cmdlet sets the storage quota, in megabytes, on a particular geo-location. Additionally, it requires a
connection to a multi-geo tenant to run correctly. You must be a SharePoint Online global Administrator.

Examples
EXAMPLE 1

Set-SPOGeoStorageQuota -GeoLocation EASTUS -StorageQuotaMB 512

Sets the SharePoint Online Storage Quota on the EAST US location to 512 MB.
EXAMPLE 2

Set-SPOGeoStorageQuota -GeoLocation NORTHCENTRALUS -StorageQuotaMB 1024

Sets the SharePoint Online Storage Quota on the NORTH CENTRAL US location to 1 TeraBytes (1Tb).

Parameters
-GeoLocation
PARAMVALUE: String

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageQuotaMB
PARAMVALUE: Int64
Type: Int64
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Get-SPOGeoStorageQuota
minutes to read • Edit Online

Set-SPOHideDefaultThemes
In ths Article

Specifies whether the default themes should be available.

Syntax
Set-SPOHideDefaultThemes [-HideDefaultThemes] <Boolean> [<CommonParameters>]

Description
The Set-SPOHideDefaultThemes cmdlet is used to specify whether the default themes that come with
SharePoint should be included in the theme picker list. For example, you might want to create custom themes for
your sites and then remove the default themes to ensure that all pages use your custom themes.
After creating the "Custom Cyan" theme, hiding the default themes leaves only the one custom theme in the
themes list under Change the look.
Specify the setting as either $true to hide the default themes, or $false (the default setting) to allow use of the
default themes.

NOTE
This cmdlet was named Set-HideDefaultThemes until the December 2017 release of the SPO Management Shell. We
recommend that you use the latest version of the PowerShell cmdlets.

TIP
Allows you to hide or show ALL default themes, no any particular ones.

NOTE
This cmdlet hides the default themes on Modern Sites. You cannot hide the default themes on Classic Sites.

Examples
Example 1
In this example, the cmdlet hides the default themes.

Set-SPOHideDefaultThemes $true
Example 2
In this example, the cmdlet restores the default themes to the theme picker list.

Set-SPOHideDefaultThemes $false

Parameters
-HideDefaultThemes
{{ Fill HideDefaultThemes Description }}

Type: Boolean
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOHideDefaultThemes
minutes to read • Edit Online

Set-SPOHomeSite
In ths Article

Sets a SharePoint Site as a Home Site.

Syntax
Set-SPOHomeSite [-HomeSiteUrl] <String> [<CommonParameters>]

Description
Use this cmdlet to set a SharePoint Site as a Home Site. A home site is a communication site that you create and
set as the top landing page for all users in your intranet. For more information, see Set up a home site for your
organization

Examples
Example 1

Set-SPOHomeSite -HomeSiteUrl "https://contoso.sharepoint.com/sites/homesite"

This example set the site collection at https://contoso.sharepoint.com/sites/homesite as SharePoint Online Home
Site.

Parameters
-HomeSiteUrl
The Url of the site collection to be the home site.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Set-SPOHubSite
In ths Article

Sets the hub site information such as name, logo, and description.

Syntax
Set-SPOHubSite [-Identity] <SpoHubSitePipeBind> [-Title <string>] [-LogoUrl <string>] [-Description <string>]
[-SiteDesignId <guid>] [-RequiresJoinApproval <bool>] [<CommonParameters>]

Description
Use this cmdlet to set properties such as name, logo, and description. These properties appear for the hub in the
SharePoint user interface.
If the hub site doesn't exist, this cmdlet returns a "File not found" error.

Examples
Example 1

Set-SPOHubSite https://contoso.sharepoint.com/sites/Marketing `
-Title "Marketing Hub" `
-LogoUrl https://contoso.sharepoint.com/sites/Marketing/SiteAssets/hublogo.png `
-Description "Hub for the Marketing division"

This example updates the name of the hub displayed in the SharePoint user interface. It also updates the logo used
in the hub navigation, and specifies an optional description for the hub.

Parameters
-Description
A description of the hub site.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
URL of the hub site.
Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LogoUrl
The URL of a logo to use in the hub navigation.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequiresJoinApproval
Determines if joining a Hub site requires approval.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteDesignId
Site Design ID, for example db752673-18fd-44db-865a-aa3e0b28698e

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title
The display name of the hub.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPOMigrationPackageAzureSource
In ths Article

Cmdlet to create Azure containers, upload migration package files into the appropriate containers and snapshot
the uploaded content.

Syntax
Set-SPOMigrationPackageAzureSource -AccountKey <String> -AccountName <String> [-AzureQueueName <String>]
[-EncryptionMetaInfo <MigrationFileEncryptionInfo[]>] [-EncryptionParameters <EncryptionParameters>]
[-FileContainerName <String>] -MigrationSourceLocations <MigrationPackageLocation> [-NoLogFile]
[-NoSnapshotCreation] [-NoUpload] [-Overwrite] [-PackageContainerName <String>] [<CommonParameters>]

Set-SPOMigrationPackageAzureSource -AccountKey <String> -AccountName <String> [-AzureQueueName <String>]


[-EncryptionMetaInfo <MigrationFileEncryptionInfo[]>] [-EncryptionParameters <EncryptionParameters>]
[-FileContainerName <String>] [-NoLogFile] [-NoSnapshotCreation] [-NoUpload] [-Overwrite]
[-PackageContainerName <String>] -SourceFilesPath <String> -SourcePackagePath <String> [<CommonParameters>]

Set-SPOMigrationPackageAzureSource [-EncryptionMetaInfo <MigrationFileEncryptionInfo[]>]


[-EncryptionParameters <EncryptionParameters>]
-MigrationPackageAzureLocations <MigrationPackageAzureLocations>
-MigrationSourceLocations <MigrationPackageLocation> [-NoLogFile] [-NoSnapshotCreation] [-NoUpload]
[-Overwrite] [<CommonParameters>]

Set-SPOMigrationPackageAzureSource [-EncryptionMetaInfo <MigrationFileEncryptionInfo[]>]


[-EncryptionParameters <EncryptionParameters>]
-MigrationPackageAzureLocations <MigrationPackageAzureLocations> [-NoLogFile] [-NoSnapshotCreation]
[-NoUpload] [-Overwrite] -SourceFilesPath <String> -SourcePackagePath <String> [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets.
This cmdlet returns a Microsoft.Online.SharePoint.Migration. MigrationPackageAzureLocations object, which can
be used as a source for this cmdlet or, more commonly, as a source for the Submit-SPOMigrationJob cmdlet.

Examples
-----------------------EXAMPLE 1-----------------------------
$azurelocations = Set-SPOMigrationPackageAzureSource -SourcePath \\fileserver\share\folder1 -OutputPackagePath
d:\MigrationPackages\Folder1_TgtPkg -FileContainerUri migration-files -PackageContainerUri migration-package -
AccountName migrationstore -AccountKey
"nmcXQ+1NctB7BlRVm+8+qWUn6GUFIH7E5ZQPThcjg8SfFWTJ34HthyOEoROwxHYIajpOYxYDt7qUwSEBQlLWoA=="

This example creates migration package containers in Azure storage using the supplied account credentials,
uploads the package files into them, snapshots the files and lastly returns the connection strings to a PowerShell
variable.
-----------------------EXAMPLE 2-----------------------------

Set-SPOMigrationPackageAzureSource -SourcePath \\fileserver\share\folder1 -OutputPackagePath


d:\MigrationPackages\Folder1_TgtPkg -MigrationPackageAzureLocations $azurelocations -AccountName
migrationstore -AccountKey
"nmcXQ+1NctB7BlRVm+8+qWUn6GUFIH7E5ZQPThcjg8SfFWTJ34HthyOEoROwxHYIajpOYxYDt7qUwSEBQlLWoA==" -NoUpload

This example uses existing migration package containers in Azure storage to snapshot previously uploaded files
and then returns the connection strings to a PowerShell variable.

Parameters
-AccountKey
The account key for the Azure Storage account.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AccountName
The account name for the Azure Storage account.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureQueueName
An optional name of the Azure Storage Reporting Queue where import operations lists events during import. This
value must be in lower case and conform to Azure's queue naming rules.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EncryptionMetaInfo
PARAMVALUE: MigrationFileEncryptionInfo[]

Type: MigrationFileEncryptionInfo[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EncryptionParameters
PARAMVALUE: EncryptionParameters

Type: EncryptionParameters
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileContainerName
The optional name of the Azure Blob Storage container that will be created if it does not currently exist. It will hold
the uploaded package content files. The value must be in lower case and conform to Azure's container naming
rules. If this not supplied a name will be generated using the format -files.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MigrationPackageAzureLocations
A set of fully qualified URLs and SAS tokens representing the Azure Blob Storage containers that hold the package
content and metadata files and an optional Azure Storage Reporting Queue. This object is returned during
successful processing of the Set-SPOMigrationPackageAzureSource

Type: MigrationPackageAzureLocations
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MigrationSourceLocations
PARAMVALUE: MigrationPackageLocation

Type: MigrationPackageLocation
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoLogFile
Indicates to not create a log file. The default is to create a new CopyMigrationPackage log file within the directory
specified within the SourcePackagePath parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoSnapshotCreation
Indicates to not perform snapshots on the content in the containers. The default is to snapshot each of the
packages files in the containers.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoUpload
Indicates to not upload the package files. The default is to upload all the package files.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PackageContainerName
The optional name of the Azure Blob Storage container that will be created if it does not currently exist. It will hold
the uploaded package metadata files. The value must be in lower case and conform to Azure's container naming
rules. If this not supplied a name will be generated using the format -package.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SourceFilesPath
The directory location where the package's source content files exist.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourcePackagePath
The directory location where the package's metadata files exist.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Set-SPOMultiGeoCompanyAllowedDataLocation
In ths Article

Adds a multi-geo allowed location.

Syntax
Set-SPOMultiGeoCompanyAllowedDataLocation [-Location] <string> [-InitialDomain] <string> [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Use this cmdlet to set the multi-geo allowed locations.

Examples
Example 1

Set-SPOMultiGeoCompanyAllowedDataLocation -Location AUS -Domain contoso.com

Sets AUS (Australia) as an allowed multi-geo location for the domain contoso.com.

Parameters
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InitialDomain
Sets the initial domain to assocate with the specified data location.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Location
The Preferred Data Location (PDL ) to allow.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPOMultiGeoCompanyAllowedDataLocation
minutes to read • Edit Online

Set-SPOMultiGeoExperience
In ths Article

Syntax
Set-SPOMultiGeoExperience [-AllInstances] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Use this cmdlet to set a get location into SPO mode. This upgrade action is not reversible. For more information
see Enabling SharePoint Multi-Geo in your satellite geo location

Examples
Example 1

Set-SPOMultiGeoExperience

This example will upgrade your instance's multi-geo experience to include SharePoint Online Multi-Geo. This
operation usually takes about an hour while we perform various publish backs in the service and re-stamp your
tenant.

Parameters
-AllInstances
.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPOOrgAssetsLibrary
In ths Article

Updates information for a library that is designated as a location for organization assets.

Syntax
Set-SPOOrgAssetsLibrary -LibraryUrl <String> -ThumbnailUrl <String> [<CommonParameters>]

Description
The Set-SPOOrgAssetsLibrary cmdlet updates information for a library that is designated as a location for
organization assets. Updating the thumbnail URL is currently supported.

Examples
Example 1
This example updates the thumbnail URL publicly displayed for the library to contosologo2.jpg.

Set-SPOOrgAssetsLibrary -LibraryURL sites/branding/Assets -ThumbnailURL


https://contoso.sharepoint.com/sites/branding/Assets/contosologo2.jpg

Example 2
This example removes the thumbnail URL that was previously set for the library.

Set-SPOOrgAssetsLibrary -LibraryURL sites/branding/Assets -ThumbnailURL ""

Parameters
-LibraryUrl
Indicates the server relative URL of the library to be modified.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ThumbnailUrl
Indicates the URL of the background image used when the library is publicly displayed. If no thumbnail URL is
indicated, the card will have a gray background.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPOOrgAssetsLibrary
Get-SPOOrgAssetsLibrary
Remove-SPOOrgAssetsLibrary
minutes to read • Edit Online

Set-SPOOrgNewsSite
In ths Article

Marks a site as one of multiple possible tenant's organizational news sites. Requires Global administrator or
SharePoint administrator permissions.

Syntax
Set-SPOOrgNewsSite -OrgNewsSiteUrl <string> [<CommonParameters>]

Description
Use this cmdlet to mark a site as an organizational authoritative news site. Such sites get primary treatment in the
SharePoint user interface.
If a site with specified URL doesn't exist, this cmdlet returns a "File not found" error.

Examples
Example 1

Set-SPOOrgNewsSite -OrgNewsSiteUrl https://contoso.sharepoint.com/sites/Marketing

This example marks https://contoso.sharepoint.com/sites/Marketing as an organizational news site.

Parameters
-OrgNewsSiteUrl
The URL of a site to be marked as an organizational news site.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPOOrgNewsSite
Get-SPOOrgNewsSite
minutes to read • Edit Online

Set-SPOSite
In ths Article

Sets or updates one or more properties' values for a site collection.

Syntax
Set-SPOSite [-Identity] <SpoSitePipeBind> [-AllowSelfServiceUpgrade <Boolean>] [-Confirm]
[-DenyAddAndCustomizePages <Boolean>] [-LocaleId <UInt32>] [-LockState <String>] [-NoWait] [-Owner <String>]
[-ResourceQuota <Double>] [-ResourceQuotaWarningLevel <Double>]
[-SandboxedCodeActivationCapability <SandboxedCodeActivationCapabilities>]
[-SharingCapability <SharingCapabilities>] [-StorageQuota <Int64>] [-StorageQuotaWarningLevel <Int64>]
[-Title <String>] [-WhatIf] [-BlockDownloadOfNonViewableFiles <Boolean>]
[-CommentsOnSitePagesDisabled <Boolean>] [-SocialBarOnSitePagesDisabled <Boolean>]
[-DisableAppViews <AppViewsPolicy>]
[-DisableCompanyWideSharingLinks <CompanyWideSharingLinksPolicy>] [-DisableFlows <FlowsPolicy>]
[-RestrictedToGeo <RestrictedToRegion>] [-SharingAllowedDomainList <String>]
[-SharingBlockedDomainList <String>] [-SharingDomainRestrictionMode <SharingDomainRestrictionModes>]
[-ShowPeoplePickerSuggestionsForGuestUsers <Boolean>] [-StorageQuotaReset]
[-DefaultSharingLinkType] [-DefaultLinkPermission] [-DefaultLinkToExistingAccess]
[-ConditionalAccessPolicy <SPOConditionalAccessPolicyType>] [-LimitedAccessFileType
<SPOLimitedAccessFileType>] [-AllowEditing <Boolean>] [-AnonymousLinkExpirationInDays <Int32>] [-
OverrideTenantAnonymousLinkExpirationPolicy <Boolean>] [<CommonParameters>]

Set-SPOSite [-Identity] <SpoSitePipeBind> -EnablePWA <Boolean> [-Confirm] [-WhatIf] [<CommonParameters>]

Set-SPOSite [-Identity] <SpoSitePipeBind> [-Confirm] [-DisableSharingForNonOwners] [-WhatIf]


[<CommonParameters>]

Set-SPOSite [-Identity] <SpoSitePipeBind> [-AllowSelfServiceUpgrade <Boolean>] [-Confirm]


[-DenyAddAndCustomizePages <Boolean>] [-LocaleId <UInt32>] [-LockState <String>] [-NoWait] [-Owner <String>]
[-ResourceQuota <Double>] [-ResourceQuotaWarningLevel <Double>]
[-SandboxedCodeActivationCapability <SandboxedCodeActivationCapabilities>]
[-SharingCapability <SharingCapabilities>] [-StorageQuota <Int64>] [-StorageQuotaWarningLevel <Int64>]
[<CommonParameters>]

Description
For any parameters that are passed in, the Set-SPOSite cmdlet sets or updates the setting for the site collection
identified by parameter Identity.
You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832.

Examples
-----------------------EXAMPLE 1-----------------------------

Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -Owner joe.healy@contoso.com -NoWait

Example 1 updates the owner of site collection https://contoso.sharepoint.com/sites/site1 to the person whose
email address is joe.healy@contoso.com. This cmdlet is executed immediately without delay.
-----------------------EXAMPLE 2-----------------------------

Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -ResourceQuota 0 -StorageQuota 1024

Example 2 updates the settings of site collection https://contoso.sharepoint.com/sites/site1. The storage quota is
updated to 1024 megabytes (1 GB ) and the resource quota is updated to 0 megabytes.
-----------------------EXAMPLE 3-----------------------------

Set-SPOSite -Identity https://contoso.sharepoint.com -StorageQuota 1500 -StorageQuotaWarningLevel 1400

This example updates the settings of site collection https://contoso.sharepoint.com. The storage quota is updated to
1500 megabytes and the storage quota warning level is updated to 1400 megabytes.
-----------------------EXAMPLE 4-----------------------------

Set-SPOSite -Identity https://contoso.sharepoint.com -DisableSharingForNonOwners

Example 4 prevents non-owners of a site from inviting new users to the site.
-----------------------EXAMPLE 5-----------------------------

Set-SPOSite -Identity https://contoso.sharepoint.com/sites/groupname -StorageQuota 3000 -


StorageQuotaWarningLevel 2000

This example sets the quota for the site.

NOTE
If Site Collection Storage Management is enabled for the tenant, you will not be able to set quota and will have a generic
error returned. To workaround this issue, set the site collection storage management to "manual" temporarily, set your
quotas and then set the site collection storage management setting back to its original setting.

-----------------------EXAMPLE 6-----------------------------

Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnablePWA $true

Example 6 enables the site "site1" to create Project Web Applications (PWA).
-----------------------EXAMPLE 7-----------------------------

Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -SharingCapability ExternalUserSharingOnly


Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -SharingDomainRestrictionMode AllowList -
SharingAllowedDomainList "contoso.com"
Example 7 sets the Sharing Capability to allow external users who accept sharing invitations and sign in as
authenticated users, and then specifies an email domain that is allowed for sharing with the external collaborators.

Parameters
-AllowEditing
Prevents users from editing Office files in the browser and copying and pasting Office file contents out of the
browser window.
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-AllowLimitedAccess
{{Fill AllowLimitedAccess Description}}

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowSelfServiceUpgrade
Determines whether site collection administrators can upgrade their site collections.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AnonymousLinkExpirationInDays
Specifies all anonymous/anyone links that have been created (or will be created) will expire after the set number of
days. Only applies if OverrideTenantAnonymousLinkExpirationPolicy is set to true.
To remove the expiration requirement, set the value to zero (0).

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BlockDownloadOfNonViewableFiles
{{Fill BlockDownloadOfNonViewableFiles Description}}
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CommentsOnSitePagesDisabled
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConditionalAccessPolicy
Please read Control access from unmanaged devices documentation here to understand Conditional Access Policy
usage in SharePoint Online.
PARAMVALUE: AllowFullAccess | AllowLimitedAccess | BlockAccess

Type: SPOConditionalAccessPolicyType
Required: False
Position: Named
Default value: AllowFullAccess
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
PARAMVALUE: SwitchParameter

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultLinkPermission
The default link permission for the site collection
PARAMVALUE: None | View | Edit
None - Respect the organization default link permission View - Sets the default link permission for the site to
"view" permissions Edit - Sets the default link permission for the site to "edit" permissions
Type: SharingPermissionType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultLinkToExistingAccess
When set to TRUE, the DefaultSharingLinkType will be overriden and the default sharing link will a People with
Existing Access link (which does not modify permissions). When set to FALSE (the default), the default sharing link
type is controlled by the DefaultSharingLinkType parameter
PARAMVALUE: $true | $false

Type: SharingLinkType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultSharingLinkType
The default link type for the site collection
PARAMVALUE: None | AnonymousAccess | Internal | Direct
None - Respect the organization default sharing link type AnonymousAccess - Sets the default sharing link for this
site to an Anonymous Access or Anyone link Internal - Sets the default sharing link for this site to the
"organization" link or company shareable link Direct - Sets the default sharing link for this site to the "Specific
people" link

Type: SharingLinkType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DenyAddAndCustomizePages
Determines whether the Add And Customize Pages right is denied on the site collection. For more information
about permission levels, see User permissions and permission levels in SharePoint.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableAppViews
PARAMVALUE: Unknown | Disabled | NotDisabled
Type: AppViewsPolicy
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableCompanyWideSharingLinks
PARAMVALUE: Unknown | Disabled | NotDisabled

Type: CompanyWideSharingLinksPolicy
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableFlows
PARAMVALUE: Unknown | Disabled | NotDisabled

Type: FlowsPolicy
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableSharingForNonOwners
This parameter prevents non-owners from invited new users to the site.
This parameter is available only in SharePoint Online Management Shell Version 16.0.4613.1211 or later.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnablePWA
Determines whether site can include Project Web App. For more information about Project Web App, see Plan
SharePoint groups in Project Server.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL of the site collection to update.
Type: SpoSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LimitedAccessFileType
The following parameters can be used with -ConditionalAccessPolicy AllowLimitedAccess for both the
organization-wide setting and the site-level setting. -OfficeOnlineFilesOnly: Allows users to preview only Office
files in the browser. This option increases security but may be a barrier to user productivity. -LimitedAccessFileType
WebPreviewableFiles (default): Allows users to preview Office files and other file types (such as PDF files and
images) in the browser. Note that the contents of file types other than Office files are handled in the browser. This
option optimizes for user productivity but offers less security for files that aren't Office files. -
LimitedAccessFileType OtherFiles: Allows users to download files that can't be previewed, such as .zip and .exe.
This option offers less security.
PARAMVALUE: OfficeOnlineFilesOnly | WebPreviewableFiles | OtherFiles

Type: SPOLimitedAccessFileType
Required: False
Position: Named
Default value: WebPreviewableFiles
Accept pipeline input: False
Accept wildcard characters: False

-LocaleId
Specifies the language of this site collection. For more information, see Locale IDs Assigned by Microsoft
(https://go.microsoft.com/fwlink/p/?LinkId=242911).

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LockState
Sets the lock state on a site. Valid values are: NoAccess, ReadOnly and Unlock. When the lock state of a site is
ReadOnly, a message will appear on the site stating that the site is under maintenance and it is read-only. When the
lock state of a site is NoAccess, all traffic to the site will be blocked. If parameter NoAccessRedirectUrl in the
Set-SPOTenant cmdlet is set, traffic to sites that have a lock state NoAccess will be redirected to that URL. If
parameter NoAccessRedirectUrl is not set, a 403 error will be returned. It isn't possible to set the lock state on the
root site collection.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoWait
Specifies to continue executing script immediately.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OverrideTenantAnonymousLinkExpirationPolicy
Choose whether to override the anonymous or anyone link expiration policy on this site
PARAMVALUE: None | False | True
None - Respect the organization-level policy for anonymous or anyone link expiration False - Respect the
organization-level policy for anonymous or anyone link expiration True - Override the organization-level policy for
anonymous or anyone link expiration (can be more or less restrictive)

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the owner of the site collection.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceQuota
Specifies the resource quota in megabytes of the site collection. The default value is 0. For more information, see
Resource Usage Limits on Sandboxed Solutions in SharePoint (https://msdn.microsoft.com/en-
us/library/gg615462.aspx).

Type: Double
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceQuotaWarningLevel
Specifies the warning level in megabytes of the site collection to warn the site collection administrator that the site
is approaching the resource quota.
Type: Double
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RestrictedToGeo
PARAMVALUE: NoRestriction | BlockMoveOnly | BlockFull | Unknown

Type: RestrictedToRegion
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SandboxedCodeActivationCapability
PARAMVALUE: Unknown | Check | Disabled | Enabled

Type: SandboxedCodeActivationCapabilities
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharingAllowedDomainList
Specifies a list of email domains that is allowed for sharing with the external collaborators. Use the space character
as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".
For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365
SharePoint Online and OneDrive for Business.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharingBlockedDomainList
Specifies a list of email domains that is blocked or prohibited for sharing with the external collaborators. Use space
character as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".
For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365
SharePoint Online and OneDrive for Business.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharingCapability
Determines what level of sharing is available for the site. The possible values are: Disabled - don't allow sharing
outside your organization, ExistingExternalUserSharingOnly - Allow sharing only with the external users that
already exist in your organization's directory, ExternalUserSharingOnly - allow external users who accept sharing
invitations and sign in as authenticated users, or ExternalUserAndGuestSharing - allow sharing with all external
users, and by using anonymous access links.
For more information about sharing, see Turn external sharing on or off for SharePoint Online
(https://docs.microsoft.com/sharepoint/turn-external-sharing-on-or-off).

Type: SharingCapabilities
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharingDomainRestrictionMode
Specifies the external sharing mode for domains.
The following values are:
None
AllowList
BlockList
For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365
SharePoint Online and OneDrive for Business.

Type: SharingDomainRestrictionModes
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowPeoplePickerSuggestionsForGuestUsers
To enable the option to search for existing guest users at Site Collection Level, set this parameter to $true.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SocialBarOnSitePagesDisabled
Disables or enables the Social Bar for Site Collection.
The Social Bar will appear on all modern SharePoint pages with the exception of the home page of a site. It will
give users the ability to like a page, see the number of views, likes, and comments on a page, and see the people
who have liked a page.
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-StorageQuota
Specifies the storage quota in megabytes of the site collection.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageQuotaReset
Resets the OneDrive for Business storage quota to the tenant's new default storage space.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StorageQuotaWarningLevel
Specifies the warning level in megabytes of the site collection to warn the site collection administrator that the site
is approaching the storage quota.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title
Specifies the title of the site collection.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
PARAMVALUE: SwitchParameter

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Set-SPOTenant
minutes to read • Edit Online

Set-SPOSiteDesign
In ths Article

Updates a previously uploaded site design.

Syntax
Set-SPOSiteDesign
[-Identity <SPOSiteDesignPipeBind>]
[-Title <string>]
[-WebTemplate <string>]
[-SiteScripts <SPOSiteScriptPipeBind[]>]
[-Description <string>]
[-PreviewImageUrl <string>]
[-PreviewImageAltText <string>]
[-IsDefault]
[<CommonParameters>]

Description
Updates a previously uploaded site design.

Examples
Example 1
This example updates a previously created site design.

Set-SPOSiteDesign `
-Identity 44252d09-62c4-4913-9eb0-a2a8b8d7f863 `
-Title "Contoso customer tracking - version 2" `
-WebTemplate "68" `
-Description "Updated site design for list schema that tracks key customer data in a list" `
-PreviewImageUrl "https://contoso.sharepoint.com/SiteAssets/site-preview.png" `
-PreviewImageAltText "site preview - version 2"

Parameters
-Description
The display description of the site design.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The site design Id.

Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsDefault
A switch that if provided, applies the site design to the default site template. For more information, see Customize a
default site design.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreviewImageAltText
The alt text description of the image for accessibility.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreviewImageUrl
The URL of a preview image. If none is specified, SharePoint uses a generic image.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteScripts
An array of one or more site scripts. Each is identified by an ID. The scripts run in the order listed.

Type: SPOSiteScriptPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title
The display name of the site design.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebTemplate
Identifies which base template to add the design to. Use the value 64 for the Team site template, and the value 68
for the Communication site template.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPOSiteGroup
In ths Article

Updates the SharePoint Online owner and permission levels on a group inside a site collection.

Syntax
Set-SPOSiteGroup -Identity <String> [-Name <String>] [-Owner <String>] [-PermissionLevelsToAdd <String[]>]
[-PermissionLevelsToRemove <String[]>] -Site <SpoSitePipeBind> [<CommonParameters>]

Description
You must be a SharePoint Online global administrator and a site collection administrator to run the
Set-SPOSiteGroup cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

Set-SPOSiteGroup -Site https://contoso.sharepoint.com/sites/siteA -Identity "ProjectViewers" -


PermissionLevelsToRemove "Full Control" -PermissionLevelsToAdd "View Only"

Example 1 changes permission level of the ProjectViewers group inside site collection
https://contoso.sharepoint.com/sites/siteA from Full Control to View Only.
-----------------------EXAMPLE 2-----------------------------

Set-SPOSiteGroup -Site https://contoso.sharepoint.com -Identity "ProjectViewers" -Owner


Melissa.kerr@contoso.com

Example 2 sets Melissa.kerr@contoso.com as the owner of the ProjectViewers group.

Parameters
-Identity
Specifies the name of the group.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the new name of the group.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the owner (individual or a security group) of the group to be created.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionLevelsToAdd
Specifies the permission levels to grant to the group.

NOTE
Permission levels are defined by SharePoint Online global administrators from SharePoint Online Administration Center.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionLevelsToRemove
Specifies the permission levels to remove from the group.

NOTE
Permission levels are defined by SharePoint Online global administrators from SharePoint Online Administration Center.
Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the site collection the group belongs to.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOSiteGroup
minutes to read • Edit Online

Set-SPOSiteOffice365Group
In ths Article

Connects a top-level SPO site collection to a new Office 365 Group.

Syntax
Set-SPOSiteOffice365Group
-Site <string>
-DisplayName <string>
-Alias <string>
[-IsPublic]
[-Description <string>]
[-Classification <string>]
[-KeepOldHomepage]
[<CommonParameters>]

Description
Connects a top-level SPO site collection to a new Office 365 Group. You must be a SharePoint Online global
administrator to run the cmdlet.

IMPORTANT
This cmdlet is currently in preview and is subject to change. It is not currently supported for use in production environments.

If the site doesn't exist, this cmdlet returns a "File not found" error.

Examples
Example 1
This example creates a new Office 365 Group named "site1group" and connects site collection
https://contoso.sharepoint.com/sites/site1 to it. The group will privacy set to "Private" and Classification set to
"Highly Confidential".

Set-SPOSiteOffice365Group -Site https://contoso.sharepoint.com/sites/site1 -DisplayName "site1group" -Alias


"site1group" -Classification "Highly Confidential"

Example 2
This example creates a new Office 365 Group named "classicsite" and connects site collection
https://contoso.sharepoint.com/sites/classicsite to it. It will keep the old home page from the classic site.
Set-SPOSiteOffice365Group -Site https://contoso.sharepoint.com/sites/classicsite -DisplayName "Classic Site" -
Alias "classicsite" -KeepOldHomepage

Parameters
-Alias
Specifies the email alias for the new Office 365 Group that will be created.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Classification
Specifies the classification value, if classifications are set for the organization. If no value is provided, the default
classification will be set, if one is configured.
See Azure Active Directory cmdlets for configuring group settings and follow the steps in the Create settings at the
directory level to define the classification for Office 365 groups.
See Manage Office 365 Groups with PowerShell for more information.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the group's description.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies the name of the new Office 365 Group that will be created.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsPublic
Determines the Office 365 Group's privacy setting. If switch is included, the group will be public, otherwise it will
be private.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeepOldHomepage
For sites that already have a modern page set as homepage, you can specify whether you want to keep it as the
homepage.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
The site collection being connected to new Office 365 Group.

Type: Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPOSiteScript
In ths Article

Updates a previously uploaded site script.

Syntax
Set-SPOSiteScript
-Identity <SPOSiteScriptPipeBind>
-Title <string>
-Content <string>
[-Description <string>]
[-Version <Int32>]
[<CommonParameters>]

Description
Updates a previously uploaded site script.

Examples
Example 1
This example updates a previously created site script. Any site designs referencing it execute the updated script.
$newnavscript = @'
{
"$schema": "schema.json",
"actions": [
{
"verb": "addNavLink",
"url": "/Custom Library",
"displayName": "Custom Library Updated",
"isWebRelative": true
},
{
"verb": "addNavLink",
"url": "/Lists/Custom List",
"displayName": "Custom List Updated",
"isWebRelative": true
},
{
"verb": "applyTheme",
"themeName": "Contoso Explorers"
}
],
"bindata": { },
"version": 2
};
'@

Set-SPOSiteScript -Identity edaec4ec-71e2-4026-ac1e-6686bb30190d -Content $newnavscript -Version 2

Parameters
-Content
The JSON value that describes the script. For more information, see the JSON reference.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
A description of the script.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The id of the site design.
Type: SPOSiteDesignPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title
The display name of the site design.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Version
A version number of the script.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPOStorageEntity
In ths Article

Tenant properties allow tenant administrators to add properties in the app catalog that can be read by various
SharePoint Framework components. Because tenant properties are stored in the tenant app catalog, you must
provide the tenant app catalog site collection URL or the site collection app catalog URL in the following cmdlets.

Syntax
Set-SPOStorageEntity -Site <SpoSitePipeBind> -Key <string> -Value <string> -Comments <string> -Description
<string> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
This cmdLet is used to set a value in the property bag.

Examples
Example 1

Set-SPOStorageEntity -Site "https://tenant-name.sharepoint.com/sites/app-catalog" -Key "MyCustomKey" -Value "


{'MyKey':1234}" -Comments "This is an example" -Description "This is an example"

This example adds an entry to the property bag.

Parameters
-Comments
Comment for this property bag entry.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Description of the property.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Key
The key in the property bag that should be removed.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
URL to the tenant or site collection app catalog.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Value
Value to be set.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Set-SPOTenant
In ths Article

Sets properties on the SharePoint Online organization.

Syntax
Set-SPOTenant [-ApplyAppEnforcedRestrictionsToAdHocRecipients <Boolean>]
[-BccExternalSharingInvitations <Boolean>]
[-BccExternalSharingInvitationsList <String>]
[-BlockDownloadLinksFileType <BlockDownloadLinksFileTypes>]
[-DisplayStartASiteOption <Boolean>]
[-EnableAIPIntegration <Boolean>]
[-EnableMinimumVersionRequirement <Boolean>]
[-EnablePromotedFileHandlers <Boolean>]
[-ExternalServicesEnabled <Boolean>]
[-MarkNewFilesSensitiveByDefault <SensitiveByDefaultState>]
[-MaxCompatibilityLevel <Int32>]
[-MinCompatibilityLevel <Int32>]
[-NoAccessRedirectUrl <String>]
[-OfficeClientADALDisabled <Boolean>]
[-ProvisionSharedWithEveryoneFolder <Boolean>]
[-RequireAcceptingAccountMatchInvitedAccount <Boolean>]
[-SearchResolveExactEmailOrUPN <Boolean>]
[-SharingCapability <SharingCapabilities>]
[-ShowAllUsersClaim <Boolean>]
[-ShowEveryoneClaim <Boolean>]
[-ShowEveryoneExceptExternalUsersClaim <Boolean>]
[-SignInAccelerationDomain <String>]
[-StartASiteFormUrl <String>]
[-UsePersistentCookiesForExplorerView <Boolean>]
[-CommentsOnSitePagesDisabled <Boolean>]
[-CommentsOnFilesDisabled <Boolean>]
[-SocialBarOnSitePagesDisabled <Boolean>]
[-DefaultLinkPermission <SharingPermissionType>]
[-DefaultSharingLinkType <SharingLinkType>]
[-DisabledWebPartIds <Guid>]
[-DisallowInfectedFileDownload <Boolean>]
[-EnableGuestSignInAcceleration <Boolean>]
[-FileAnonymousLinkType <AnonymousLinkType>]
[-FilePickerExternalImageSearchEnabled <Boolean>]
[-FolderAnonymousLinkType <AnonymousLinkType>]
[-IPAddressAllowList <String>]
[-IPAddressEnforcement <Boolean>]
[-IPAddressWACTokenLifetime <Int32>]
[-LegacyAuthProtocolsEnabled <Boolean>]
[-NotificationsInOneDriveForBusinessEnabled <Boolean>]
[-NotificationsInSharePointEnabled <Boolean>]
[-NotifyOwnersWhenInvitationsAccepted <Boolean>]
[-NotifyOwnersWhenItemsReshared <Boolean>]
[-ODBAccessRequests <SharingState>]
[-ODBMembersCanShare <SharingState>]
[-OneDriveForGuestsEnabled <Boolean>]
[-OneDriveStorageQuota <Int64>]
[-OrphanedPersonalSitesRetentionPeriod <Int32>]
[-OwnerAnonymousNotification <Boolean>]
[-PermissiveBrowserFileHandlingOverride <Boolean>]
[-PreventExternalUsersFromResharing <Boolean>]
[-PublicCdnAllowedFileTypes <String>]
[-PublicCdnEnabled <Boolean>]
[-RequireAnonymousLinksExpireInDays <Int32>]
[-SharingAllowedDomainList <String>]
[-SharingBlockedDomainList <String>]
[-SharingDomainRestrictionMode <SharingDomainRestrictionModes>]
[-ShowPeoplePickerSuggestionsForGuestUsers <Boolean>]
[-SpecialCharactersStateInFileFolderNames <SpecialCharactersState>]
[-SyncPrivacyProfileProperties <Boolean>]
[-UseFindPeopleInPeoplePicker <Boolean>]
[-UserVoiceForFeedbackEnabled <Boolean>]
[-ContentTypeSyncSiteTemplatesList MySites [-ExcludeSiteTemplate]]
[-CustomizedExternalSharingServiceUrl <String>]
[-ConditionalAccessPolicy <SPOConditionalAccessPolicyType>]
[-ConditionalAccessPolicyErrorHelpLink <String>]
[-LimitedAccessFileType <SPOLimitedAccessFileType>]
[-AllowDownloadingNonWebViewableFiles <Boolean>]
[-AllowCommentsTextOnEmailEnabled <Boolean>]
[-AllowEditing <Boolean>]
[-EnableAzureADB2BIntegration <Boolean>]
[-ExternalUserExpirationRequired <Boolean>]
[-ExternalUserExpireInDays <Int32>]
[-EmailAttestationRequired <Boolean>]
[-EmailAttestationReAuthDays <Int32>]
[<CommonParameters>]

Description
You can use the Set-SPOTenant cmdlet to enable external services and to specify the versions in which site
collections can be created. You can also use the Set-SPOSite cmdlet together with the Set-SPOTenant cmdlet to
block access to a site in your organization and redirect traffic to another site.
You must be a SharePoint Online global administrator to run the cmdlet.

Examples
-----------------------EXAMPLE 1-----------------------------

Set-SPOSite -Identity https://contoso.sharepoint.com/sites/team1 -LockState NoAccess


Set-SPOTenant -NoAccessRedirectUrl 'https://www.contoso.com'

This example blocks access to https://contoso.sharepoint.com/sites/team1 and redirects traffic to


https://www.contoso.com.
-----------------------EXAMPLE 2-----------------------------

Set-SPOTenant -ShowEveryoneExceptExternalUsersClaim $false

This example hides the "Everyone Except External Users" claim in People Picker.
-----------------------EXAMPLE 3-----------------------------

Set-SPOTenant -ShowAllUsersClaim $false

This example hides the "All Users" claim group in People Picker.
-----------------------EXAMPLE 4-----------------------------
Set-SPOTenant -UsePersistentCookiesForExplorerView $true

This example enables the use of special persisted cookie for Open with Explorer.
-----------------------EXAMPLE 5-----------------------------

Set-SPOTenant -LegacyAuthProtocolsEnabled $True

This example enables legacy authentication protocols on the tenant. This can help to enable login in situations
where the admin users get an error like "Cannot contact web site 'https://contoso-admin.sharepoint.com/' or the
web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'.", and the
underlying error is "Access denied. Before opening files in this location, you must first browse to the web site and
select the option to login automatically."
-----------------------EXAMPLE 6------------------------------

Set-SPOTenant -ContentTypeSyncSiteTemplatesList MySites

This example enables Content Type Hub to push content types to all OneDrive for Business sites. There is no
change in Content Type Publishing behavior for other sites.
-----------------------EXAMPLE 7-------------------------------

Set-SPOTenant -ContentTypeSyncSiteTemplatesList MySites -ExcludeSiteTemplate

This example stops publishing content types to OneDrive for Business sites.
-----------------------EXAMPLE 8-------------------------------

Set-SPOTenant -SearchResolveExactEmailOrUPN $true

This example disables starts with for all users/partial name search functionality for all SharePoint users, except
SharePoint Admins.
-----------------------EXAMPLE 9-------------------------------

Set-SPOTenant -UseFindPeopleInPeoplePicker $true

This example enables tenant admins to enable ODB and SPO to respect Exchange supports Address Book Policy
(ABP ) policies in the people picker.
-----------------------EXAMPLE 10-------------------------------

Set-SPOTenant -ShowPeoplePickerSuggestionsForGuestUsers $true

This example enable the option to search for existing guest users at Tenant Level.

Parameters
-AllowCommentsTextOnEmailEnabled
When this parameter is true, the email notification that a user receives when is mentioned, includes the
surrounding document context. Set it to false to disable this feature.

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-AllowDownloadingNonWebViewableFiles
This paramater has been deprecated.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowEditing
Prevents users from editing Office files in the browser and copying and pasting Office file contents out of the
browser window.
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-ApplyAppEnforcedRestrictionsToAdHocRecipients
When the feature is enabled, all guest users are subject to conditional access policy. By default guest users who are
accessing SharePoint Online files with pass code are exempt from the conditional access policy.
The valid values are:
False (default) - Guest access users are exempt from conditional access policy.
True - Conditional access policy is also applied to guest users.

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-BccExternalSharingInvitations
When the feature is enabled, all external sharing invitations that are sent will blind copy the e-mail messages listed
in the BccExternalSharingsInvitationList.
The valid values are:
False (default) - BCC for external sharing is disabled.
True - All external sharing invitations that are sent will blind copy the e-mail messages listed in the
BccExternalSharingsInvitationList.

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-BccExternalSharingInvitationsList
Specifies a list of e-mail addresses to be BCC'd when the BCC for External Sharing feature is enabled.
Multiple addresses can be specified by creating a comma separated list with no spaces.
The valid values are:
"" (default) - Blank by default, this will also clear any value that has been set.
Single or Multiple e-mail addresses - joe@contoso.com or joe@contoso.com,bob@contoso.com

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BlockDownloadLinksFileType
The valid values are:
WebPreviewableFiles
ServerRenderedFilesOnly

Type: BlockDownloadLinksFileTypes
Required: False
Position: Named
Default value: WebPreviewableFiles
Accept pipeline input: False
Accept wildcard characters: False

-CommentsOnFilesDisabled
Disables or enables commenting functionality on the files. PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CommentsOnSitePagesDisabled
Disables or enables commenting functionality on the site pages. PARAMVALUE: $true | $false
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConditionalAccessPolicy
Please read Control access from unmanaged devices documentation here to understand Conditional Access Policy
usage in SharePoint Online.
PARAMVALUE: AllowFullAccess | AllowLimitedAccess | BlockAccess

Type: SPOConditionalAccessPolicyType
Required: False
Position: Named
Default value: AllowFullAccess
Accept pipeline input: False
Accept wildcard characters: False

-ConditionalAccessPolicyErrorHelpLink
A Link for help when Conditional Access Policy blocks a user. This should be in a valid URL format. A valid URL
format that begins with http:// or https://.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomizedExternalSharingServiceUrl
Specifies a URL that will be appended to the error message that is surfaced when a user is blocked from sharing
externally by policy. This URL can be used to direct users to internal portals to request help or to inform them
about your organization's policies. An example value is "https://www.contoso.com/sharingpolicies".

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultLinkPermission
Lets administrators choose the default permission of the link in the sharing dialog box in OneDrive for Business
and SharePoint Online. This applies to anonymous access, internal and direct links.
The valid values are None (non settable), View and Edit.
Type: SharingPermissionType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultSharingLinkType
Lets administrators choose what type of link appears is selected in the "Get a link" sharing dialog box in OneDrive
for Business and SharePoint Online.
For additional information about how to change the default link type, see Change the default link type when users
get links for sharing.

NOTE
Setting this value to "none" will default "get a link" to the most permissive link available (that is, if anonymous links are
enabled, the default link will be anonymous access; if they are disabled then the default link will be internal.

The valid values are:


None - Respect the organization default sharing link type
Direct - Sets the default sharing link for this site to the Specific people link
Internal - Sets the default sharing link for this site to the organization link or company shareable link
AnonymousAccess - Sets the default sharing link for this site to an Anonymous Access or Anyone link

Type: SharingLinkType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisabledWebPartIds
PARAMVALUE: [,,...]
Allows administrators prevent certain, specific web parts from being added to pages or rendering on pages on
which they were previously added. Currently, only Amazon Kindle, YouTube and Twitter web parts can be disabled
in such a manner.
To disable a specific web part you need to enter its GUID as the parameter: Amazon Kindle (46698648-fcd5-41fc-
9526-c7f7b2ace919), YouTube (544dd15b-cf3c-441b-96da-004d5a8cea1d), Twitter (f6fdf4f8-4a24-437b-a127-
32e66a5dd9b4). If you are looking for a GUID for any other web part, easiest way to achieve is to place the web
part on a SharePoint page and move to maintenance mode. See more details around the web part maintenance
mode from Microsoft Support.
You can enter in multiple GUIDs by using a comma to separate them. To view a list of disabled web parts, use Get-
SPOTenant to get DisabledWebPartIds.
To re-enable some disabled web parts, use the Set-SPOTenant with the -DisabledWebPartIds parameter and
corresponding GUIDs that you still want to keep disabling. To re-enable all disabled web parts, use Set-SPOTenant
-DisabledWebPartIds @().
Type: Guid[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisallowInfectedFileDownload
Prevents the Download button from being displayed on the Virus Found warning page.
Accepts a value of true (enabled) to hide the Download button or false (disabled) to display the Download button.
By default this feature is set to false.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayStartASiteOption
Determines whether tenant users see the Start a Site menu option.
The valid values are:
True (default) - Tenant users will see the Start a Site menu option.
False - Start a Site is hidden from the menu.

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-EmailAttestationReAuthDays
Sets the number of days for email attestation re-authentication. Value can be from 1 to 365 days.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAttestationRequired
Sets email attestation to required.
Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-EnableAIPIntegration
This parameter enables SharePoint to process the content of files stored in SharePoint and OneDrive with
sensitivity labels that include encryption. (Currently in public preview ). For more information, see Enable sensitivity
labels for Office files in SharePoint and OneDrive (public preview ).

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-EnableAzureADB2BIntegration
Enables the preview for OneDrive and SharePoint integration with Azure AD B2B. For more information see
http://aka.ms/spo-b2b-integration
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-EnableGuestSignInAcceleration
Accelerates guest-enabled site collections as well as member-only site collections when the
SignInAccelerationDomain parameter is set.

NOTE
If enabled, your identity provider must be capable of authenticating guest users. If it is not, guest users will be unable to log
in and access content that was shared with them.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableMinimumVersionRequirement
This parameter was used to opt-out of the versioning setting update. It has no effect as of today as versioning
setting has already been rolled out.
Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-EnablePromotedFileHandlers
This parameter is reserved for Microsoft internal use.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExternalServicesEnabled
Enables external services for a tenant.
External services are defined as services that are not in the Office 365 datacenters.
The valid values are:
True (default) - External services are enabled for the tenant.
False - External services that are outside of the Office 365 datacenters cannot interact with SharePoint.

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-ExternalUserExpirationRequired
Specifies whether to enable the external user expiration policy, where external users will be expired and removed
from the site collection in a given number of days.

NOTE
Once the policy is enabled, expiration values will be set on external users as they join a site collection (via sharing links or via
direct access). When the policy is disabled, it will no longer set expiration values on users, but it will not automatically clear
expiration values set on existing users. The users can then have their expiration value cleared by a site collection administrator
if required.

The valid values are: True - Enables the Policy. False (default) - Disables the policy.

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
-ExternalUserExpireInDays
Specifies the number of days before an external user will expire and be removed from the site collection if the
policy is enabled. Value can be from 30 to 730 days.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileAnonymousLinkType
Anonymous access links can allow recipients to only view or view and edit. The value can be set separately for
folders and separately for files.
PARAMVALUE: None | View | Edit

Type: AnonymousLinkType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePickerExternalImageSearchEnabled
For Webparts that support inserting images, like for example Image or Hero webpart, the Web search (Powered by
Bing) option will be available if enabled (the default).

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-FolderAnonymousLinkType
Anonymous access links can allow recipients to only view or view and edit.
PARAMVALUE: None | View | Edit

Type: AnonymousLinkType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IPAddressAllowList
Configures multiple IP addresses or IP address ranges (IPv4 or IPv6), that are recognized as trusted.
Use commas to separate multiple IP addresses or IP address ranges. Verify there are no overlapping IP addresses
and ensure IP ranges use Classless Inter-Domain Routing (CIDR ) notation. For example, 172.16.0.0,
192.168.1.0/27.
NOTE
The IPAddressAllowList parameter only lets administrators set IP addresses or ranges that are recognized as trusted. To only
grant access from these IP addresses or ranges, set the IPAddressEnforcement parameter to $true.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IPAddressEnforcement
Allows access from network locations that are defined by an administrator.
The values are $true and $false. The default value is $false which means the setting is disabled.
Before the IPAddressEnforcement parameter is set, make sure you add a valid IPv4 or IPv6 address to the
IPAddressAllowList parameter.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IPAddressWACTokenLifetime
Allows to set the session timeout. If you are a tenant administrator and you begin IP address enforcement for
OneDrive for Business in Office 365, this enforcement automatically activates a tenant parameter
IPAddressWACTokenLifetime. The default value is 15 minutes, when IP Address Enforcement is True.
PARAMVALUE: Int32

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LegacyAuthProtocolsEnabled
By default this value is set to $True, which means that authentication using legacy protocols is enabled.
Setting this parameter to $False prevents Office clients using non-modern authentication protocols from accessing
SharePoint Online resources.
True - Enables Office clients using non-modern authentication protocols (such as, Forms-Based Authentication
(FBA) or Identity Client Runtime Library (IDCRL )) to access SharePoint resources.
False - Prevents Office clients using non-modern authentication protocols from accessing SharePoint Online
resources.
NOTE
• This may also prevent third-party apps from accessing SharePoint Online resources.
Also, this will also block apps using the SharePointOnlineCredentials class to access SharePoint Online resources. For
additional information about SharePointOnlineCredentials, see SharePointOnlineCredentials class.

• The change is not instant. It might take up to 24 hours to be applied.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LimitedAccessFileType
Allows users to preview only Office files in the browser. This option increases security, but may be a barrier to user
productivity.
The following parameters can be used with -ConditionalAccessPolicy AllowLimitedAccess for both the
organization-wide setting and the site-level setting.
OfficeOnlineFilesOnly: Allows users to preview only Office files in the browser. This option increases security but
may be a barrier to user productivity.
LimitedAccessFileType WebPreviewableFiles (default): Allows users to preview Office files and other file types
(such as PDF files and images) in the browser. Note that the contents of file types other than Office files are
handled in the browser. This option optimizes for user productivity but offers less security for files that aren't Office
files.
LimitedAccessFileType OtherFiles: Allows users to download files that can't be previewed, such as .zip and .exe.
This option offers less security.
PARAMVALUE: OfficeOnlineFilesOnly | WebPreviewableFiles | OtherFiles

Type: SPOLimitedAccessFileType
Required: False
Position: Named
Default value: WebPreviewableFiles
Accept pipeline input: False
Accept wildcard characters: False

-MarkNewFilesSensitiveByDefault
If external sharing is turned on, sensitive content could be shared and accessed by guests before the Office DLP
rule finishes processing, you can address this issue by configuring this parameter. Possible values are
BlockExternalSharing: Prevents guests from accessing newly added files until at least one Office DLP policy scans
the content of the file.
AllowExternalSharing: Disables this feature.
For more information see Mark new files as sensitive by default.
Type: SensitiveByDefaultState
Required: False
Position: Named
Default value: AllowExternalSharing
Accept pipeline input: False
Accept wildcard characters: False

-MaxCompatibilityLevel
Specifies the upper bound on the compatibility level for new sites.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinCompatibilityLevel
Specifies the lower bound on the compatibility level for new sites.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoAccessRedirectUrl
Specifies the URL of the redirected site for those site collections which have the locked state "NoAccess."
The valid values are:
"" (default) - Blank by default, this will also remove or clear any value that has been set.
Full URL - Example: https://contoso.sharepoint.com/Pages/Locked.aspx

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotificationsInOneDriveForBusinessEnabled
Enables or disables notifications in OneDrive for Business.
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NotificationsInSharePointEnabled
Enables or disables notifications in SharePoint.
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotifyOwnersWhenInvitationsAccepted
When this parameter is set to $true and when an external user accepts an invitation to a resource in a user's
OneDrive for Business, the OneDrive for Business owner is notified by e-mail.
For additional information about how to configure notifications for external sharing, see Configure notifications for
external sharing for OneDrive for Business.
The valid values are $true and $false.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NotifyOwnersWhenItemsReshared
When this parameter is set to $true and another user re-shares a document from a user's OneDrive for Business,
the OneDrive for Business owner is notified by e-mail.
For additional information about how to configure notifications for external sharing, see Configure notifications for
external sharing for OneDrive for Business.
The valid values are $true and $false.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ODBAccessRequests
Lets administrators set policy on access requests and requests to share in OneDrive for Business.
The valid values are:
On - Users without permission to share can trigger sharing requests to the OneDrive for Business owner when
they attempt to share. Also, users without permission to a file or folder can trigger access requests to the OneDrive
for Business owner when they attempt to access an item they do not have permissions to.
Off - Prevent access requests and requests to share on OneDrive for Business.
Unspecified - Let each OneDrive for Business owner enable or disable access requests and requests to share on
their OneDrive.

Type: SharingState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ODBMembersCanShare
Lets administrators set policy on re-sharing behavior in OneDrive for Business.
The valid values are:
On - Users with edit permissions can re-share.
Off - Only OneDrive for Business owner can share. The value of ODBAccessRequests defines whether a request to
share gets sent to the owner.
Unspecified - Let each OneDrive for Business owner enable or disable re-sharing behavior on their OneDrive.

Type: SharingState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OfficeClientADALDisabled
When set to true this will disable the ability to use Modern Authentication that leverages ADAL across the tenant.
The valid values are:
False (default) - Modern Authentication is enabled/allowed.
True - Modern Authentication via ADAL is disabled.

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-OneDriveForGuestsEnabled
Lets OneDrive for Business creation for administrator managed guest users. Administrator managed Guest users
use credentials in the resource tenant to access the resources.
The valid values are:
$true - Administrator managed Guest users can be given OneDrives, provided needed licenses are assigned.
$false - Administrator managed Guest users can't be given OneDrives as functionality is turned off.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OneDriveStorageQuota
Sets a default OneDrive for Business storage quota for the tenant. It will be used for new OneDrive for Business
sites created.
A typical use will be to reduce the amount of storage associated with OneDrive for Business to a level below what
the License entitles the users. For example, it could be used to set the quota to 10 gigabytes (GB ) by default.
If value is set to 0, the parameter will have no effect.
If the value is set larger than the Maximum allowed OneDrive for Business quota, it will have no effect.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OrphanedPersonalSitesRetentionPeriod
Specifies the number of days after a user's Active Directory account is deleted that their OneDrive for Business
content will be deleted.
The value range is in days, between 30 and 3650. The default value is 30.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OwnerAnonymousNotification
Enables or disables owner anonymous notification. If enabled, an email notification will be sent to the OneDrive for
Business owners when an anonymous links are created or changed.
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissiveBrowserFileHandlingOverride
Enables the Permissive browser file handling. By default, the browser file handling is set to Strict. The Strict setting
adds headers that force the browser to download certain types of files. The forced download improves security by
disallowing the automatic execution of Web content. When the setting is set to Permissive, no headers are added
and certain types of files can be executed in the browser instead of download.
The valid values are:
True - Enable the Permissive browser file handling setting.
False - Keep the default Strict browser file handling setting.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreventExternalUsersFromResharing
Prevents external users from resharing files, folders, and sites that they do not own.
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProvisionSharedWithEveryoneFolder
Creates a Shared with Everyone folder in every user's new OneDrive for Business document library.
The valid values are:
True (default) - The Shared with Everyone folder is created.
False - No folder is created when the site and OneDrive for Business document library is created.
The default behavior of the Shared with Everyone folder changed in August 2015.
For additional information about the change, see Provision the Shared with Everyone folder in OneDrive for
Business (https://support.office.com/en-us/article/Provision-the-Shared-with-Everyone-folder-in-OneDrive-for-
Business-6bb02c91-fd0b-42ba-9457-3921cb6dc5b2?ui=en-US&rs=en-US&ad=US )

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-PublicCdnAllowedFileTypes
Sets public CDN allowed file types, if the public CDN is enabled.
PARAMVALUE: String
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PublicCdnEnabled
Enables or disables the public CDN.
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequireAcceptingAccountMatchInvitedAccount
Ensures that an external user can only accept an external sharing invitation with an account matching the invited
email address.
Administrators who desire increased control over external collaborators should consider enabling this feature.
Note, this only applies to new external users accepting new sharing invitations. Also, the resource owner must
share with an organizational or Microsoft account or the external user will be unable to access the resource.
The valid values are:
False (default) - When a document is shared with an external user, bob@contoso.com, it can be accepted by any
user with access to the invitation link in the original e-mail.
True - User must accept this invitation with bob@contoso.com.

NOTE
If this functionality is turned off (value is False), it is possible for the external/guest users you invite to your Azure AD, to log
in using their personal, non-work accounts either on purpose, or by accident (they might have a pre-existing, signed in
session already active in the browser window they use to accept your invitation).

NOTE
Even though setting the value is instant (if you first run Set-SPOTenant -RequireAcceptingAccountMatchInvitedAccount
$True, and then Get-SPOTenant -RequireAcceptingAccountMatchInvitedAccount, True should be returned), the
functionality isn't turned on immediately. It may take up to 24 hours to take effect.

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-RequireAnonymousLinksExpireInDays
Specifies all anonymous links that have been created (or will be created) will expire after the set number of days.
To remove the expiration requirement, set the value to zero (0).

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchResolveExactEmailOrUPN
Removes the search capability from People Picker. Note, recently resolved names will still appear in the list until
browser cache is cleared or expired. This also does not allow SharePoint users to search for security groups or
SharePoint groups.
SharePoint Administrators will still be able to use starts with or partial name matching when enabled.
The valid values are:
False (default) - Starts with / partial name search functionality is available.
True - Disables starts with for all users/partial name search functionality for all SharePoint users, except SharePoint
Admins.

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SharingAllowedDomainList
Specifies a list of email domains that is allowed for sharing with the external collaborators. Use the space character
as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".
For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365
SharePoint Online and OneDrive for Business.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharingBlockedDomainList
Specifies a list of email domains that is blocked or prohibited for sharing with the external collaborators. Use space
character as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".
For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365
SharePoint Online and OneDrive for Business.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharingCapability
Determines what level of sharing is available for the site.
The valid values are:
ExternalUserAndGuestSharing (default) - External user sharing (share by email) and guest link sharing are both
enabled.
Disabled - External user sharing (share by email) and guest link sharing are both disabled.
ExternalUserSharingOnly - External user sharing (share by email) is enabled, but guest link sharing is disabled.
For more information about sharing, see Manage external sharing for your SharePoint online environment
(https://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/manage-external-sharing-for-
your-sharepoint-online-environment-HA102849864.aspx).

Type: SharingCapabilities
Required: False
Position: Named
Default value: ExternalUserAndGuestSharing
Accept pipeline input: False
Accept wildcard characters: False

-SharingDomainRestrictionMode
Specifies the external sharing mode for domains.
The valid values are:
None
AllowList - Users will be able to share with external collaborators coming only from that email domain.
BlockList - Users will be able to share with all external collaborators apart from the ones on the
BlockedDomainList.
For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365
SharePoint Online and OneDrive for Business.

Type: SharingDomainRestrictionModes
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowAllUsersClaim
Enables the administrator to hide the All Users claim groups in People Picker.
When users share an item with "All Users (x)", it is accessible to all organization members in the tenant's Azure
Active Directory who have authenticated with via this method. When users share an item with "All Users (x)" it is
accessible to all organization members in the tenant that used NTLM to authentication with SharePoint.
Note, the All Users (authenticated) group is equivalent to the Everyone claim, and shows as Everyone. To change
this, see -ShowEveryoneClaim.
The valid values are:
True (default) - The All Users claim groups are displayed in People Picker.
False - The All Users claim groups are hidden in People Picker.

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-ShowEveryoneClaim
Enables the administrator to hide the Everyone claim in the People Picker.
When users share an item with Everyone, it is accessible to all authenticated users in the tenant's Azure Active
Directory, including any active external users who have previously accepted invitations.
Note, that some SharePoint system resources such as templates and pages are required to be shared to Everyone
and this type of sharing does not expose any user data or metadata.
The valid values are:
True (default) - The Everyone claim group is displayed in People Picker.
False - The Everyone claim group is hidden from the People Picker.

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-ShowEveryoneExceptExternalUsersClaim
Enables the administrator to hide the "Everyone except external users" claim in the People Picker.
When users share an item with "Everyone except external users", it is accessible to all organization members in the
tenant's Azure Active Directory, but not to any users who have previously accepted invitations.
The valid values are:
True (default) - The Everyone except external users is displayed in People Picker.
False - The Everyone except external users claim is not visible in People Picker.

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-ShowPeoplePickerSuggestionsForGuestUsers
Shows people picker suggestions for guest users. To enable the option to search for existing guest users at Tenant
Level, set this parameter to $true.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignInAccelerationDomain
Specifies the home realm discovery value to be sent to Azure Active Directory (AAD ) during the user sign-in
process.
When the organization uses a third-party identity provider, this prevents the user from seeing the Azure Active
Directory Home Realm Discovery web page and ensures the user only sees their company's Identity Provider's
portal. This value can also be used with Azure Active Directory Premium to customize the Azure Active Directory
login page.
Acceleration will not occur on site collections that are shared externally.
This value should be configured with the login domain that is used by your company (that is,
example@contoso.com).
If your company has multiple third-party identity providers, configuring the sign-in acceleration value will break
sign-in for your organization.
The valid values are:
"" (default) - Blank by default, this will also remove or clear any value that has been set.
Login Domain - For example: "contoso.com"

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SocialBarOnSitePagesDisabled
Disables or enables the Social Bar.
The Social Bar will appear on all modern SharePoint pages with the exception of the home page of a site. It will
give users the ability to like a page, see the number of views, likes, and comments on a page, and see the people
who have liked a page.
PARAMVALUE: $true | $false

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SpecialCharactersStateInFileFolderNames
Permits the use of special characters in file and folder names in SharePoint Online and OneDrive for Business
document libraries.
NOTE
The only two characters that can be managed at this time are the # and % characters.

The valid values are:


NoPreference - Support for feature will be enabled by Microsoft on your Office 365 tenant.
Allowed - Lets the # and % characters in file and folder names in SharePoint Online and OneDrive for Business
document libraries.
Disallowed - Disallows the # and % characters in file and folder names in SharePoint Online and OneDrive for
Business document libraries.

Type: SpecialCharactersState
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartASiteFormUrl
Specifies URL of the form to load in the Start a Site dialog.
The valid values are:
"" (default) - Blank by default, this will also remove or clear any value that has been set.
Full URL - Example: "https://contoso.sharepoint.com/path/to/form"

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SyncPrivacyProfileProperties
This parameter enables the synchronization of privacy profile properties.

Type: Boolean
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False

-UseFindPeopleInPeoplePicker
This feature enables tenant admins to enable ODB and SPO to respect Exchange supports Address Book Policy
(ABP ) policies in the people picker.

NOTE
When set to $true, users aren't able to share with security groups or SharePoint groups.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UsePersistentCookiesForExplorerView
Lets SharePoint issue a special cookie that will allow this feature to work even when "Keep Me Signed In" is not
selected.
"Open with Explorer" requires persisted cookies to operate correctly. When the user does not select "Keep Me
Signed in" at the time of sign-in, "Open with Explorer" will fail.
This special cookie expires after 30 minutes and cannot be cleared by closing the browser or signing out of
SharePoint Online. To clear this cookie, the user must log out of their Windows session.
The valid values are:
False (default) - No special cookie is generated and the normal Office 365 sign-in length/timing applies.
True - Generates a special cookie that will allow "Open with Explorer" to function if the "Keep Me Signed In" box is
not checked at sign-in.

Type: Boolean
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-UserVoiceForFeedbackEnabled
Enables or disables the User Voice Feedback button.
PARAMVALUE: $true | $false
When set to $true, the "Feedback" link will be shown at the bottom of all modern SharePoint Online pages. The
"Feedback" link will allow the end user to fill out a feedback form inside SharePoint Online which will then create
an entry in the public SharePoint UserVoice topic.
When set to $false, feedback link will not be shown anymore. It may take up to an hour for a change of this
property to be reflected consistently throughout your tenant.

Type: Boolean
Required: False
Position: Named
Default value: $true
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Upgrade-SPOSite
Set-SPOSite
minutes to read • Edit Online

Set-SPOTenantCdnEnabled
In ths Article

Enables or disables Public content delivery network (CDN ) or Private CDN on the tenant level. Requires Tenant
administrator permissions.

Syntax
Set-SPOTenantCdnEnabled [-CdnType <SPOTenantCdnTypeClient>] [-Confirm] [-Enable <Boolean>] [-NoDefaultOrigins]
[-WhatIf] [<CommonParameters>]

Description
Enables or disables Public content delivery network (CDN ) or Private CDN on the tenant level.

Examples
-----------------------EXAMPLE 1-----------------------------

Set-SPOTenantCdnEnabled -CdnType public -Enable $true

The example enables a CDN.

Parameters
-CdnType
Specifies the CDN type. The valid values are: public or private.

Type: SPOTenantCdnTypeClient
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Enable
Specifies if the CDN is enabled.
The valid values are: $True and $False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoDefaultOrigins
PARAMVALUE: SwitchParameter

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Set-SPOTenantCdnEnabled
minutes to read • Edit Online

Set-SPOTenantCdnPolicy
In ths Article

Sets the content delivery network (CDN ) policies from the tenant level.

Syntax
Set-SPOTenantCdnPolicy -CdnType <SPOTenantCdnType> -PolicyType <SPOTenantCdnPolicyType> -PolicyValue <String>
[<CommonParameters>]

Description
{{Fill in the Description}}

Examples
--------------------EXAMPLE 1---------------------

Set-SPOTenantCdnPolicy -CdnType Public -PolicyType IncludeFileExtensions -PolicyValue


"CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,SVG,TTF,WOFF,BMP"

This example sets a CDN to a public type with a policy value of listed extensions.
--------------------EXAMPLE 2---------------------

Set-SPOTenantCdnPolicy -CdnType Public -PolicyType ExcludeRestrictedSiteClassifications -PolicyValue


"Confidential,Restricted"

This example sets a CDN to a public type with a policy value of valid site classifications.

Parameters
-CdnType
The CdnType parameter specifies the CDN type. The valid values are Public or Private.

Type: SPOTenantCdnType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PolicyType
{{Fill PolicyType Description}}
Type: SPOTenantCdnPolicyType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PolicyValue
{{Fill PolicyValue Description}}

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Set-SPOTenantContentTypeReplicationParameters
In ths Article

Select content types for replication

Syntax
Set-SPOTenantContentTypeReplicationParameters [-ReplicateAllContentTypes] [<CommonParameters>]

Set-SPOTenantContentTypeReplicationParameters -ReplicatedContentTypes <String[]> [<CommonParameters>]

Description
Before you run the cmdlets, please use 'Connect-SPOService' to connect to SharePoint Online first. By default, all
published content types in primary location will be replicated to satellite.

Examples
EXAMPLE 1

Set-SPOTenantContentTypeReplicationParameters -ReplicatedContentTypes "ct1","ct2"

Tenant admin can use this cmdlet to select only some content types only for replicating to overwrite default
settings
EXAMPLE 2

Set-SPOTenantContentTypeReplicationParameters -ReplicateAllContentTypes

Tenant admin can also reset to replicate all the content types.

Parameters
-ReplicateAllContentTypes
The ReplicateAllContentTypes parameter specifies whether all content types should be replicated.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ReplicatedContentTypes
{{Fill ReplicatedContentTypes Description}}

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Introduction to the SharePoint Online management shell
SharePoint Online Management Shell Download
Get-SPOAppErrors
Get-SPOTenantTaxonomyReplicationParameters
Set-SPOTenantTaxonomyReplicationParameters
Get-SPOTenantContentTypeReplicationParameters
minutes to read • Edit Online

Set-SPOTenantSyncClientRestriction
In ths Article

Controls tenant-wide options and restrictions specific to syncing files.

Syntax
Set-SPOTenantSyncClientRestriction [-BlockMacSync] [-DomainGuids <String>] [-Enable] [<CommonParameters>]

Set-SPOTenantSyncClientRestriction -DisableReportProblemDialog <Boolean> [<CommonParameters>]

Set-SPOTenantSyncClientRestriction [-ExcludedFileExtensions <String>] [<CommonParameters>]

Set-SPOTenantSyncClientRestriction [-GrooveBlockOption <String>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets.
You must be a SharePoint Online global administrator to run the cmdlet.
Requires a valid Connect-SPOService context to identify the tenant. For information on how to connect to the
tenant, see Connect-SPOService
The Set-SPOTenantSyncClientRestriction cmdlet is used to control a variety of tenant-wide administrative
settings related to syncing files from OneDrive and SharePoint. You may use it to:
Set restrictions on whether users can sync items to non-domain joined machines, control the list of allowed
domains, and manage whether Mac clients (which do not support domain join) can sync.
Prevents files with specific extensions from being synced.
Controls whether users can continue to sync OneDrive for Business libraries with the old OneDrive for
Business sync client.
Restrict non-domain joined machines from syncing
The Set-SPOTenantSyncClientRestriction cmdlet can be used to enable the feature for tenancy and set the
domain GUIDs in the safe recipients list. When this feature is enabled it can take up to 24 hours for the change to
take effect. However, any changes to the safe domains list are reflected within five minutes.
The Set-SPOTenantSyncClientRestriction cmdlet applies both to existing Microsoft OneDrive for Business sync
client (Groove.exe) and the Microsoft OneDrive for Business Next Generation Sync Client (OneDrive.exe).
OneDrive.exe is the new sync client that will sync both consumer and business accounts.

IMPORTANT
The new OneDrive for Business Next Generation Sync Client lets you connect and sync files from your OneDrive for Business.
You can add a work or school account to the new OneDrive for Business sync client and sync all your files in OneDrive to
your computer. For more information, see Improve your OneDrive sync experience.

When the feature is enabled the following will occur:


All OneDrive for Business Sync client requests originating from a domain that is not on the safe recipients list
will be blocked.
All Microsoft OneDrive Mac Sync client and Mac Beta client requests will not be blocked by default.
Microsoft OneDrive mobile apps are not blocked when this feature is enabled.
Regardless whether a computer is managed by a device management solution, a sync relationship will not be
established unless they are joined to a domain in the Safe Recipient List.
Any files that have been previously been synced down to your computer will not be deleted.
When this feature is enabled, please be aware the following upload behavior:
New or existing files added to the client will still be uploaded to the server and will not be blocked.
Regardless if the computer is joined to a domain which is set in the Safe Recipient List.
Regardless if the computer is joined to a domain which is not set in the Safe Recipient List.
And for all non-domain joined computers.
Microsoft OneDrive for Business sync client prior to version 15.0.4693.1000 will stop syncing existing libraries.

IMPORTANT
In order to explicitly block Microsoft OneDrive client for Mac or OneDrive for Business Next Generation Sync Client on Mac
OS X, please run the Set-SPOTenantSyncClientRestriction cmdlet with the BlockMacSync parameter set to true. For more
information about the Next Generation Sync Client for Mac OS X, see Get started with the new OneDrive sync client on Mac
OS X.

IMPORTANT
There is a known OneDrive for Business sync client issue where syncing is being blocked even if a computer is joined to a
domain which is set in the Safe Recipient List. To resolve this behavior, obtain the 15.0.4719.1000 version or higher of the
sync client, see May 12, 2015, update for OneDrive for Business.

NOTE
To determine the version of your Sync client, see What version of the sync client am I using?.

The latest OneDrive for Business sync client can be downloaded from Download OneDrive for Windows or How to
install OneDrive for Business for SharePoint and SharePoint Online.
IMPORTANT
This capability doesn't support Microsoft Azure Active Directory (AD) Joined or Workplace Joined devices.

For additional information about how to troubleshoot the OneDrive for Business sync client, see How to switch
from an MSI installation of OneDrive for Business (formerly SkyDrive Pro) standalone to a Click-To-Run
installation of OneDrive for Business (formerly SkyDrive Pro) standalone.
Block specific file extensions from syncing
The Set-SPOTenantSyncClientRestriction cmdlet can be used to configure a list of file extensions that should
not be synced by the OneDrive sync client, such as .PST files.
Any file extension may be blocked using this feature, but note that it may take up to 24 hours for a change to take
affect across all user devices. When this feature is enabled, users syncing any file that is in the exclusion list will see
an error message informing them of the block.

IMPORTANT
This feature is only supported by the new OneDrive for Business sync client. To determine the version of your Sync client, see
What version of the sync client am I using?.

Control whether users can use the old OneDrive for Business sync client
The Set-SPOTenantSyncClientRestriction cmdlet can be used to configure your tenant to allow or disallow
users from using the old OneDrive for Business sync client to sync OneDrive for Business libraries.
This feature is controlled on an opt-out model which lets users to continue syncing with the old sync client, you
may choose to opt out of the Groove block.
When this feature is enabled, the old OneDrive for Business sync client will stop syncing the user's OneDrive
contents. OneDrive for Business users who are still using the old OneDrive for Business sync client will see an
error message and will be prompted to launch and configure the new OneDrive for Business sync client. If they do
not yet have the new client installed, they will have the opportunity to download and install it.
If you opt out, users will be able to resume syncing with the old OneDrive for Business Sync client. Note that it may
take up to an hour for this change to be reflected.

NOTE
This feature only applies to syncing a user's own OneDrive for Business sites. Team Sites and shared content from other
people's OneDrive for Business sites will continue to sync with the old OneDrive for Business sync client.

Examples
--------------------EXAMPLE 1---------------------

Set-SPOTenantSyncClientRestriction -Enable -DomainGuids "786548DD-877B-4760-A749-6B1EFBC1190A; 877564FF-877B-


4760-A749-6B1EFBC1190A"

This example enables the feature for the tenancy and adds the domains GUIDs to the safe recipient list.
--------------------EXAMPLE 2------------------
Set-SPOTenantSyncClientRestriction -Enable -DomainGuids "786548DD-877B-4760-A749-6B1EFBC1190A; 877564FF-877B-
4760-A749-6B1EFBC1190A" -BlockMacSync:$true

This example turns on the Block Mac sync functionality.


--------------------EXAMPLE 3------------------

Set-SPOTenantSyncClientRestriction -ExcludedFileExtensions "pptx;docx;xlsx"

This example blocks syncing of PowerPoint, Word, and Excel file types using the new sync client (OneDrive.exe).
--------------------EXAMPLE 4------------------

Set-SPOTenantSyncClientRestriction -ExcludedFileExtensions ""

This example clears the ExcludedFileExtension list and lets all file types synced with the new client (OneDrive.exe).
--------------------EXAMPLE 5------------------

Set-SPOTenantSyncClientRestriction -GrooveBlockOption "OptOut"

This example allows users in a tenant to continue syncing OneDrive for Business libraries with the old OneDrive
for Business sync client.
--------------------EXAMPLE 6------------------

Set-SPOTenantSyncClientRestriction -GrooveBlockOption "HardOptIn"

This example blocks users in a tenant from syncing OneDrive for Business libraries using the old OneDrive for
Business sync client. Users will be prompted to upgrade to the new client.

Parameters
-BlockMacSync
Block Mac sync clients-- the Beta version and the new sync client (OneDrive.exe). The values for this parameter are
True and False. The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableReportProblemDialog

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DomainGuids
Sets the domain GUID to add to the safe recipient list. Requires a minimum of 1 domain GUID. The maximum
number of domain GUIDs allowed are 125.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Enables the feature to block sync originating from domains that are not present in the safe recipients list.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcludedFileExtensions
Blocks certain file types from syncing with the new sync client (OneDrive.exe).

NOTE
It may take up to one hour for changes to take effect.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GrooveBlockOption
Controls whether or not a tenant's users can sync OneDrive for Business libraries with the old OneDrive for
Business sync client. The valid values are OptOut, HardOptin, and SoftOptin.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Set-SPOTenantTaxonomyReplicationParameters
In ths Article

Select groups for replication

Syntax
Set-SPOTenantTaxonomyReplicationParameters [-ReplicateAllGroups] [<CommonParameters>]

Set-SPOTenantTaxonomyReplicationParameters -ReplicatedGroups <String[]> [<CommonParameters>]

Description
Before using this cmdlet, make sure you connect to Sharepoint Online using Connect-SPOService and the
desirable satellite location URL as the -Url parameter.
By default, all global groups except system/search/people/sitecollection in primary location will be replicated to
satellite.

Examples
EXAMPLE 1

Set-SPOTenantTaxonomyReplicationParameters -ReplicatedGroups "group1","group2"

Tenant admin can use this cmdlet to select some groups only for replicating to overwrite default settings.
EXAMPLE 2

Set-SPOTenantTaxonomyReplicationParameters -ReplicateAllGroups

Tenant admin can also reset to replicate all the groups.

Parameters
-ReplicateAllGroups
PARAMVALUE: SwitchParameter
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReplicatedGroups
PARAMVALUE: String[]

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Introduction to the SharePoint Online management shell
SharePoint Online Management Shell Download
Get-SPOAppErrors
Get-SPOTenantTaxonomyReplicationParameters
Get-SPOTenantContentTypeReplicationParameters
Set-SPOTenantContentTypeReplicationParameters
minutes to read • Edit Online

Set-SPOUnifiedGroup
In ths Article

Sets the Preferred Data Location (PDL ) for the specified Office 365 Group. The customer tenant must be multi-geo
enabled.

Syntax
Set-SPOUnifiedGroup [-GroupAlias] <string> [-PreferredDataLocation] <string> [<CommonParameters>]

Description
Use this cmdlet to set the Preferred Data Location for an Office 365 Group.

Examples
Example 1

Set-SPOUnifiedGroup -GroupAlias EUTeam -PreferredDataLocation EUR

Sets the PDL for the Office 365 Group named 'EUTeam' to EUR (Europe).

Parameters
-GroupAlias
The alias of the Office 365 Group.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreferredDataLocation
The Preferred Data Location for the Office 365 Group.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
Get-SPOUnifiedGroup
Move a SharePoint site to a different geo location
minutes to read • Edit Online

Set-SPOUser
In ths Article

Configures properties on an existing user.

Syntax
Set-SPOUser -IsSiteCollectionAdmin <Boolean> -LoginName <String> -Site <SpoSitePipeBind> [<CommonParameters>]

Description
Use the Set-SPOUser cmdlet to configure properties of an existing user. That is, to add or remove a user as a
SharePoint Online site collection administrator.
You must have the SharePoint Online Administrator or Global Administrator role to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
--------------------EXAMPLE---------------------

Set-SPOUser -Site https://contoso.sharepoint.com/sites/marketing -LoginName melissa.kerr@contoso.com -


IsSiteCollectionAdmin $true

This example makes melissa.kerr@contoso.com a SharePoint Online site collection administrator on


https://contoso.sharepoint.com/sites/marketing.

Parameters
-IsSiteCollectionAdmin
Specifies whether the user is a site collection administrator.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoginName
Specifies the user name.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the full URL of the site collection. It must be in a valid managed path in the company's site.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOUser
minutes to read • Edit Online

Set-SPOWebTheme
In ths Article

Sets the theme for a SharePoint site.

Syntax
Set-SPOWebTheme [-Theme] <SpoThemePipeBind> [-Web] <SpoSitePipeBind> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Use this cmdlet to set the custom theme for a Site

Examples
Example 1

Set-SPOWebTheme -Theme "Custom cyan" -Web https://contoso.sharepoint.com/sites/Contoso1

This example sets the "Custom Cyan" theme to the https://contoso.sharepoint.com/sites/Contoso1 site.

Parameters
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Theme
Name of the theme or SPOTheme object

Type: SpoThemePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True
Accept wildcard characters: False
-Web
Url of the site

Type: SpoSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Start-SPOSiteContentMove
In ths Article

Start a job to move a particular user or group of users to be moved across geo locations relative to the one that
executes the command

Syntax
Start-SPOSiteContentMove [-Url] <String> [-DestinationDataLocation] <String>
[[-PreferredMoveBeginDate] <DateTime>] [[-PreferredMoveEndDate] <DateTime>] [[-Reserved] <String>]
[-ValidationOnly] [<CommonParameters>]

Start-SPOSiteContentMove [-GroupName] <String> [-DestinationDataLocation] <String>


[[-PreferredMoveBeginDate] <DateTime>] [[-PreferredMoveEndDate] <DateTime>] [[-Reserved] <String>]
[-ValidationOnly] [<CommonParameters>]

Start-SPOSiteContentMove [-Url] <String> [-DestinationUrl] <String> [[-PreferredMoveBeginDate] <DateTime>]


[[-PreferredMoveEndDate] <DateTime>] [[-Reserved] <String>] [-ValidationOnly] [<CommonParameters>]

Description
This command starts the information and the status of a move request of a user between sites in a SharePoint
Online Multi Geo tenant.

Examples
EXAMPLE 1

Start-SPOSiteContentMove -Url https://contosoenergy.sharepoint.com/sites/hr -DestinationDataLocation EUR -


PreferredMoveBeginDate ((Get-Date).AddHours(1)) -PreferredMoveEndDate ((Get-Date).AddHour(12))

Starts the movement of the content on https://contosoenergy.sharepoint.com/sites/hr to the EUR destination


preferred to start 1 hour ahead from now, until 12 hours to that relative time.
EXAMPLE 2

Start-SPOSiteContentMove -GroupName group@contoso.com -DestinationDataLocation JPN

Starts the movement of a group of users called group@contoso.com to the JPN location
EXAMPLE 3

Start-SPOSiteContentMove -Url https://contosoenergy.sharepoint.com/sites/hr -DestinationUrl


https://contosoenergyEUR.sharepoint.com/sites/hr
Starts the movement from https://contosoenergy.sharepoint.com/sites/hr and set it to the location
https://contosoenergyEUR.sharepoint.com/sites/hr

Parameters
-DestinationDataLocation
PARAMVALUE: String

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationUrl
PARAMVALUE: String

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupName
PARAMVALUE: String

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreferredMoveBeginDate
PARAMVALUE: DateTime

Type: DateTime
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreferredMoveEndDate
PARAMVALUE: DateTime
Type: DateTime
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Reserved
PARAMVALUE: String

Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Destination URL where the move will take place

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ValidationOnly
PARAMVALUE: SwitchParameter

Type: SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Start-SPOSiteRename
Stop-SPOUserAndContentMove
Get-SPOUserAndContentMoveState
minutes to read • Edit Online

Start-SPOSiteRename
In ths Article

> [!NOTE ] > This Feature is part of the Admin Center Preview. If your tenant is not part of the Admin Center
Preview, you will get an error when trying to run this cmdlet. Starts a job to rename a site. You can change the title,
the URL or both of a particular site on a SharePoint Online collection

Syntax
Start-SPOSiteRename [-Identity] <SpoSitePipeBind> [-NewSiteUrl] <string> [[-NewSiteTitle] <string>]
[[-SuppressMarketplaceAppCheck]] [[-SuppressWorkflow2013Check]] [[-Reserved] <string>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
This command starts a rename of a site on a SharePoint Online site into a new title, name and url. Also allows you
to simulate the run using the -WhatIf parameter as well as -SuppressWorkflow2013Check and
SuppressMarketplaceAppCheck switch parameters.

Examples
EXAMPLE 1

$url="https://.sharepoint.com/site/samplesite"
$NewSiteUrl="https://.sharepoint.com/site/renamed"
Start-SPOSiteRename -Identity $url -NewSiteUrl $NewSiteUrl

Starts the rename of the SPO site with name "samplesite" to "renamed" without modifying the title.
EXAMPLE 2

$url="https://.sharepoint.com/site/samplesite"
$NewSiteUrl="https://.sharepoint.com/site/renamed"
$newTitle="New Title"
Start-SPOSiteRename -Identity $url -NewSiteUrl $NewSiteUrl -NewSiteTitle $newTitle

Starts the rename of the SPO site with name "samplesite" to "renamed" modifying the title of the site to "New Title"
EXAMPLE 3

$url="https://.sharepoint.com/site/samplesite"
$NewSiteUrl="https://.sharepoint.com/site/renamed"
$newTitle="New Title"
Start-SPOSiteRename -Identity $url -NewSiteUrl $NewSiteUrl -NewSiteTitle $newTitle -SuppressMarketplaceAppCheck
-SuppressWorkflow2013Check -WhatIf

Starts the simulation rename of the SPO site with name "samplesite" to "renamed" modifying the title of the site
to "New Title" without MarketPlaceAppCheck and without WorkFlow2013Check

Parameters
-Confirm
PARAMVALUE: SwitchParameter

Type: SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
PARAMVALUE: String

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewSiteTitle
PARAMVALUE: String

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewSiteUrl
PARAMVALUE: String

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Reserved
PARAMVALUE: String
Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SuppressMarketplaceAppCheck
PARAMVALUE: SwitchParameter

Type: SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SuppressWorkflow2013Check
PARAMVALUE: SwitchParameter

Type: SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Simulation of what would happened if you run the script without modifying anything.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Start-SPOUserAndContentMove
Stop-SPOUserAndContentMove
Get-SPOUserAndContentMoveState
minutes to read • Edit Online

Start-SPOUnifiedGroupMove
In ths Article

Initiates the move of an Office 365 Group to a new geo location

Syntax
Start-SPOUnifiedGroupMove [-GroupAlias] <String> [-DestinationDataLocation] <String> [[-PreferredMoveBeginDate]
<DateTime>] [[-PreferredMoveEndDate] <DateTime>] [[-Reserved] <String>] [-ValidationOnly] [-Force] [-
SuppressMarketplaceAppCheck] [-SuppressWorkflow2013Check] [-SuppressAllWarnings] [-SuppressBcsCheck]
[<CommonParameters>]

Description
Initiates the move of an Office 365 Group to a new geo location. The administrator may set a preferred start and
end time for the move, however the preferred end time is not guaranteed. The customer tenant must be multi-geo
enabled.

Examples
Example 1

Start-SPOUnifiedGroupMove -GroupAlias EUTeam -DestinationDataLocation EUR

Starts the move of Office 365 Group EUTeam to the Preferred Data Location EUR (Europe).

Parameters
-DestinationDataLocation
The destination location for the Office 365 Group move.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Force the cmdlet to run.
Type: SwitchParameter
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupAlias
The alias of the Office 365 Group.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreferredMoveBeginDate
The move will likely begin at this specified time.

Type: DateTime
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreferredMoveEndDate
The move will likely be completed by this specified time, on a best effort basis.

Type: DateTime
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Reserved
{{ Fill Reserved Description }}

Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SuppressAllWarnings
Suppress all warning messages.
Type: SwitchParameter
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SuppressBcsCheck
Suppress checking of Business Connectivity Services used with the associated Office 365 Group Team site.

Type: SwitchParameter
Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SuppressMarketplaceAppCheck
Suppress checking compatibility of marketplace SharePoint Add-ins deployed to the associated Office 365 Group
Team site.

Type: SwitchParameter
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SuppressWorkflow2013Check
Suppress checking compatibility of SharePoint 2013 Workflows deployed to the associated Office 365 Group Team
site.

Type: SwitchParameter
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ValidationOnly
This parameter will force the cmdlet to execute only validation.

Type: SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None
Outputs
System.Object

Related Links
Move a SharePoint site to a different geo location
minutes to read • Edit Online

Start-SPOUserAndContentMove
In ths Article

Starts the ability to move a user closer to their sites.

Syntax
Start-SPOUserAndContentMove [-UserPrincipalName] <String> [-DestinationDataLocation] <String>
[[-PreferredMoveBeginDate] <DateTime>] [[-PreferredMoveEndDate] <DateTime>] [-OverwriteOdb]
[[-Notify] <String>] [[-Reserved] <String>] [-ValidationOnly] [<CommonParameters>]

Description
In a multi-geo company, this cmdlet requires a multi-geo tenant to work, and enables the ability to move a user
closer to their sites

Examples
EXAMPLE 1

Start-SPOUserAndContentMove -UserPrincipalName username@contoso.com -DestinationDataLocation EUR

This example moves the user username@contoso.com from the current location, example NA to the European Site
(EUR )
EXAMPLE 2

Start-SPOUserAndContentMove -UserPrincipalName username@contoso.com -DestinationDataLocation EUR

This example moves the user username@contoso.com from the current location, example NA to the European Site
(EUR )
EXAMPLE 3

Start-SPOUserAndContentMove -UserPrincipalName username@contoso.com -DestinationDataLocation EUR

This example moves the user username@contoso.com from the current location, example NA to the European Site
(EUR )

Parameters
-DestinationDataLocation
Defines the new destination of the user that you want to move.
Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Notify
Makes a SPO notification that the user is being move

Type: String
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OverwriteOdb
Switch parameter to Overwrite the information into the DB

Type: SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreferredMoveBeginDate
Specifies what is the preferred Date and time to start the job

Type: DateTime
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreferredMoveEndDate
Specifies what is the preferred Date and time to stop the job

Type: DateTime
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Reserved
This parameter will only check for reserved users to be moved near to their sites
Type: String
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserPrincipalName
UserPrincipalName or UPN defined for the specific user on the SPO tenant

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ValidationOnly
This parameter will force the cmdlet to execute only validation

Type: SwitchParameter
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Start-SPOSiteRename
Start-SPOUserAndContentMove
Stop-SPOUserAndContentMove
Get-SPOUserAndContentMoveState
minutes to read • Edit Online

Stop-SPOSiteContentMove
In ths Article

Stops a job to move a particular user or group of users to be moved across geo locations relative to the one that
executes the command.

Syntax
Stop-SPOSiteContentMove [-SourceSiteUrl] <string> [<CommonParameters>]

Description
Use this cmdlet to .

Examples
Example 1

Stop-SPOSiteContentMove -SourceSiteUrl https://contoso.sharepoint.com/sites/Research

This example stops the move job for the specified site.

Parameters
-SourceSiteUrl
{{ Fill SourceSiteUrl Description }}

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Stop-SPOUserAndContentMove
In ths Article

In a Multi-Geo company, stops the ability to move a user's content related objects in a SharePoint Online Tenant

Syntax
Stop-SPOUserAndContentMove [-UserPrincipalName] <String> [<CommonParameters>]

Description
Stops the ability to move a user's content related objects in a Sharepoint Online Tenant

Examples
EXAMPLE 1

Stop-SPOUserAndContentMove -UserPrincipalName "TesIser@contoso.com"

This example stops the ability to moves the movement of the objects for the "TesIser@contoso.com" in the current
Tenant
EXAMPLE 2

Stop-SPOUserAndContentMove "TesIser@contoso.com"

Equivalent to the one above

Parameters
-UserPrincipalName
UserPrincipalName or UPN defined for the specific user on the SPO tenant

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Introduction to the SharePoint Online management shell
SharePoint Online Management Shell Download
Get-SPOAppErrors
Start-SPOUserAndContentMove
minutes to read • Edit Online

Submit-SPOMigrationJob
In ths Article

Cmdlet to submit a new migration job referenced to a previously uploaded package in Azure Blob storage into to a
site collection.

Syntax
Submit-SPOMigrationJob [-TargetWebUrl] <String> [-FileContainerUri] <String> [-PackageContainerUri] <String>
[-AzureQueueUri <String>] -Credentials <CredentialCmdletPipeBind>
[-EncryptionParameters <EncryptionParameters>] [-NoLogFile] [<CommonParameters>]

Submit-SPOMigrationJob [-TargetWebUrl] <String>


[-MigrationPackageAzureLocations] <MigrationPackageAzureLocations> -Credentials <CredentialCmdletPipeBind>
[-EncryptionParameters <EncryptionParameters>] [-NoLogFile] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets.
This cmdlet returns a GUID value which represents the MigrationJobId, or returns an empty GUID if the job was
not successfully created.

Examples
-----------------------EXAMPLE 1-----------------------------

Submit-SPOMigrationJob -TargetUrl https://contoso.sharepoint.com/sites/TargetSite/TargetWeb -FileContainerUri


"https://migrationstore.blob.core.windows.net/migration-files?sv=2014-02-
14&sr=c&sig=THTTJoeGHysxRLgv22j473XYS2blH1YAVIdsfWrPhq8=&se=2015-04-06T05:09:36Z&sp=rl" -PackageContainerUri
"https://migrationstore.blob.core.windows.net/migration-package?sv=2014-02-
14&sr=c&sig=2PCBJtiXsVWiK5GrY7jBEdyEAwtunQNJLH8uo6I0+Ew=&se=2015-04-06T05:09:37Z&sp=rwl"

This example creates a new migration job in the target site collection for the web at the URL
'https://contoso.sharepoint.com/sites/TargetSite/TargetWeb'. The migration job includes information about the file
and package metadata Azure Storage containers that are passed into the command.
-----------------------EXAMPLE 2-----------------------------

Submit-SPOMigrationJob -TargetUrl https://contoso.sharepoint.com/sites/TargetSite/TargetWeb -


MigrationPackageAzureLocations $azurelocations

This example creates a new migration job in the target site collection for the web at the URL
'https://contoso.sharepoint.com/sites/TargetSite/TargetWeb'. The migration job includes information about the file
and package metadata Azure Storage containers that are passed into the command.

Parameters
-AzureQueueUri
An optional fully qualified URL and SAS token representing the Azure Storage Reporting Queue where import
operations will list events during import.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credentials
Optional credentials of a site collection administrator to use to connect to the site collection. The credentials should
supply the username in UPN format (e.g. user@company.onmicrosoft.com). If this property is not set, the current
tenant admin credentials from the session's previous call to Connect-SPOService will be used to connect to the site
collection.

Type: CredentialCmdletPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EncryptionParameters
PARAMVALUE: EncryptionParameters

Type: EncryptionParameters
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileContainerUri
A fully qualified URL and SAS token representing the Azure Blob Storage container that holds the package content
files.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MigrationPackageAzureLocations
A set of fully qualified URLs and SAS tokens representing the Azure Blob Storage containers that hold the package
content and metadata files and an optional Azure Storage Reporting Queue. This object is returned during
successful processing of the Set-SPOMigrationPackageAzureSource cmdlet.

Type: MigrationPackageAzureLocations
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoLogFile
Indicates to not create a log file. The default is to create a new CreateMigrationJob log file within the current
directory.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PackageContainerUri
A fully qualified URL and SAS token representing the Azure Blob Storage container that holds the package
metadata files.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetWebUrl
The fully qualified target web URL where the package will be imported into. This must include the same
TargetWebURL that was used during ConvertTo-SPOMigrationTargetedPackage .

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Online.SharePoint.Migration.MigrationPackageAzureLocations

Outputs
System.Object
minutes to read • Edit Online

Test-SPOSite
In ths Article

Tests a SharePoint Online site collection.

Syntax
Test-SPOSite -Identity <SpoSitePipeBind> [-RuleId <Guid>] [-RunAlways] [<CommonParameters>]

Description
The Test-SPOSite cmdlet runs one or all site collection health checks on the site collection and its contents. Tests
are intended not to make any changes except in repair mode, which can be initiated by running the Repair-SPOSite
cmdlet. This cmdlet reports the rules together with a summary of the results.
You must be a SharePoint Online global administrator to run the Test-SPOSite cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

Test-SPOSite https://contoso.sharepoint.com/sites/marketing

This example runs all the site collection health checks on the https://contoso.sharepoint.com/sites/marketing site
collection.

Parameters
-Identity
Specifies the SharePoint Online site collection to test.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RuleId
Specifies the health check rule to run.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunAlways
Displays a message that states the effect of the command instead of executing the command.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Get-SPOAppErrors
Get-SPOSite
New -SPOSite
Repair-SPOSite
minutes to read • Edit Online

Unregister-SPOHubSite
In ths Article

Disables the hub site feature on a site.

Syntax
Unregister-SPOHubSite [-Identity] <SpoHubSitePipeBind> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Disables the hub site feature on a site so that it is no longer a hub site. Associated sites may still appear associated
for up to an hour. If you want to speed up the process, use the Remove-SPOHubSiteAssociation cmdlet to remove
the associated sites first.

NOTE
If the site doesn't exist, this cmdlet returns a "File not found" error.

Examples
Example 1

Unregister-SPOHubSite -Identity

This example removes a site from the hub site list based on unique hub identifier ().
Example 2

Unregister-SPOHubSite -Identity https://contoso.sharepoint.com/sites/Marketing

This example disables the hub feature on the marketing site.

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Guid based identifier or URL of the site to disable the hub site feature. If hub site has been already deleted, you will
need to use a Guid based identifier to remove the site from the list of hub sites.

Type: SpoHubSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPODataEncryptionPolicy
In ths Article

Updates customer encryption status for a geo tenant.

Syntax
Update-SPODataEncryptionPolicy [-Identity] <SpoSitePipeBind> [-KeyVaultName] <String> [-KeyName] <String> [-
KeyVersion] <Guid> [-KeyType] <CustomerKeyVaultKeyType> [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Use the Update-DataEncryptionPolicy cmdlet to update customer encryption status for your geo tenant. For more
information, see Controlling your data in Office 365 using Customer Key

Examples
Example 1

Update-SPODataEncryptionPolicy -Identity https://contoso-admin.sharepoint.com -KeyVaultName -KeyName -


KeyVersion -KeyType Primary

This example updates the DEP used with SharePoint Online and OneDrive for Business to start using the new key

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL of the admin site collection.
Type: SpoSitePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeyName
The name of the key

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyType
The type of the key, possible values are
Primary
Secondary

Type: CustomerKeyVaultKeyType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVaultName
The name of the Azure Key Vault Name

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeyVersion
The version of the key

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind

Outputs
System.Object
minutes to read • Edit Online

Update-UserType
In ths Article

Updates the specified user's UserType value from Azure AD.

Syntax
Update-UserType [-LoginName] <String> [<CommonParameters>]

Description
This cmdlet retrieves the UserType value of the specified user and updates the UserType across all SharePoint
Online sites in the Office 365 tenant. This can be used, for example, to convert a Guest user to a standard
(Member) user if the user's UserType was previously updated in Azure AD.

Examples
Example 1

Update-UserType -LoginName jdoe@contoso.com

Updates the jdoe@contoso.com's UserType on all SharePoint Online sites in the tenant based on the UserType
value in Azure AD.

Parameters
-LoginName
The login name of the target user to update across SharePoint Online.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
Related Links
Properties of an Azure Active Directory B2B collaboration user
minutes to read • Edit Online

Upgrade-SPOSite
In ths Article

Starts the upgrade process on a site collection.

Syntax
Upgrade-SPOSite [-Confirm] -Identity <SpoSitePipeBind> [-NoEmail] [-QueueOnly] [-VersionUpgrade] [-WhatIf]
[<CommonParameters>]

Description
The Upgrade-SPOSite cmdlet activates the upgrade process for the specified SharePoint Online site collection. This
cmdlet can also be used to resume failed upgrades.
When upgrade is initiated, it can either be a build-to-build or version-to-version upgrade. The default is build-to-
build upgrade. When in version-to-version upgrade, site collection health checks are first run in repair mode to
ensure that the site collection can be upgraded successfully.
You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Online, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251832 (https://go.microsoft.com/fwlink/p/?
LinkId=251832).

Examples
-----------------------EXAMPLE 1-----------------------------

Upgrade-SPOSite -Identity https://contoso.sharepoint.com/sites/marketing

Example 1 runs a build-to-build upgrade of the existing site collection


https://contoso.sharepoint.com/sites/marketing. The CompatibilityLevel property associated with the site collection
is not changed by this operation. For more information about CompatibilityLevel, see New-SPOSite .
-----------------------EXAMPLE 2-----------------------------

Upgrade-SPOSite -Identity https://contoso.sharepoint.com/sites/marketing -VersionUpgrade

Example 2 runs a version-to-version upgrade of the existing site collection


https://contoso.sharepoint.com/sites/marketing. The CompatibilityLevel property associated with the site collection
is changed to a value of SharePoint 2013 by this operation. For more information about CompatibilityLevel, see
New-SPOSite .

Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SharePoint Online site collection to upgrade.

Type: SpoSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoEmail
Specifies that the system not send the requester and site collection administrators a notification e-mail message at
the end of the upgrade process.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueueOnly
Adds the site collection to the upgrade queue. The upgrade does not occur immediately.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VersionUpgrade
Specifies whether to perform a version-to-version upgrade on the site collection. When this parameter is set, it
internally triggers any available build-to-build upgrade associated with the current site collection operating mode
and continues with version-to-version upgrade. When this parameter is not set, it triggers only build-to-build
upgrade on the site collection.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Getting started with SharePoint Online Management Shell
Request-SPOUpgradeEvaluationSite
New -SPOSite
minutes to read • Edit Online

Verify-SPOTenantOrgRelation
In ths Article

{{ Fill in the Synopsis }}

Syntax
Verify-SPOTenantOrgRelation [-Scenario] <OrgRelationScenario> [-PartnerRole] <OrgRelationRole> [-
PartnerCompanyId] <Guid> [-PartnerInstanceId <Guid>] [<CommonParameters>]

Description
{{ Fill in the Description }}

Examples
Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

Parameters
-PartnerCompanyId
{{ Fill PartnerCompanyId Description }}

Type: Guid
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartnerInstanceId
{{ Fill PartnerInstanceId Description }}

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PartnerRole
{{ Fill PartnerRole Description }}

Type: OrgRelationRole
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scenario
{{ Fill Scenario Description }}

Type: OrgRelationScenario
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
None

Outputs
System.Object
minutes to read • Edit Online

Add-PnPAlert
In ths Article

Adds an alert for a user to a list

Syntax
Add-PnPAlert -List <ListPipeBind>
[-Title <String>]
[-User <UserPipeBind>]
[-DeliveryMethod <AlertDeliveryChannel>]
[-ChangeType <AlertEventType>]
[-Frequency <AlertFrequency>]
[-Filter <AlertFilter>]
[-Time <DateTime>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPAlert -List "Demo List"

Adds a new alert to the "Demo List" for the current user.
------------------EXAMPLE 2------------------

Add-PnPAlert -Title "Daily summary" -List "Demo List" -Frequency Daily -ChangeType All -Time (Get-Date -Hour 11
-Minute 00 -Second 00)

Adds a daily alert for the current user at the given time to the "Demo List". Note: a timezone offset might be
applied so please verify on your tenant that the alert indeed got the right time.
------------------EXAMPLE 3------------------

Add-PnPAlert -Title "Alert for user" -List "Demo List" -User "i:0#.f|membership|Alice@contoso.onmicrosoft.com"

Adds a new alert for user "Alice" to the "Demo List". Note: Only site owners and admins are permitted to set alerts
for other users.

Parameters
-ChangeType
Alert change type
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AlertEventType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DeliveryMethod
Alert delivery method
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AlertDeliveryChannel
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Alert filter
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AlertFilter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Frequency
Alert frequency
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AlertFrequency
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-List
The ID, Title or Url of the list.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Time
Alert time (if frequency is not immediate)
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: DateTime
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
Alert title
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-User
User to create the alert for (User ID, login name or actual User object). Skip this parameter to create an alert for the
current user. Note: Only site owners can create alerts for other users.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: UserPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.AlertCreationInformation

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPApp
In ths Article

Add/uploads an available app to the app catalog

Syntax
Add-PnPApp -Path <String>
[-Scope <AppCatalogScope>]
[-Overwrite [<SwitchParameter>]]
[-Timeout <Int>]
[-Connection <SPOnlineConnection>]

Add-PnPApp -Path <String>


-Publish [<SwitchParameter>]
[-SkipFeatureDeployment [<SwitchParameter>]]
[-Scope <AppCatalogScope>]
[-Overwrite [<SwitchParameter>]]
[-Timeout <Int>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPApp -Path ./myapp.sppkg

This will upload the specified app package to the app catalog
------------------EXAMPLE 2------------------

Add-PnPApp -Path ./myapp.sppkg -Publish

This will upload the specified app package to the app catalog and deploy/trust it at the same time.
------------------EXAMPLE 3------------------

Add-PnPApp -Path ./myapp.sppkg -Scope Site -Publish

This will upload the specified app package to the site collection app catalog and deploy/trust it at the same time.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Overwrites the existing app package if it already exists
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the Id or an actual app metadata instance
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Publish
This will deploy/trust an app into the app catalog
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Defines which app catalog to use. Defaults to Tenant
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppCatalogScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-SkipFeatureDeployment
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Timeout
Specifies the timeout in seconds. Defaults to 200.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
OfficeDevPnP.Core.ALM.AppMetadata

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPApplicationCustomizer
In ths Article

Adds a SharePoint Framework client side extension application customizer

Syntax
Add-PnPApplicationCustomizer -ClientSideComponentId <GuidPipeBind>
[-Title <String>]
[-Description <String>]
[-Sequence <Int>]
[-Scope <CustomActionScope>]
[-ClientSideComponentProperties <String>]
[-ClientSideHostProperties <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Adds a SharePoint Framework client side extension application customizer by registering a user custom action to a
web or sitecollection

Examples
------------------EXAMPLE 1------------------

Add-PnPApplicationCustomizer -Title "CollabFooter" -ClientSideComponentId c0ab3b94-8609-40cf-861e-2a1759170b43


-ClientSideComponentProperties "{`"sourceTermSet`":`"PnP-CollabFooter-
SharedLinks`",`"personalItemsStorageProperty`":`"PnP-CollabFooter-MyLinks`"}

Adds a new application customizer to the current web. This requires that a SharePoint Framework solution has
been deployed containing the application customizer specified in its manifest. Be sure to run Install-PnPApp before
trying this cmdlet on a site.

Parameters
-ClientSideComponentId
The Client Side Component Id of the SharePoint Framework client side extension application customizer found in
the manifest
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClientSideComponentProperties
The Client Side Component Properties of the application customizer. Specify values as a json string : "{Property1 :
'Value1', Property2: 'Value2'}"
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClientSideHostProperties
The Client Side Host Properties of the application customizer. Specify values as a json string : "
{'preAllocatedApplicationCustomizerTopHeight': '50', 'preAllocatedApplicationCustomizerBottomHeight': '50'}"

Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description of the application customizer
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Scope
The scope of the CustomAction to add to. Either Web or Site; defaults to Web. 'All' is not valid for this command.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Sequence
Sequence of this application customizer being injected. Use when you have a specific sequence with which to have
multiple application customizers being added to the page.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the application customizer
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPClientSidePage
In ths Article

Adds a Client-Side Page

Syntax
Add-PnPClientSidePage -Name <String>
[-LayoutType <ClientSidePageLayoutType>]
[-PromoteAs <ClientSidePagePromoteType>]
[-ContentType <ContentTypePipeBind>]
[-CommentsEnabled [<SwitchParameter>]]
[-Publish [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPClientSidePage -Name "NewPage"

Creates a new Client-Side page named 'NewPage'


------------------EXAMPLE 2------------------

Add-PnPClientSidePage -Name "NewPage" -ContentType "MyPageContentType"

Creates a new Client-Side page named 'NewPage' and sets the content type to the content type specified
------------------EXAMPLE 3------------------

Add-PnPClientSidePage -Name "NewPageTemplate" -PromoteAs Template

Creates a new Client-Side page named 'NewPage' and saves as a template to the site.
------------------EXAMPLE 4------------------

Add-PnPClientSidePage -Name "Folder/NewPage"

Creates a new Client-Side page named 'NewPage' under 'Folder' folder and saves as a template to the site.

Parameters
-CommentsEnabled
Enables or Disables the comments on the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specify either the name, ID or an actual content type.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ContentTypePipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LayoutType
Specifies the layout type of the page.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePageLayoutType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the page.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-PromoteAs
Allows to promote the page for a specific purpose (HomePage | NewsPage)
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePromoteType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Publish
Publishes the page once it is saved. Applicable to libraries set to create major and minor versions.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPClientSidePageSection
In ths Article

Adds a new section to a Client-Side page

Syntax
Add-PnPClientSidePageSection -Page <ClientSidePagePipeBind>
-SectionTemplate <CanvasSectionTemplate>
[-Order <Int>]
[-ZoneEmphasis <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPClientSidePageSection -Page "MyPage" -SectionTemplate OneColumn

Adds a new one-column section to the Client-Side page 'MyPage'


------------------EXAMPLE 2------------------

Add-PnPClientSidePageSection -Page "MyPage" -SectionTemplate ThreeColumn -Order 10

Adds a new Three columns section to the Client-Side page 'MyPage' with an order index of 10
------------------EXAMPLE 3------------------

$page = Add-PnPClientSidePage -Name "MyPage"


PS> Add-PnPClientSidePageSection -Page $page -SectionTemplate OneColumn

Adds a new one column section to the Client-Side page 'MyPage'


------------------EXAMPLE 4------------------

$page = Add-PnPClientSidePage -Name "MyPage"


PS> Add-PnPClientSidePageSection -Page $page -SectionTemplate OneColumn -ZoneEmphasis 2

Adds a new one column section to the Client-Side page 'MyPage' and sets the background to 2 (0 is no
background, 3 is highest emphasis)

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Order
Sets the order of the section. (Default = 1)
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Page
The name of the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-SectionTemplate
Specifies the columns template to use for the section.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: CanvasSectionTemplate
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ZoneEmphasis
Sets the background of the section (default = 0)
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPClientSideText
In ths Article

Adds a text element to a client-side page.

Syntax
Add-PnPClientSideText -Page <ClientSidePagePipeBind>
-Text <String>
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPClientSideText -Page <ClientSidePagePipeBind>


-Text <String>
-Section <Int>
-Column <Int>
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Adds a new text element to a section on a client-side page.

Examples
------------------EXAMPLE 1------------------

Add-PnPClientSideText -Page "MyPage" -Text "Hello World!"

Adds the text 'Hello World!' to the Client-Side Page 'MyPage'

Parameters
-Column
Sets the column where to insert the text control.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Order
Sets the order of the text control. (Default = 1)
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Page
The name of the page.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Section
Sets the section where to insert the text control.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Text
Specifies the text to display in the text area.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPClientSideWebPart
In ths Article

Adds a Client-Side Web Part to a client-side page

Syntax
Add-PnPClientSideWebPart -Page <ClientSidePagePipeBind>
-DefaultWebPartType <DefaultClientSideWebParts>
[-WebPartProperties <PropertyBagPipeBind>]
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPClientSideWebPart -Page <ClientSidePagePipeBind>


-Component <ClientSideComponentPipeBind>
[-WebPartProperties <PropertyBagPipeBind>]
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPClientSideWebPart -Page <ClientSidePagePipeBind>


-DefaultWebPartType <DefaultClientSideWebParts>
-Section <Int>
-Column <Int>
[-WebPartProperties <PropertyBagPipeBind>]
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPClientSideWebPart -Page <ClientSidePagePipeBind>


-Component <ClientSideComponentPipeBind>
-Section <Int>
-Column <Int>
[-WebPartProperties <PropertyBagPipeBind>]
[-Order <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Adds a client-side web part to an existing client-side page.

Examples
------------------EXAMPLE 1------------------
Add-PnPClientSideWebPart -Page "MyPage" -DefaultWebPartType BingMap

Adds a built-in Client-Side component 'BingMap' to the page called 'MyPage'


------------------EXAMPLE 2------------------

Add-PnPClientSideWebPart -Page "MyPage" -Component "HelloWorld"

Adds a Client-Side component 'HelloWorld' to the page called 'MyPage'


------------------EXAMPLE 3------------------

Add-PnPClientSideWebPart -Page "MyPage" -Component "HelloWorld" -Section 1 -Column 2

Adds a Client-Side component 'HelloWorld' to the page called 'MyPage' in section 1 and column 2

Parameters
-Column
Sets the column where to insert the web part control.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Component
Specifies the component instance or Id to add.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSideComponentPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-DefaultWebPartType
Defines a default web part type to insert.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: DefaultClientSideWebParts
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Order
Sets the order of the web part control. (Default = 1)
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Page
The name of the page.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Section
Sets the section where to insert the web part control.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebPartProperties
The properties of the web part
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: PropertyBagPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPContentType
In ths Article

Adds a new content type

Syntax
Add-PnPContentType -Name <String>
[-ContentTypeId <String>]
[-Description <String>]
[-Group <String>]
[-ParentContentType <ContentType>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPContentType -Name "Project Document" -Description "Use for Contoso projects" -Group "Contoso Content
Types" -ParentContentType $ct

This will add a new content type based on the parent content type stored in the $ct variable.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentTypeId
If specified, in the format of 0x0100233af432334r434343f32f3, will create a content type with the specific ID

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Description
Specifies the description of the new content type

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Group
Specifies the group of the new content type

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specify the name of the new content type

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ParentContentType
Specifies the parent of the new content type

Type: ContentType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.ContentType
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPContentTypeToDocumentSet
In ths Article

Adds a content type to a document set

Syntax
Add-PnPContentTypeToDocumentSet -ContentType <ContentTypePipeBind[]>
-DocumentSet <DocumentSetPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPContentTypeToDocumentSet -ContentType "Test CT" -DocumentSet "Test Document Set"

This will add the content type called 'Test CT' to the document set called ''Test Document Set'
------------------EXAMPLE 2------------------

$docset = Get-PnPDocumentSetTemplate -Identity "Test Document Set"


$ct = Get-PnPContentType -Identity "Test CT"
Add-PnPContentTypeToDocumentSet -ContentType $ct -DocumentSet $docset

This will add the content type called 'Test CT' to the document set called ''Test Document Set'
------------------EXAMPLE 3------------------

Add-PnPContentTypeToDocumentSet -ContentType 0x0101001F1CEFF1D4126E4CAD10F00B6137E969 -DocumentSet


0x0120D520005DB65D094035A241BAC9AF083F825F3B

This will add the content type called 'Test CT' to the document set called ''Test Document Set'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
The content type object, name or id to add. Either specify name, an id, or a content type object.

Type: ContentTypePipeBind[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DocumentSet
The document set object or id to add the content type to. Either specify a name, a document set template object, an
id, or a content type object

Type: DocumentSetPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPContentTypeToList
In ths Article

Adds a new content type to a list

Syntax
Add-PnPContentTypeToList -List <ListPipeBind>
-ContentType <ContentTypePipeBind>
[-DefaultContentType [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPContentTypeToList -List "Documents" -ContentType "Project Document" -DefaultContentType

This will add an existing content type to a list and sets it as the default content type

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specifies the content type that needs to be added to the list

Type: ContentTypePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultContentType
Specify if the content type needs to be the default content type or not
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
Specifies the list to which the content type needs to be added

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPCustomAction
In ths Article

Adds a custom action

Syntax
Add-PnPCustomAction -Name <String>
-Title <String>
-Location <String>
-ClientSideComponentId <GuidPipeBind>
[-Sequence <Int>]
[-RegistrationId <String>]
[-RegistrationType <UserCustomActionRegistrationType>]
[-Scope <CustomActionScope>]
[-ClientSideComponentProperties <String>]
[-ClientSideHostProperties <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPCustomAction -Name <String>


-Title <String>
-Description <String>
-Group <String>
-Location <String>
[-Sequence <Int>]
[-Url <String>]
[-ImageUrl <String>]
[-CommandUIExtension <String>]
[-RegistrationId <String>]
[-Rights <PermissionKind[]>]
[-RegistrationType <UserCustomActionRegistrationType>]
[-Scope <CustomActionScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Adds a user custom action to a web or sitecollection.

Examples
------------------EXAMPLE 1------------------

$cUIExtn = " "

Add-PnPCustomAction -Name 'GetItemsCount' -Title 'Invoke GetItemsCount Action' -Description 'Adds custom action
to custom list ribbon' -Group 'SiteActions' -Location 'CommandUI.Ribbon' -CommandUIExtension $cUIExtn

Adds a new custom action to the custom list template, and sets the Title, Name and other fields with the specified
values. On click it shows the number of items in that list. Notice: escape quotes in CommandUIExtension.
------------------EXAMPLE 2------------------

Add-PnPCustomAction -Title "CollabFooter" -Name "CollabFooter" -Location


"ClientSideExtension.ApplicationCustomizer" -ClientSideComponentId c0ab3b94-8609-40cf-861e-2a1759170b43 -
ClientSideComponentProperties "{`"sourceTermSet`":`"PnP-CollabFooter-
SharedLinks`",`"personalItemsStorageProperty`":`"PnP-CollabFooter-MyLinks`"}

Adds a new application customizer to the site. This requires that an SPFX solution has been deployed containing
the application customizer specified. Be sure to run Install-PnPApp before trying this cmdlet on a site.

Parameters
-ClientSideComponentId
The Client Side Component Id of the custom action
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClientSideComponentProperties
The Client Side Component Properties of the custom action. Specify values as a json string : "{Property1 : 'Value1',
Property2: 'Value2'}"
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClientSideHostProperties
The Client Side Host Properties of the custom action. Specify values as a json string : "
{'preAllocatedApplicationCustomizerTopHeight': '50', 'preAllocatedApplicationCustomizerBottomHeight': '50'}"

Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CommandUIExtension
XML fragment that determines user interface properties of the custom action
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description of the custom action

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Group
The group where this custom action needs to be added like 'SiteActions'

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ImageUrl
The URL of the image associated with the custom action

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Location
The actual location where this custom action need to be added like 'CommandUI.Ribbon'

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Name
The name of the custom action

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RegistrationId
The identifier of the object associated with the custom action.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RegistrationType
Specifies the type of object associated with the custom action

Type: UserCustomActionRegistrationType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Rights
A string array that contain the permissions needed for the custom action

Type: PermissionKind[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
The scope of the CustomAction to add to. Either Web or Site; defaults to Web. 'All' is not valid for this command.

Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Sequence
Sequence of this CustomAction being injected. Use when you have a specific sequence with which to have multiple
CustomActions being added to the page.
Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the custom action

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The URL, URI or ECMAScript (JScript, JavaScript) function associated with the action

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPDataRowsToProvisioningTemplate
In ths Article

Adds datarows to a list inside a PnP Provisioning Template

Syntax
Add-PnPDataRowsToProvisioningTemplate -Path <String>
-List <ListPipeBind>
[-Query <String>]
[-Fields <String[]>]
[-TokenizeUrls [<SwitchParameter>]]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-IncludeSecurity [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPDataRowsToProvisioningTemplate -Path template.pnp -List 'PnPTestList' -Query '' -Fields 'Title','Choice'

Adds datarows from the provided list to the PnP Provisioning Template at the provided location
------------------EXAMPLE 2------------------

Add-PnPDataRowsToProvisioningTemplate -Path template.pnp -List 'PnPTestList' -Query '' -Fields 'Title','Choice'


-IncludeSecurity

Adds datarows from the provided list to the PnP Provisioning Template at the provided location

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Fields
The fields to retrieve. If not specified all fields will be loaded in the returned list object.
Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeSecurity
A switch to include ObjectSecurity information.

Type: SwitchParameter
Required: False
Position: 5
Accept pipeline input: False
Accept wildcard characters: False

-List
The list to query

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Filename of the .PNP Open XML site template to read from, optionally including full path.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Query
The CAML query to execute against the list. Defaults to all items.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while loading the template.

Type: ITemplateProviderExtension[]
Required: False
Position: 4
Accept pipeline input: False
Accept wildcard characters: False
-TokenizeUrls
If set, this switch will try to tokenize the values with web and site related tokens

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPDocumentSet
In ths Article

Creates a new document set in a library.

Syntax
Add-PnPDocumentSet -List <ListPipeBind>
-Name <String>
-ContentType <ContentTypePipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPDocumentSet -List "Documents" -ContentType "Test Document Set" -Name "Test"

This will add a new document set based upon the 'Test Document Set' content type to a list called 'Documents'. The
document set will be named 'Test'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
The name of the content type, its ID or an actual content object referencing to the document set

Type: ContentTypePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The name of the list, its ID or an actual list object from where the document set needs to be added

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the document set

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.String

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPEventReceiver
In ths Article

Adds a new remote event receiver

Syntax
Add-PnPEventReceiver -Name <String>
-Url <String>
-EventReceiverType <EventReceiverType>
-Synchronization <EventReceiverSynchronization>
[-List <ListPipeBind>]
[-SequenceNumber <Int>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPEventReceiver -List "ProjectList" -Name "TestEventReceiver" -Url


https://yourserver.azurewebsites.net/eventreceiver.svc -EventReceiverType ItemAdded -Synchronization
Asynchronous

This will add a new remote event receiver that is executed after an item has been added to the ProjectList list
------------------EXAMPLE 2------------------

Add-PnPEventReceiver -Name "TestEventReceiver" -Url https://yourserver.azurewebsites.net/eventreceiver.svc -


EventReceiverType WebAdding -Synchronization Synchronous

This will add a new remote event receiver that is executed while a new subsite is being created

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EventReceiverType
The type of the event receiver like ItemAdded, ItemAdding. See https://msdn.microsoft.com/en-
us/library/microsoft.sharepoint.client.eventreceivertype.aspx for the full list of available types.

Type: EventReceiverType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the output file if it exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object or name where the remote event receiver needs to be added. If omitted, the remote event receiver
will be added to the web.

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the remote event receiver

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SequenceNumber
The sequence number where this remote event receiver should be placed

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Synchronization
The synchronization type: Asynchronous or Synchronous
Type: EventReceiverSynchronization
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The URL of the remote event receiver web service

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.EventReceiverDefinition

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPField
In ths Article

Add a field

Syntax
Add-PnPField [-AddToDefaultView [<SwitchParameter>]]
[-Required [<SwitchParameter>]]
[-Group <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPField -List <ListPipeBind>


-Field <FieldPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPField -DisplayName <String>


-InternalName <String>
-Type <FieldType>
[-List <ListPipeBind>]
[-Id <GuidPipeBind>]
[-AddToDefaultView [<SwitchParameter>]]
[-Required [<SwitchParameter>]]
[-Group <String>]
[-ClientSideComponentId <GuidPipeBind>]
[-ClientSideComponentProperties <String>]
[-Choices <String[]>]
[-Formula <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPField -DisplayName <String>


-InternalName <String>
-Type <FieldType>
[-Id <GuidPipeBind>]
[-ClientSideComponentId <GuidPipeBind>]
[-ClientSideComponentProperties <String>]
[-Choices <String[]>]
[-Formula <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Adds a field to a list or as a site column
Examples
------------------EXAMPLE 1------------------

Add-PnPField -Type Calculated -InternalName "C1" -DisplayName "C1" -Formula ="[Title]"

Adds a new calculated site column with the formula specified


------------------EXAMPLE 2------------------

Add-PnPField -List "Demo list" -DisplayName "Location" -InternalName "SPSLocation" -Type Choice -Group "Demo
Group" -AddToDefaultView -Choices "Stockholm","Helsinki","Oslo"

This will add a field of type Choice to the list "Demo List".
------------------EXAMPLE 3------------------

PS:>Add-PnPField -List "Demo list" -DisplayName "Speakers" -InternalName "SPSSpeakers" -Type MultiChoice -Group
"Demo Group" -AddToDefaultView -Choices "Obiwan Kenobi","Darth Vader", "Anakin Skywalker"

This will add a field of type Multiple Choice to the list "Demo List". (you can pick several choices for the same item)

Parameters
-AddToDefaultView
Switch Parameter if this field must be added to the default view

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Choices
Specify choices, only valid if the field type is Choice

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-ClientSideComponentId
The Client Side Component Id to set to the field
Only applicable to: SharePoint Online

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-ClientSideComponentProperties
The Client Side Component Properties to set to the field
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the field

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Field
The name of the field, its ID or an actual field object that needs to be added

Type: FieldPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Formula
Specify the formula. Only available if the field type is Calculated

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Group
The group name to where this field belongs to
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Id
The ID of the field, must be unique

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InternalName
The internal name of the field

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The name of the list, its ID or an actual list object where this field needs to be added

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Required
Switch Parameter if the field is a required field

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Type
The type of the field like Choice, Note, MultiChoice. For a complete list of field types visit
https://docs.microsoft.com/dotnet/api/microsoft.sharepoint.client.fieldtype

Type: FieldType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Field

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPFieldFromXml
In ths Article

Adds a field to a list or as a site column based upon a CAML/XML field definition

Syntax
Add-PnPFieldFromXml -FieldXml <String>
[-List <ListPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

$xml = ''
Add-PnPFieldFromXml -FieldXml $xml

Adds a field with the specified field CAML code to the site.
------------------EXAMPLE 2------------------

$xml = ''
Add-PnPFieldFromXml -List "Demo List" -FieldXml $xml

Adds a field with the specified field CAML code to the list "Demo List".

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FieldXml
CAML snippet containing the field definition. See http://msdn.microsoft.com/en-
us/library/office/ms437580(v=office.15).aspx
Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-List
The name of the list, its ID or an actual list object where this field needs to be added

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Field

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPFieldToContentType
In ths Article

Adds an existing site column to a content type

Syntax
Add-PnPFieldToContentType -Field <FieldPipeBind>
-ContentType <ContentTypePipeBind>
[-Required [<SwitchParameter>]]
[-Hidden [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPFieldToContentType -Field "Project_Name" -ContentType "Project Document"

This will add an existing site column with an internal name of "Project_Name" to a content type called "Project
Document"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specifies which content type a field needs to be added to

Type: ContentTypePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Field
Specifies the field that needs to be added to the content type

Type: FieldPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Hidden
Specifies whether the field should be hidden or not

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Required
Specifies whether the field is required or not

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPFile
In ths Article

Uploads a file to Web

Syntax
Add-PnPFile -Path <String>
-Folder <String>
[-NewFileName <String>]
[-Checkout [<SwitchParameter>]]
[-CheckInComment <String>]
[-Approve [<SwitchParameter>]]
[-ApproveComment <String>]
[-Publish [<SwitchParameter>]]
[-PublishComment <String>]
[-UseWebDav [<SwitchParameter>]]
[-Values <Hashtable>]
[-ContentType <ContentTypePipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPFile -FileName <String>


-Stream <Stream>
-Folder <String>
[-Checkout [<SwitchParameter>]]
[-CheckInComment <String>]
[-Approve [<SwitchParameter>]]
[-ApproveComment <String>]
[-Publish [<SwitchParameter>]]
[-PublishComment <String>]
[-UseWebDav [<SwitchParameter>]]
[-Values <Hashtable>]
[-ContentType <ContentTypePipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPFile -Path c:\temp\company.master -Folder "_catalogs/masterpage"

This will upload the file company.master to the masterpage catalog


------------------EXAMPLE 2------------------

Add-PnPFile -Path .\displaytemplate.html -Folder "_catalogs/masterpage/display templates/test"


This will upload the file displaytemplate.html to the test folder in the display templates folder. If the test folder does
not exist it will create it.
------------------EXAMPLE 3------------------

Add-PnPFile -Path .\sample.doc -Folder "Shared Documents" -Values @{Modified="1/1/2016"}

This will upload the file sample.doc to the Shared Documents folder. After uploading it will set the Modified date to
1/1/2016.
------------------EXAMPLE 4------------------

Add-PnPFile -FileName sample.doc -Folder "Shared Documents" -Stream $fileStream -Values @{Modified="1/1/2016"}

This will add a file sample.doc with the contents of the stream into the Shared Documents folder. After adding it
will set the Modified date to 1/1/2016.
------------------EXAMPLE 5------------------

Add-PnPFile -Path sample.doc -Folder "Shared Documents" -ContentType "Document" -Values @{Modified="1/1/2016"}

This will add a file sample.doc to the Shared Documents folder, with a ContentType of 'Documents'. After adding it
will set the Modified date to 1/1/2016.
------------------EXAMPLE 6------------------

Add-PnPFile -Path sample.docx -Folder "Documents" -Values @{Modified="1/1/2016"; Created="1/1/2017"; Editor=23}

This will add a file sample.docx to the Documents folder and will set the Modified date to 1/1/2016, Created date to
1/1/2017 and the Modified By field to the user with ID 23. To find out about the proper user ID to relate to a
specific user, use Get-PnPUser.
------------------EXAMPLE 7------------------

Add-PnPFile -Path sample.docx -Folder "Documents" -NewFileName "differentname.docx"

This will upload a local file sample.docx to the Documents folder giving it the filename differentname.docx on
SharePoint

Parameters
-Approve
Will auto approve the uploaded file.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ApproveComment
The comment added to the approval.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CheckInComment
The comment added to the checkin.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Checkout
If versioning is enabled, this will check out the file first if it exists, upload the file, then check it in again.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Use to assign a ContentType to the file.

Type: ContentTypePipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FileName
Name for file

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Folder
The destination folder in the site

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NewFileName
Filename to give the file on SharePoint

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
The local file path.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Publish
Will auto publish the file.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PublishComment
The comment added to the publish action.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Stream
Stream with the file contents
Type: Stream
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UseWebDav

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Values
Use the internal names of the fields when specifying field names.
Single line of text: -Values @{"Title" = "Title New"}
Multiple lines of text: -Values @{"MultiText" = "New text\n\nMore text"}
Rich text: -Values @{"MultiText" = "<strong>New</strong> text"}
Choice: -Values @{"Choice" = "Value 1"}
Number: -Values @{"Number" = "10"}
Currency: -Values @{"Number" = "10"}
Currency: -Values @{"Currency" = "10"}
Date and Time: -Values @{"DateAndTime" = "03/10/2015 14:16"}
Lookup (id of lookup value): -Values @{"Lookup" = "2"}
Multi value lookup (id of lookup values as array 1): -Values @{"MultiLookupField" = "1","2"}
Multi value lookup (id of lookup values as array 2): -Values @{"MultiLookupField" = 1,2}
Multi value lookup (id of lookup values as string): -Values @{"MultiLookupField" = "1,2"}
Yes/No: -Values @{"YesNo" = $false}
Person/Group (id of user/group in Site User Info List or email of the user, separate multiple values with a comma):
-Values @{"Person" = "user1@domain.com","21"}
Managed Metadata (single value with path to term): -Values @{"MetadataField" =
"CORPORATE|DEPARTMENTS|FINANCE"}
Managed Metadata (single value with id of term): -Values @{"MetadataField" = "fe40a95b-2144-4fa2-b82a-
0b3d0299d818"} with Id of term
Managed Metadata (multiple values with paths to terms): -Values @{"MetadataField" =
"CORPORATE|DEPARTMENTS|FINANCE","CORPORATE|DEPARTMENTS|HR"}
Managed Metadata (multiple values with ids of terms): -Values @{"MetadataField" = "fe40a95b-2144-4fa2-b82a-
0b3d0299d818","52d88107-c2a8-4bf0-adfa-04bc2305b593"}
Hyperlink or Picture: -Values @{"Hyperlink" = "https://github.com/OfficeDev/, OfficePnp"}
Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.File

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPFileToProvisioningTemplate
In ths Article

Adds a file to a PnP Provisioning Template

Syntax
Add-PnPFileToProvisioningTemplate -Path <String>
-SourceUrl <String>
[-Container <String>]
[-FileLevel <FileLevel>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-FileOverwrite [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPFileToProvisioningTemplate -Path <String>


-Source <String>
-Folder <String>
[-Container <String>]
[-FileLevel <FileLevel>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-FileOverwrite [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPFileToProvisioningTemplate -Path template.pnp -Source $sourceFilePath -Folder $targetFolder

Adds a file to a PnP Site Template


------------------EXAMPLE 2------------------

Add-PnPFileToProvisioningTemplate -Path template.xml -Source $sourceFilePath -Folder $targetFolder

Adds a file reference to a PnP Site XML Template


------------------EXAMPLE 3------------------

Add-PnPFileToProvisioningTemplate -Path template.pnp -Source "./myfile.png" -Folder "folderinsite" -FileLevel


Published -FileOverwrite:$false

Adds a file to a PnP Site Template, specifies the level as Published and defines to not overwrite the file if it exists in
the site.
------------------EXAMPLE 4------------------

Add-PnPFileToProvisioningTemplate -Path template.pnp -Source $sourceFilePath -Folder $targetFolder -Container


$container

Adds a file to a PnP Site Template with a custom container for the file
------------------EXAMPLE 5------------------

Add-PnPFileToProvisioningTemplate -Path template.pnp -SourceUrl "Shared%20Documents/ProjectStatus.docs"

Adds a file to a PnP Provisioning Template retrieved from the currently connected site. The url can be server
relative or web relative. If specifying a server relative url has to start with the current site url.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Container
The target Container for the file to add to the in-memory template, optional argument.

Type: String
Required: False
Position: 3
Accept pipeline input: False
Accept wildcard characters: False

-FileLevel
The level of the files to add. Defaults to Published

Type: FileLevel
Required: False
Position: 4
Accept pipeline input: False
Accept wildcard characters: False

-FileOverwrite
Set to overwrite in site, Defaults to true
Type: SwitchParameter
Required: False
Position: 5
Accept pipeline input: False
Accept wildcard characters: False

-Folder
The target Folder for the file to add to the in-memory template.

Type: String
Required: True
Position: 2
Accept pipeline input: False
Accept wildcard characters: False

-Path
Filename of the .PNP Open XML site template to read from, optionally including full path.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Source
The file to add to the in-memory template, optionally including full path.

Type: String
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-SourceUrl
The file to add to the in-memory template, specifying its url in the current connected Web.

Type: String
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while loading the template.

Type: ITemplateProviderExtension[]
Required: False
Position: 4
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPFolder
In ths Article

Creates a folder within a parent folder

Syntax
Add-PnPFolder -Name <String>
-Folder <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPFolder -Name NewFolder -Folder _catalogs/masterpage

This will create the folder NewFolder in the masterpage catalog

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
The parent folder in the site

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The folder name
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPHtmlPublishingPageLayout
In ths Article

Adds a HTML based publishing page layout

Syntax
Add-PnPHtmlPublishingPageLayout -SourceFilePath <String>
-Title <String>
-Description <String>
-AssociatedContentTypeID <String>
[-DestinationFolderHierarchy <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPHtmlPublishingPageLayout -Title 'Our custom page layout' -SourceFilePath 'customlayout.aspx' -


Description 'A custom page layout' -AssociatedContentTypeID 0x01010901

Uploads the pagelayout 'customlayout.aspx' from the current location to the current site as a 'web part page'
pagelayout

Parameters
-AssociatedContentTypeID
Associated content type ID

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Description
Description for the page layout

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DestinationFolderHierarchy
Folder hierarchy where the HTML page layouts will be deployed

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SourceFilePath
Path to the file which will be uploaded

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
Title for the page layout

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPHubSiteAssociation
In ths Article

Connects a site to a hubsite.

Syntax
Add-PnPHubSiteAssociation -Site <SitePipeBind>
-HubSite <SitePipeBind>
[-Connection <SPOnlineConnection>]

Description
Connects an existing site to a hubsite

Examples
------------------EXAMPLE 1------------------

Add-PnPHubSiteAssociation -Site https://tenant.sharepoint.com/sites/mysite -HubSite


https://tenant.sharepoint.com/sites/hubsite

This example adds the specified site to the hubsite.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HubSite
The hubsite to connect the site to

Type: SitePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Site
The site to connect to the hubsite

Type: SitePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPIndexedProperty
In ths Article

Marks the value of the propertybag key specified to be indexed by search.

Syntax
Add-PnPIndexedProperty -Key <String>
[-List <ListPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key
Key of the property bag value to be indexed

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object or name where to set the indexed property

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPJavaScriptBlock
In ths Article

Adds a link to a JavaScript snippet/block to a web or site collection

Syntax
Add-PnPJavaScriptBlock -Name <String>
-Script <String>
[-Sequence <Int>]
[-Scope <CustomActionScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Specify a scope as 'Site' to add the custom action to all sites in a site collection.

Examples
------------------EXAMPLE 1------------------

Add-PnPJavaScriptBlock -Name myAction -script '


minutes to read • Edit Online

Add-PnPJavaScriptLink
In ths Article

Adds a link to a JavaScript file to a web or sitecollection, valid only for SharePoint classic site experience.

Syntax
Add-PnPJavaScriptLink -Name <String>
-Url <String[]>
[-Sequence <Int>]
[-Scope <CustomActionScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Creates a custom action that refers to a JavaScript file

Examples
------------------EXAMPLE 1------------------

Add-PnPJavaScriptLink -Name jQuery -Url https://code.jquery.com/jquery.min.js -Sequence 9999 -Scope Site

Injects a reference to the latest v1 series jQuery library to all pages within the current site collection under the
name jQuery and at order 9999
------------------EXAMPLE 2------------------

Add-PnPJavaScriptLink -Name jQuery -Url https://code.jquery.com/jquery.min.js

Injects a reference to the latest v1 series jQuery library to all pages within the current web under the name jQuery

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Name
Name under which to register the JavaScriptLink

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Defines if this JavaScript file will be injected to every page within the current site collection or web. All is not
allowed in for this command. Default is web.

Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Sequence
Sequence of this JavaScript being injected. Use when you have a specific sequence with which to have JavaScript
files being added to the page. I.e. jQuery library first and then jQueryUI.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
URL to the JavaScript file to inject

Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPListFoldersToProvisioningTemplate
In ths Article

Adds folders to a list in a PnP Provisioning Template

Syntax
Add-PnPListFoldersToProvisioningTemplate -Path <String>
-List <ListPipeBind>
[-Recursive [<SwitchParameter>]]
[-IncludeSecurity [<SwitchParameter>]]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPListFoldersToProvisioningTemplate -Path template.pnp -List 'PnPTestList'

Adds top level folders from a list to an existing template and returns an in-memory PnP Site Template
------------------EXAMPLE 2------------------

Add-PnPListFoldersToProvisioningTemplate -Path template.pnp -List 'PnPTestList' -Recursive

Adds all folders from a list to an existing template and returns an in-memory PnP Site Template
------------------EXAMPLE 3------------------

Add-PnPListFoldersToProvisioningTemplate -Path template.pnp -List 'PnPTestList' -Recursive -IncludeSecurity

Adds all folders from a list with unique permissions to an in-memory PnP Site Template

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeSecurity
A switch to include ObjectSecurity information.

Type: SwitchParameter
Required: False
Position: 5
Accept pipeline input: False
Accept wildcard characters: False

-List
The list to query

Type: ListPipeBind
Required: True
Position: 2
Accept pipeline input: False
Accept wildcard characters: False

-Path
Filename of the .PNP Open XML site template to read from, optionally including full path.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Recursive
A switch parameter to include all folders in the list, or just top level folders.

Type: SwitchParameter
Required: False
Position: 4
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while loading the template.

Type: ITemplateProviderExtension[]
Required: False
Position: 6
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPListItem
In ths Article

Adds an item to the list and sets the creation time to the current date and time. The author is set to the current
authenticated user executing the cmdlet. In order to set the author to a different user, please refer to Set-
PnPListItem.

Syntax
Add-PnPListItem -List <ListPipeBind>
[-ContentType <ContentTypePipeBind>]
[-Values <Hashtable>]
[-Folder <String>]
[-Label <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPListItem -List "Demo List" -Values @{"Title" = "Test Title"; "Category"="Test Category"}

Adds a new list item to the "Demo List", and sets both the Title and Category fields with the specified values.
Notice, use the internal names of fields.
------------------EXAMPLE 2------------------

Add-PnPListItem -List "Demo List" -ContentType "Company" -Values @{"Title" = "Test Title"; "Category"="Test
Category"}

Adds a new list item to the "Demo List", sets the content type to "Company" and sets both the Title and Category
fields with the specified values. Notice, use the internal names of fields.
------------------EXAMPLE 3------------------

Add-PnPListItem -List "Demo List" -Values @{"MultiUserField"="user1@domain.com","user2@domain.com"}

Adds a new list item to the "Demo List" and sets the user field called MultiUserField to 2 users. Separate multiple
users with a comma.
------------------EXAMPLE 4------------------

Add-PnPListItem -List "Demo List" -Values @{"Title"="Sales Report"} -Folder "projects/europe"

Adds a new list item to the "Demo List". It will add the list item to the europe folder which is located in the projects
folder. Folders will be created if needed.
------------------EXAMPLE 5------------------

Add-PnPListItem -List "Demo List" -Values @{"Title"="Sales Report"} -Label "Public"

Adds a new list item to the "Demo List". Sets the retention label to "Public" if it exists on the site.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specify either the name, ID or an actual content type.

Type: ContentTypePipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
The list relative URL of a folder. E.g. "MyFolder" for a folder located in the root of the list, or "MyFolder/SubFolder"
for a folder located in the MyFolder folder which is located in the root of the list.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Label
The name of the retention label.
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Title or Url of the list.
Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Values
Use the internal names of the fields when specifying field names.
Single line of text: -Values @{"Title" = "Title New"}
Multiple lines of text: -Values @{"MultiText" = "New text\n\nMore text"}
Rich text: -Values @{"MultiText" = "<strong>New</strong> text"}
Choice: -Values @{"Choice" = "Value 1"}
Number: -Values @{"Number" = "10"}
Currency: -Values @{"Number" = "10"}
Currency: -Values @{"Currency" = "10"}
Date and Time: -Values @{"DateAndTime" = "03/13/2015 14:16"}
Lookup (id of lookup value): -Values @{"Lookup" = "2"}
Multi value lookup (id of lookup values as array 1): -Values @{"MultiLookupField" = "1","2"}
Multi value lookup (id of lookup values as array 2): -Values @{"MultiLookupField" = 1,2}
Multi value lookup (id of lookup values as string): -Values @{"MultiLookupField" = "1,2"}
Yes/No: -Values @{"YesNo" = $false}
Person/Group (id of user/group in Site User Info List or email of the user, separate multiple values with a comma):
-Values @{"Person" = "user1@domain.com","21"}
Managed Metadata (single value with path to term): -Values @{"MetadataField" =
"CORPORATE|DEPARTMENTS|FINANCE"}
Managed Metadata (single value with id of term): -Values @{"MetadataField" = "fe40a95b-2144-4fa2-b82a-
0b3d0299d818"} with Id of term
Managed Metadata (multiple values with paths to terms): -Values @{"MetadataField" =
"CORPORATE|DEPARTMENTS|FINANCE","CORPORATE|DEPARTMENTS|HR"}
Managed Metadata (multiple values with ids of terms): -Values @{"MetadataField" = "fe40a95b-2144-4fa2-b82a-
0b3d0299d818","52d88107-c2a8-4bf0-adfa-04bc2305b593"}
Hyperlink or Picture: -Values @{"Hyperlink" = "https://github.com/OfficeDev/, OfficePnp"}

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.ListItem

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPMasterPage
In ths Article

Adds a Masterpage

Syntax
Add-PnPMasterPage -SourceFilePath <String>
-Title <String>
-Description <String>
[-DestinationFolderHierarchy <String>]
[-UIVersion <String>]
[-DefaultCssFile <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPMasterPage -SourceFilePath "page.master" -Title "MasterPage" -Description "MasterPage for Web" -


DestinationFolderHierarchy "SubFolder"

Adds a MasterPage from the local file "page.master" to the folder "SubFolder" in the Masterpage gallery.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultCssFile
Default CSS file for the MasterPage, this Url is SiteRelative

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Description
Description for the Masterpage

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DestinationFolderHierarchy
Folder hierarchy where the MasterPage will be deployed

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SourceFilePath
Path to the file which will be uploaded

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
Title for the Masterpage

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UIVersion
UIVersion of the Masterpage. Default = 15

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.File

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPNavigationNode
In ths Article

Adds an item to a navigation element

Syntax
Add-PnPNavigationNode -Location <NavigationType>
-Title <String>
[-Url <String>]
[-Parent <Int>]
[-First [<SwitchParameter>]]
[-External [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Adds a menu item to either the quicklaunch or top navigation

Examples
------------------EXAMPLE 1------------------

Add-PnPNavigationNode -Title "Contoso" -Url "http://contoso.sharepoint.com/sites/contoso/" -Location


"QuickLaunch"

Adds a navigation node to the quicklaunch. The navigation node will have the title "Contoso" and will link to the url
"http://contoso.sharepoint.com/sites/contoso/"
------------------EXAMPLE 2------------------

Add-PnPNavigationNode -Title "Contoso USA" -Url "http://contoso.sharepoint.com/sites/contoso/usa/" -Location


"QuickLaunch" -Parent 2012

Adds a navigation node to the quicklaunch. The navigation node will have the title "Contoso USA", will link to the
url "http://contoso.sharepoint.com/sites/contoso/usa/" and will have the node with id 2012 as a parent navigation
node.
------------------EXAMPLE 3------------------

Add-PnPNavigationNode -Title "Contoso" -Url "http://contoso.sharepoint.com/sites/contoso/" -Location


"QuickLaunch" -First

Adds a navigation node to the quicklaunch, as the first item. The navigation node will have the title "Contoso" and
will link to the url "http://contoso.sharepoint.com/sites/contoso/"
------------------EXAMPLE 4------------------

Add-PnPNavigationNode -Title "Contoso Pharmaceuticals" -Url


"http://contoso.sharepoint.com/sites/contosopharma/" -Location "QuickLaunch" -External

Adds a navigation node to the quicklaunch. The navigation node will have the title "Contoso Pharmaceuticals" and
will link to the external url "http://contoso.sharepoint.com/sites/contosopharma/"
------------------EXAMPLE 5------------------

Add-PnPNavigationNode -Title "Wiki" -Location "QuickLaunch" -Url "wiki/"

Adds a navigation node to the quicklaunch. The navigation node will have the title "Wiki" and will link to Wiki
library on the selected Web.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-External
Indicates the destination URL is outside of the site collection.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-First
Add the new menu item to beginning of the collection.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the node to add. Either TopNavigationBar, QuickLaunch, SearchNav
Type: NavigationType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Parent
The key of the parent. Leave empty to add to the top level

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the node to add

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The url to navigate to when clicking the new menu item. This can either be absolute or relative to the Web.
Fragments are not supported.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.NavigationNode

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPOffice365GroupToSite
In ths Article

Groupifies a classic team site by creating an Office 365 group for it and connecting the site with the newly created
group

Syntax
Add-PnPOffice365GroupToSite -Url <String>
-Alias <String>
-DisplayName <String>
[-Description <String>]
[-Classification <String>]
[-IsPublic [<SwitchParameter>]]
[-KeepOldHomePage [<SwitchParameter>]]
[-HubSiteId <GuidPipeBind>]
[-Owners <String[]>]
[-Connection <SPOnlineConnection>]

Description
This command allows you to add an Office 365 Unified group to an existing classic site collection.

Examples
------------------EXAMPLE 1------------------

Add-PnPOffice365GroupToSite -Url "https://contoso.sharepoint.com/sites/FinanceTeamsite" -Alias


"FinanceTeamsite" -DisplayName = "My finance team site group"

This will add a group called MyGroup to the current site collection

Parameters
-Alias
Specifies the alias of the group. Cannot contain spaces.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Classification
Specifies the classification of the group.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The optional description of the group.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the group.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HubSiteId
If specified the site will be associated to the hubsite as identified by this id

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IsPublic
Specifies if the group is public. Defaults to false.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-KeepOldHomePage
Specifies if the current site home page is kept. Defaults to false.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owners
The array UPN values of the group's owners.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
Url of the site to be connected to an Office 365 Group.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPOrgAssetsLibrary
In ths Article

Adds a given document library as a organizational asset source

Syntax
Add-PnPOrgAssetsLibrary -LibraryUrl <String>
[-ThumbnailUrl <String>]
[-CdnType <SPOTenantCdnType>]
[-Connection <SPOnlineConnection>]

Description
Adds a given document library as an organizational asset source in your Sharepoint Online Tenant. All
organizational asset sources you add must reside in the same site collection. Document libraries specified as
organizational asset must be enabled as an Office 365 CDN source, either as private or public. It may take some
time before this change will be reflected in the webinterface.

Examples
------------------EXAMPLE 1------------------

Add-PnPOrgAssetsLibrary -LibraryUrl https://yourtenant.sharepoint.com/sites/branding/logos

Adds the document library with the url "logos" located in the sitecollection at
"https://yourtenant.sharepoint.com/sites/branding" as an organizational asset not specifying a thumbnail image for
it and enabling the document library as a public Office 365 CDN source
------------------EXAMPLE 2------------------

Add-PnPOrgAssetsLibrary -LibraryUrl https://yourtenant.sharepoint.com/sites/branding/logos -ThumbnailUrl


https://yourtenant.sharepoint.com/sites/branding/logos/thumbnail.jpg

Adds the document library with the url "logos" located in the sitecollection at
"https://yourtenant.sharepoint.com/sites/branding" as an organizational asset specifying the thumbnail image
"thumbnail.jpg" residing in the same document library for it and enabling the document library as a public Office
365 CDN source
------------------EXAMPLE 3------------------

Add-PnPOrgAssetsLibrary -LibraryUrl https://yourtenant.sharepoint.com/sites/branding/logos -CdnType Private

Adds the document library with the url "logos" located in the sitecollection at
"https://yourtenant.sharepoint.com/sites/branding" as an organizational asset not specifying a thumbnail image for
it and enabling the document library as a private Office 365 CDN source

Parameters
-CdnType
Indicates what type of Office 365 CDN source the document library will be added to

Type: SPOTenantCdnType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LibraryUrl
The full url of the document library to be marked as one of organization's assets sources

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ThumbnailUrl
The full url to an image that should be used as a thumbnail for showing this source. The image must reside in the
same site as the document library you specify.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPOrgNewsSite
In ths Article

Adds the site as an organization news source in your tenant

Syntax
Add-PnPOrgNewsSite -OrgNewsSiteUrl <SitePipeBind>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPOrgNewsSite -OrgNewsSiteUrl https://yourtenant.sharepoint.com/sites/news

Adds the site as one of multiple possible tenant's organizational news sites

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OrgNewsSiteUrl
The url of the site to be marked as one of organization's news sites

Type: SitePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPProvisioningTemplate
In ths Article

Adds a PnP Provisioning Template object to a tenant template

Syntax
Add-PnPProvisioningTemplate -SiteTemplate <ProvisioningTemplate>
-TenantTemplate <ProvisioningHierarchy>

Examples
------------------EXAMPLE 1------------------

Add-PnpProvisioningTemplate -TenantTemplate $tenanttemplate -SiteTemplate $sitetemplate

Adds an existing site template to an existing tenant template object

Parameters
-SiteTemplate
The template to add to the tenant template

Type: ProvisioningTemplate
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TenantTemplate
The tenant template to add the template to

Type: ProvisioningHierarchy
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPPublishingImageRendition
In ths Article

Adds an Image Rendition if the Name of the Image Rendition does not already exist. This prevents creating two
Image Renditions that share the same name.

Syntax
Add-PnPPublishingImageRendition -Name <String>
-Width <Int>
-Height <Int>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPPublishingImageRendition -Name "MyImageRendition" -Width 800 -Height 600

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Height
The height of the Image Rendition.

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The display name of the Image Rendition.
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Width
The width of the Image Rendition.

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPPublishingPage
In ths Article

Adds a publishing page

Syntax
Add-PnPPublishingPage -PageName <String>
-PageTemplateName <String>
[-Title <String>]
[-FolderPath <String>]
[-Publish [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPPublishingPage -PageName 'OurNewPage' -Title 'Our new page' -PageTemplateName 'ArticleLeft'

Creates a new page based on the pagelayout 'ArticleLeft'


------------------EXAMPLE 2------------------

Add-PnPPublishingPage -PageName 'OurNewPage' -Title 'Our new page' -PageTemplateName 'ArticleLeft' -Folder
'/Pages/folder'

Creates a new page based on the pagelayout 'ArticleLeft' with a site relative folder path

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FolderPath
The site relative folder path of the page to be added
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PageName
The name of the page to be added as an aspx file

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PageTemplateName
The name of the page layout you want to use. Specify without the .aspx extension. So 'ArticleLeft' or
'BlankWebPartPage'

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Publish
Publishes the page. Also Approves it if moderation is enabled on the Pages library.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the page

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPPublishingPageLayout
In ths Article

Adds a publishing page layout

Syntax
Add-PnPPublishingPageLayout -SourceFilePath <String>
-Title <String>
-Description <String>
-AssociatedContentTypeID <String>
[-DestinationFolderHierarchy <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPPublishingPageLayout -Title 'Our custom page layout' -SourceFilePath 'customlayout.aspx' -Description 'A
custom page layout' -AssociatedContentTypeID 0x01010901

Uploads the pagelayout 'customlayout.aspx' to the current site as a 'web part page' pagelayout

Parameters
-AssociatedContentTypeID
Associated content type ID

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Description
Description for the page layout

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DestinationFolderHierarchy
Folder hierarchy where the html page layouts will be deployed

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SourceFilePath
Path to the file which will be uploaded

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
Title for the page layout

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPRoleDefinition
In ths Article

Adds a Role Defintion (Permission Level) to the site collection in the current context

Syntax
Add-PnPRoleDefinition -RoleName <String>
[-Clone <RoleDefinitionPipeBind>]
[-Include <PermissionKind[]>]
[-Exclude <PermissionKind[]>]
[-Description <String>]
[-Connection <SPOnlineConnection>]

Description
This command allows adding a custom Role Defintion (Permission Level) to the site collection in the current
context. It does not replace or remove existing Role Definitions.

Examples
------------------EXAMPLE 1------------------

Add-PnPRoleDefinition -RoleName "CustomPerm"

Creates additional permission level with no permission flags enabled.


------------------EXAMPLE 2------------------

Add-PnPRoleDefinition -RoleName "NoDelete" -Clone "Contribute" -Exclude DeleteListItems

Creates additional permission level by cloning "Contribute" and removes flags DeleteListItems
------------------EXAMPLE 3------------------

Add-PnPRoleDefinition -RoleName "AddOnly" -Clone "Contribute" -Exclude DeleteListItems, EditListItems

Creates additional permission level by cloning "Contribute" and removes flags DeleteListItems and EditListItems
------------------EXAMPLE 4------------------

$roleDefinition = Get-PnPRoleDefinition -Identity "Contribute"


Add-PnPRoleDefinition -RoleName "AddOnly" -Clone $roleDefinition -Exclude DeleteListItems, EditListItems

Creates additional permission level by cloning "Contribute" and removes flags DeleteListItems and EditListItems
Parameters
-Clone
An existing permission level or the name of an permission level to clone as base template.

Type: RoleDefinitionPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
Optional description for the new permission level.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Exclude
Specifies permission flags(s) to disable. Please visit https://docs.microsoft.com/previous-
versions/office/sharepoint-csom/ee536458(v%3Doffice.15) for the PermissionKind enum

Type: PermissionKind[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Include
Specifies permission flags(s) to enable. Please visit https://docs.microsoft.com/previous-versions/office/sharepoint-
csom/ee536458(v%3Doffice.15) for the PermissionKind enum

Type: PermissionKind[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RoleName
Name of new permission level.

Type: String
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPSiteClassification
In ths Article

Adds one ore more site classification values to the list of possible values. Requires a connection to the Microsoft
Graph.

Syntax
Add-PnPSiteClassification -Classifications <String>

Examples
------------------EXAMPLE 1------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Add-PnPSiteClassification -Classifications "Top Secret"

Adds the "Top Secret" classification to the already existing classification values.
------------------EXAMPLE 2------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Add-PnPSiteClassification -Classifications "Top Secret","HBI"

Adds the "Top Secret" and the "For Your Eyes Only" classification to the already existing classification values.

Parameters
-Classifications

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPSiteCollectionAdmin
In ths Article

Adds one or more users as site collection administrators to the site collection in the current context

Syntax
Add-PnPSiteCollectionAdmin -Owners <UserPipeBind>
[-Connection <SPOnlineConnection>]

Description
This command allows adding one to many users as site collection administrators to the site collection in the current
context. It does not replace or remove existing site collection administrators.

Examples
------------------EXAMPLE 1------------------

Add-PnPSiteCollectionAdmin -Owners "user@contoso.onmicrosoft.com"

This will add user@contoso.onmicrosoft.com as an additional site collection owner to the site collection in the
current context
------------------EXAMPLE 2------------------

Add-PnPSiteCollectionAdmin -Owners @("user1@contoso.onmicrosoft.com", "user2@contoso.onmicrosoft.com")

This will add user1@contoso.onmicrosoft.com and user2@contoso.onmicrosoft.com as additional site collection


owners to the site collection in the current context
------------------EXAMPLE 3------------------

Get-PnPUser | ? Title -Like "*Doe" | Add-PnPSiteCollectionAdmin

This will add all users with their title ending with "Doe" as additional site collection owners to the site collection in
the current context

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owners
Specifies owner(s) to add as site collection administrators. They will be added as additional site collection
administrators to the site in the current context. Existing administrators will stay. Can be both users and groups.

Type: UserPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPSiteCollectionAppCatalog
In ths Article

Adds a Site Collection scoped App Catalog to a site

Syntax
Add-PnPSiteCollectionAppCatalog -Site <SitePipeBind>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPSiteCollectionAppCatalog -Site "https://contoso.sharepoint.com/sites/FinanceTeamsite"

This will add a SiteCollection app catalog to the specified site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Site
Url of the site to add the app catalog to.

Type: SitePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPSiteDesign
In ths Article

Creates a new Site Design on the current tenant.

Syntax
Add-PnPSiteDesign -Title <String>
-SiteScriptIds <GuidPipeBind[]>
-WebTemplate <SiteWebTemplate>
[-Description <String>]
[-IsDefault [<SwitchParameter>]]
[-PreviewImageAltText <String>]
[-PreviewImageUrl <String>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPSiteDesign -Title "My Company Design" -SiteScriptIds "e84dcb46-3ab9-4456-a136-66fc6ae3d3c5","6def687f-


0e08-4f1e-999c-791f3af9a600" -Description "My description" -WebTemplate TeamSite

Adds a new Site Design, with the specified title and description. When applied it will run the scripts as referenced
by the IDs. Use Get-PnPSiteScript to receive Site Scripts. The WebTemplate parameter specifies that this design
applies to Team Sites.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description of the site design
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IsDefault
Specifies if the site design is a default site design

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PreviewImageAltText
Sets the text for the preview image

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PreviewImageUrl
Sets the url to the preview image

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SiteScriptIds
An array of guids of site scripts

Type: GuidPipeBind[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the site design

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-WebTemplate
Specifies the type of site to which this design applies

Type: SiteWebTemplate
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPSiteDesignTask
In ths Article

This command is used to apply a published site design to a specified site collection target. It schedules the
operation, allowing for the application of larger site scripts (Invoke-PnPSiteDesign is limited to 30 actions and
subactions). This command is intended to replace Invoke-PnPSiteDesign and is useful when you need to apply a
large number of actions or multiple site scripts.

Syntax
Add-PnPSiteDesignTask -SiteDesignId <GuidPipeBind>
[-WebUrl <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPSiteDesignTask -SiteDesignId 501z8c32-4147-44d4-8607-26c2f67cae82

This example applies a site design the currently connected to site. Executing the commands will schedule the site
design to be queued and run against the designated site collection.
------------------EXAMPLE 2------------------

Add-PnPSiteDesignTask -SiteDesignId 501z8c32-4147-44d4-8607-26c2f67cae82 -WebUrl


"https://contoso.sharepoint.com/sites/project"

This example applies a site design to the designated site. Executing the commands will schedule the site design to
be queued and run against the designated site collection.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SiteDesignId
The ID of the site design to apply.

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebUrl
The URL of the site collection where the site design will be applied. If not specified the design will be applied to the
site you connected to with Connect-PnPOnline.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPSiteScript
In ths Article

Creates a new Site Script on the current tenant.

Syntax
Add-PnPSiteScript -Title <String>
-Content <String>
[-Description <String>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPSiteScript -Title "My Site Script" -Description "A more detailed description" -Content $script

Adds a new Site Script, where $script variable contains the script.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Content
A JSON string containing the site script

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description of the site script
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the site script

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPStoredCredential
In ths Article

Adds a credential to the Windows Credential Manager

Syntax
Add-PnPStoredCredential -Name <String>
-Username <String>
[-Password <SecureString>]

Description
Adds an entry to the Windows Credential Manager. If you add an entry in the form of the URL of your
tenant/server PnP PowerShell will check if that entry is available when you connect using Connect-PnPOnline. If it
finds a matching URL it will use the associated credentials.
If you add a Credential with a name of "https://yourtenant.sharepoint.com" it will find a match when you connect to
"https://yourtenant.sharepoint.com" but also when you connect to
"https://yourtenant.sharepoint.com/sites/demo1". Of course you can specify more granular entries, allow you to
automatically provide credentials for different URLs.

Examples
------------------EXAMPLE 1------------------

Add-PnPStoredCredential -Name https://tenant.sharepoint.com -Username yourname@tenant.onmicrosoft.com

You will be prompted to specify the password and a new entry will be added with the specified values
------------------EXAMPLE 2------------------

Add-PnPStoredCredential -Name https://tenant.sharepoint.com -Username yourname@tenant.onmicrosoft.com -Password


(ConvertTo-SecureString -String "YourPassword" -AsPlainText -Force)

A new entry will be added with the specified values


------------------EXAMPLE 3------------------

Add-PnPStoredCredential -Name https://tenant.sharepoint.com -Username yourname@tenant.onmicrosoft.com -Password


(ConvertTo-SecureString -String "YourPassword" -AsPlainText -Force)
Connect-PnPOnline -Url https://tenant.sharepoint.com/sites/mydemosite

A new entry will be added with the specified values, and a subsequent connection to a sitecollection starting with
the entry name will be made. Notice that no password prompt will occur.
Parameters
-Name
The credential to set

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Password
If not specified you will be prompted to enter your password. If you want to specify this value use ConvertTo-
SecureString -String 'YourPassword' -AsPlainText -Force

Type: SecureString
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Username

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPTaxonomyField
In ths Article

Add a taxonomy field

Syntax
Add-PnPTaxonomyField -DisplayName <String>
-InternalName <String>
[-TaxonomyItemId <GuidPipeBind>]
[-List <ListPipeBind>]
[-Group <String>]
[-Id <GuidPipeBind>]
[-AddToDefaultView [<SwitchParameter>]]
[-MultiValue [<SwitchParameter>]]
[-Required [<SwitchParameter>]]
[-FieldOptions <AddFieldOptions>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPTaxonomyField -TermSetPath <String>


-DisplayName <String>
-InternalName <String>
[-TermPathDelimiter <String>]
[-List <ListPipeBind>]
[-Group <String>]
[-Id <GuidPipeBind>]
[-AddToDefaultView [<SwitchParameter>]]
[-MultiValue [<SwitchParameter>]]
[-Required [<SwitchParameter>]]
[-FieldOptions <AddFieldOptions>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Adds a taxonomy/managed metadata field to a list or as a site column.

Examples
------------------EXAMPLE 1------------------

Add-PnPTaxonomyField -DisplayName "Test" -InternalName "Test" -TermSetPath "TestTermGroup|TestTermSet"

Adds a new taxonomy field called "Test" that points to the TestTermSet which is located in the TestTermGroup

Parameters
-AddToDefaultView
Switch Parameter if this field must be added to the default view

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The display name of the field

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FieldOptions
Specifies the control settings while adding a field. See https://msdn.microsoft.com/en-
us/library/microsoft.sharepoint.client.addfieldoptions.aspx for details

Type: AddFieldOptions
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Group
The group name to where this field belongs to

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Id
The ID for the field, must be unique
Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InternalName
The internal name of the field

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object or name where this field needs to be added

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MultiValue
Switch Parameter if this Taxonomy field can hold multiple values

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Required
Switch Parameter if the field is a required field

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TaxonomyItemId
The ID of the Taxonomy item

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-TermPathDelimiter
The path delimiter to be used, by default this is '|'

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermSetPath
The path to the term that this needs to be bound

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Field

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPTeamsTeam
In ths Article

Adds a Teams team to an existing, group connected, site collection

Syntax
Add-PnPTeamsTeam [-Connection <SPOnlineConnection>]

Description
This command allows you to add a Teams team to an existing, Office 365 group connected, site collection.

Examples
------------------EXAMPLE 1------------------

Add-PnPTeamsTeam

This create a teams team for the connected site collection

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPTenantCdnOrigin
In ths Article

Adds a new origin to the public or private content delivery network (CDN ).

Syntax
Add-PnPTenantCdnOrigin -OriginUrl <String>
-CdnType <SPOTenantCdnType>
[-Connection <SPOnlineConnection>]

Description
Add a new origin to the public or private CDN, on either Tenant level or on a single Site level. Effectively, a tenant
admin points out to a document library, or a folder in the document library and requests that content in that library
should be retrievable by using a CDN.
You must be a SharePoint Online global administrator and a site collection administrator to run the cmdlet.

Examples
------------------EXAMPLE 1------------------

Add-PnPTenantCdnOrigin -OriginUrl /sites/site/subfolder -CdnType Public

This example configures a public CDN on site level.

Parameters
-CdnType
Specifies the CDN type. The valid values are: public or private.

Type: SPOTenantCdnType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OriginUrl
Specifies a path to the doc library to be configured. It can be provided in two ways: relative path, or a mask.
Relative-Relative path depends on the OriginScope. If the originScope is Tenant, a path must be a relative path
under the tenant root. If the originScope is Site, a path must be a relative path under the given Site. The path must
point to the valid Document Library or a folder with a document library.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPTenantSequence
In ths Article

Adds a tenant sequence object to a tenant template

Syntax
Add-PnPTenantSequence -Template <ProvisioningHierarchy>
-Sequence <ProvisioningSequence>

Examples
------------------EXAMPLE 1------------------

Add-PnPTenantSequence -Template $mytemplate -Sequence $mysequence

Adds an existing sequence object to an existing template object


------------------EXAMPLE 2------------------

New-PnPTenantSequence -Id "MySequence" | Add-PnPTenantSequence -Template $template

Creates a new instance of a provisioning sequence object and sets the Id to the value specified, then the sequence
is added to an existing template object

Parameters
-Sequence
Optional Id of the sequence

Type: ProvisioningSequence
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Template
The template to add the sequence to
Type: ProvisioningHierarchy
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPTenantSequenceSite
In ths Article

Adds a existing tenant sequence site object to a tenant template

Syntax
Add-PnPTenantSequenceSite -Site <ProvisioningSitePipeBind>
-Sequence <ProvisioningSequence>

Examples
------------------EXAMPLE 1------------------

Add-PnPTenantSequenceSite -Site $myteamsite -Sequence $mysequence

Adds an existing site object to an existing template sequence

Parameters
-Sequence
The sequence to add the site to

Type: ProvisioningSequence
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Site

Type: ProvisioningSitePipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPTenantSequenceSubSite
In ths Article

Adds a tenant sequence sub site object to a tenant sequence site object

Syntax
Add-PnPTenantSequenceSubSite -SubSite <TeamNoGroupSubSite>
-Site <SiteCollection>

Examples
------------------EXAMPLE 1------------------

Add-PnPTenantSequenceSubSite -Site $mysite -SubSite $mysubsite

Adds an existing subsite object to an existing sequence site object

Parameters
-Site
The site to add the subsite to

Type: SiteCollection
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-SubSite
The subsite to add

Type: TeamNoGroupSubSite
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPTenantTheme
In ths Article

Adds or updates a theme to the tenant.

Syntax
Add-PnPTenantTheme -Identity <ThemePipeBind>
-Palette <ThemePalettePipeBind>
-IsInverted <Boolean>
[-Connection <SPOnlineConnection>]

Description
Adds or updates a theme to the tenant.

Examples
------------------EXAMPLE 1------------------

$themepalette = @{
"themePrimary" = "#00ffff";
"themeLighterAlt" = "#f3fcfc";
"themeLighter" = "#daffff";
"themeLight" = "#affefe";
"themeTertiary" = "#76ffff";
"themeSecondary" = "#39ffff";
"themeDarkAlt" = "#00c4c4";
"themeDark" = "#009090";
"themeDarker" = "#005252";
"neutralLighterAlt" = "#f8f8f8";
"neutralLighter" = "#f4f4f4";
"neutralLight" = "#eaeaea";
"neutralQuaternaryAlt" = "#dadada";
"neutralQuaternary" = "#d0d0d0";
"neutralTertiaryAlt" = "#c8c8c8";
"neutralTertiary" = "#a6a6a6";
"neutralSecondaryAlt" = "#767676";
"neutralSecondary" = "#666666";
"neutralPrimary" = "#333";
"neutralPrimaryAlt" = "#3c3c3c";
"neutralDark" = "#212121";
"black" = "#000000";
"white" = "#fff";
"primaryBackground" = "#fff";
"primaryText" = "#333"
}
PS:>Add-PnPTenantTheme -Identity "MyCompanyTheme" -Palette $themepalette -IsInverted $false

This example adds a theme to the current tenant.


Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The name of the theme to add or update

Type: ThemePipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-IsInverted
If the theme is inverted or not

Type: Boolean
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Palette
The palette to add. See examples for more information.

Type: ThemePalettePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPUserToGroup
In ths Article

Adds a user to a group

Syntax
Add-PnPUserToGroup -LoginName <String>
-Identity <GroupPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPUserToGroup -Identity <GroupPipeBind>


-EmailAddress <String>
[-SendEmail [<SwitchParameter>]]
[-EmailBody <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPUserToGroup -LoginName user@company.com -Identity 'Marketing Site Members'

Add the specified user to the group "Marketing Site Members"


------------------EXAMPLE 2------------------

Add-PnPUserToGroup -LoginName user@company.com -Identity 5

Add the specified user to the group with Id 5

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-EmailAddress
The email address of the user
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EmailBody
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The group id, group name or group object to add the user to.

Type: GroupPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-LoginName
The login name of the user

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SendEmail
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPView
In ths Article

Adds a view to a list

Syntax
Add-PnPView -List <ListPipeBind>
-Title <String>
-Fields <String[]>
[-Query <String>]
[-ViewType <ViewType>]
[-RowLimit <UInt32>]
[-Personal [<SwitchParameter>]]
[-SetAsDefault [<SwitchParameter>]]
[-Paged [<SwitchParameter>]]
[-Aggregations <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPView -List "Demo List" -Title "Demo View" -Fields "Title","Address"

Adds a view named "Demo view" to the "Demo List" list.


------------------EXAMPLE 2------------------

Add-PnPView -List "Demo List" -Title "Demo View" -Fields "Title","Address" -Paged

Adds a view named "Demo view" to the "Demo List" list and makes sure there's paging on this view.
------------------EXAMPLE 3------------------

Add-PnPView -List "Demo List" -Title "Demo View" -Fields "Title","Address" -Aggregations ""

Adds a view named "Demo view" to the "Demo List" list and sets the totals (aggregations) to Count on the Title
field.

Parameters
-Aggregations
A valid XML fragment containing one or more Aggregations
Only applicable to: SharePoint Online
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Fields
A list of fields to add.

Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Paged
If specified, the view will have paging.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Personal
If specified, a personal view will be created.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Query
A valid CAML Query.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RowLimit
The row limit for the view. Defaults to 30.

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SetAsDefault
If specified, the view will be set as the default view for the list.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the view.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ViewType
The type of view to add.

Type: ViewType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.View

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPWebhookSubscription
In ths Article

Adds a new Webhook subscription

Syntax
Add-PnPWebhookSubscription -NotificationUrl <String>
[-List <ListPipeBind>]
[-ExpirationDate <DateTime>]
[-ClientState <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPWebhookSubscription -List MyList -NotificationUrl https://my-func.azurewebsites.net/webhook

Add a Webhook subscription for the specified notification Url on the list MyList
------------------EXAMPLE 2------------------

Add-PnPWebhookSubscription -List MyList -NotificationUrl https://my-func.azurewebsites.net/webhook -


ExpirationDate "2017-09-01"

Add a Webhook subscription for the specified notification Url on the list MyList with an expiration date set on
September 1st, 2017
------------------EXAMPLE 3------------------

Add-PnPWebhookSubscription -List MyList -NotificationUrl https://my-func.azurewebsites.net/webhook -


ExpirationDate "2017-09-01" -ClientState "Hello State!"

Add a Webhook subscription for the specified notification Url on the list MyList with an expiration date set on
September 1st, 2017 with a specific client state

Parameters
-ClientState
A client state information that will be passed through notifications
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExpirationDate
The date at which the Webhook subscription will expire. (Default: 6 months from today)

Type: DateTime
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object or name where the Webhook subscription will be added to

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NotificationUrl
The URL of the Webhook endpoint that will be notified of the change

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
OfficeDevPnP.Core.Entities.WebhookSubscription

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPWebPartToWebPartPage
In ths Article

Adds a web part to a web part page in a specified zone

Syntax
Add-PnPWebPartToWebPartPage -Xml <String>
-ServerRelativePageUrl <String>
-ZoneId <String>
-ZoneIndex <Int>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPWebPartToWebPartPage -Path <String>


-ServerRelativePageUrl <String>
-ZoneId <String>
-ZoneIndex <Int>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPWebPartToWebPartPage -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -Path


"c:\myfiles\listview.webpart" -ZoneId "Header" -ZoneIndex 1

This will add the web part as defined by the XML in the listview.webpart file to the specified page in the specified
zone and with the order index of 1
------------------EXAMPLE 2------------------

Add-PnPWebPartToWebPartPage -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -XML $webpart -ZoneId


"Header" -ZoneIndex 1

This will add the web part as defined by the XML in the $webpart variable to the specified page in the specified
zone and with the order index of 1

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
A path to a web part file on a the file system.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl
Server Relative Url of the page to add the web part to.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Xml
A string containing the XML for the web part.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ZoneId
The Zone Id where the web part must be placed
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ZoneIndex
The Zone Index where the web part must be placed

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPWebPartToWikiPage
In ths Article

Adds a web part to a wiki page in a specified table row and column

Syntax
Add-PnPWebPartToWikiPage -Xml <String>
-ServerRelativePageUrl <String>
-Row <Int>
-Column <Int>
[-AddSpace [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPWebPartToWikiPage -Path <String>


-ServerRelativePageUrl <String>
-Row <Int>
-Column <Int>
[-AddSpace [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPWebPartToWikiPage -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -Path


"c:\myfiles\listview.webpart" -Row 1 -Column 1

This will add the web part as defined by the XML in the listview.webpart file to the specified page in the first row
and the first column of the HTML table present on the page
------------------EXAMPLE 2------------------

Add-PnPWebPartToWikiPage -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -XML $webpart -Row 1 -Column


1

This will add the web part as defined by the XML in the $webpart variable to the specified page in the first row and
the first column of the HTML table present on the page

Parameters
-AddSpace
Must there be a extra space between the web part
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Column
Column number where the web part must be placed

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
A path to a web part file on a the file system.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Row
Row number where the web part must be placed

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl
Full server relative url of the web part page, e.g. /sites/demo/sitepages/home.aspx

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Xml
A string containing the XML for the web part.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPWikiPage
In ths Article

Adds a wiki page

Syntax
Add-PnPWikiPage -Content <String>
-ServerRelativePageUrl <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Add-PnPWikiPage -Layout <WikiPageLayout>


-ServerRelativePageUrl <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPWikiPage -PageUrl '/sites/demo1/pages/wikipage.aspx' -Content 'New WikiPage'

Creates a new wiki page '/sites/demo1/pages/wikipage.aspx' and sets the content to 'New WikiPage'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Content

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Layout

Type: WikiPageLayout
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl
The server relative page URL

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPWorkflowDefinition
In ths Article

Adds a workflow definition

Syntax
Add-PnPWorkflowDefinition -Definition <WorkflowDefinition>
[-DoNotPublish [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPWorkflowDefinition -Definition $wfdef

Adds an existing workflow definition, retrieved by Get-PnPWorkflowDefinition, to a site.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Definition
The workflow definition to add.

Type: WorkflowDefinition
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DoNotPublish
Overrides the default behavior, which is to publish workflow definitions.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.Guid
Returns the Id of the workflow definition

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-PnPWorkflowSubscription
In ths Article

Adds a workflow subscription to a list

Syntax
Add-PnPWorkflowSubscription -Name <String>
-DefinitionName <String>
-List <ListPipeBind>
-HistoryListName <String>
-TaskListName <String>
[-StartManually [<SwitchParameter>]]
[-StartOnCreated [<SwitchParameter>]]
[-StartOnChanged [<SwitchParameter>]]
[-AssociationValues <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Add-PnPWorkflowSubscription -Name MyWorkflow -DefinitionName SendMessageWf -list $list

Adds an Workflow with the name 'SendMessageWf' to the list $list.


------------------EXAMPLE 2------------------

$list | Add-PnPWorkflowSubscription -Name MyWorkflow -DefinitionName SendMessageWf

Adds an Workflow with the name "SendMessageWf" to the list $list.


------------------EXAMPLE 3------------------

Get-PnPList -Identity "MyCustomList" | Add-PnPWorkflowSubscription -Name MyWorkflow -DefinitionName


SendMessageWf

Adds an Workflow with the name "SendMessageWf" to the list "MyCustomList".

Parameters
-AssociationValues
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefinitionName
The name of the workflow definition

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HistoryListName
The name of the History list

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list to add the workflow to

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the subscription

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-StartManually
Switch if the workflow should be started manually, default value is 'true'

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StartOnChanged
Should the workflow run when an item is changed

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StartOnCreated
Should the workflow run when an new item is created

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TaskListName
The name of the task list

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Apply-PnPProvisioningTemplate
In ths Article

Applies a site template to a web

Syntax
Apply-PnPProvisioningTemplate [-InputInstance <ProvisioningTemplate>]
[-TemplateId <String>]
[-ResourceFolder <String>]
[-OverwriteSystemPropertyBagValues [<SwitchParameter>]]
[-IgnoreDuplicateDataRowErrors [<SwitchParameter>]]
[-ProvisionContentTypesToSubWebs [<SwitchParameter>]]
[-ProvisionFieldsToSubWebs [<SwitchParameter>]]
[-ClearNavigation [<SwitchParameter>]]
[-Parameters <Hashtable>]
[-Handlers <Handlers>]
[-ExcludeHandlers <Handlers>]
[-ExtensibilityHandlers <ExtensibilityHandler[]>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Apply-PnPProvisioningTemplate -Path <String>


[-TemplateId <String>]
[-ResourceFolder <String>]
[-OverwriteSystemPropertyBagValues [<SwitchParameter>]]
[-IgnoreDuplicateDataRowErrors [<SwitchParameter>]]
[-ProvisionContentTypesToSubWebs [<SwitchParameter>]]
[-ProvisionFieldsToSubWebs [<SwitchParameter>]]
[-ClearNavigation [<SwitchParameter>]]
[-Parameters <Hashtable>]
[-Handlers <Handlers>]
[-ExcludeHandlers <Handlers>]
[-ExtensibilityHandlers <ExtensibilityHandler[]>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Apply-PnPProvisioningTemplate -Path template.xml

Applies a site template in XML format to the current web.


------------------EXAMPLE 2------------------
Apply-PnPProvisioningTemplate -Path template.xml -ResourceFolder c:\provisioning\resources

Applies a site template in XML format to the current web. Any resources like files that are referenced in the
template will be retrieved from the folder as specified with the ResourceFolder parameter.
------------------EXAMPLE 3------------------

Apply-PnPProvisioningTemplate -Path template.xml -Parameters @{"ListTitle"="Projects";"parameter2"="a second


value"}

Applies a site template in XML format to the current web. It will populate the parameter in the template the values
as specified and in the template you can refer to those values with the {parameter:} token.
For instance with the example above, specifying {parameter:ListTitle} in your template will translate to 'Projects'
when applying the template. These tokens can be used in most string values in a template.
------------------EXAMPLE 4------------------

Apply-PnPProvisioningTemplate -Path template.xml -Handlers Lists, SiteSecurity

Applies a site template in XML format to the current web. It will only apply the lists and site security part of the
template.
------------------EXAMPLE 5------------------

Apply-PnPProvisioningTemplate -Path template.pnp

Applies a site template from a pnp package to the current web.


------------------EXAMPLE 6------------------

Apply-PnPProvisioningTemplate -Path https://tenant.sharepoint.com/sites/templatestorage/Documents/template.pnp

Applies a site template from a pnp package stored in a library to the current web.
------------------EXAMPLE 7------------------

$handler1 = New-PnPExtensibilityHandlerObject -Assembly Contoso.Core.Handlers -Type


Contoso.Core.Handlers.MyExtensibilityHandler1
$handler2 = New-PnPExtensibilityHandlerObject -Assembly Contoso.Core.Handlers -Type
Contoso.Core.Handlers.MyExtensibilityHandler2
Apply-PnPProvisioningTemplate -Path NewTemplate.xml -ExtensibilityHandlers $handler1,$handler2

This will create two new ExtensibilityHandler objects that are run while provisioning the template
------------------EXAMPLE 8------------------

Apply-PnPProvisioningTemplate -Path .\ -InputInstance $template

Applies a site template from an in-memory instance of a ProvisioningTemplate type of the PnP Core Component,
reading the supporting files, if any, from the current (.) path. The syntax can be used together with any other
supported parameters.
------------------EXAMPLE 9------------------

Apply-PnPProvisioningTemplate -Path .\template.xml -TemplateId "MyTemplate"

Applies the ProvisioningTemplate with the ID "MyTemplate" located in the template definition file template.xml.

Parameters
-ClearNavigation
Override the RemoveExistingNodes attribute in the Navigation elements of the template. If you specify this value
the navigation nodes will always be removed before adding the nodes in the template

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeHandlers
Allows you to run all handlers, excluding the ones specified.

Type: Handlers
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExtensibilityHandlers
Allows you to specify ExtensbilityHandlers to execute while applying a template

Type: ExtensibilityHandler[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Handlers
Allows you to only process a specific part of the template. Notice that this might fail, as some of the handlers
require other artifacts in place if they are not part of what your applying. Visit
https://docs.microsoft.com/dotnet/api/officedevpnp.core.framework.provisioning.model.handlers for possible
values.
Type: Handlers
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreDuplicateDataRowErrors
Ignore duplicate data row errors when the data row in the template already exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InputInstance
Allows you to provide an in-memory instance of the ProvisioningTemplate type of the PnP Core Component.
When using this parameter, the -Path parameter refers to the path of any supporting file for the template.

Type: ProvisioningTemplate
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OverwriteSystemPropertyBagValues
Specify this parameter if you want to overwrite and/or create properties that are known to be system entries
(starting with vti_, dlc_, etc.)

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Parameters
Allows you to specify parameters that can be referred to in the template by means of the {parameter:<Key>} token.
See examples on how to use this parameter.

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path to the xml or pnp file containing the provisioning template.
Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-ProvisionContentTypesToSubWebs
If set content types will be provisioned if the target web is a subweb.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ProvisionFieldsToSubWebs
If set fields will be provisioned if the target web is a subweb.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ResourceFolder
Root folder where resources/files that are being referenced in the template are located. If not specified the same
folder as where the provisioning template is located will be used.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateId
ID of the template to use from the xml file containing the provisioning template. If not specified and multiple
ProvisioningTemplate elements exist, the last one will be used.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while applying a template.
Type: ITemplateProviderExtension[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Apply-PnPTenantTemplate
In ths Article

Applies a tenant template to the current tenant. You must be a SharePoint Online global administrator to run the
cmdlet.

Syntax
Apply-PnPTenantTemplate -Path <String>
[-SequenceId <String>]
[-ResourceFolder <String>]
[-Handlers <Handlers>]
[-ExcludeHandlers <Handlers>]
[-ExtensibilityHandlers <ExtensibilityHandler[]>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-Parameters <Hashtable>]
[-OverwriteSystemPropertyBagValues [<SwitchParameter>]]
[-IgnoreDuplicateDataRowErrors [<SwitchParameter>]]
[-ProvisionContentTypesToSubWebs [<SwitchParameter>]]
[-ProvisionFieldsToSubWebs [<SwitchParameter>]]
[-ClearNavigation [<SwitchParameter>]]
[-Configuration <ApplyConfigurationPipeBind>]
[-Connection <SPOnlineConnection>]

Apply-PnPTenantTemplate -Template <ProvisioningHierarchy>


[-SequenceId <String>]
[-ResourceFolder <String>]
[-Handlers <Handlers>]
[-ExcludeHandlers <Handlers>]
[-ExtensibilityHandlers <ExtensibilityHandler[]>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-Parameters <Hashtable>]
[-OverwriteSystemPropertyBagValues [<SwitchParameter>]]
[-IgnoreDuplicateDataRowErrors [<SwitchParameter>]]
[-ProvisionContentTypesToSubWebs [<SwitchParameter>]]
[-ProvisionFieldsToSubWebs [<SwitchParameter>]]
[-ClearNavigation [<SwitchParameter>]]
[-Configuration <ApplyConfigurationPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Apply-PnPTenantTemplate -Path myfile.pnp

Will read the tenant template from the filesystem and will apply the sequences in the template
------------------EXAMPLE 2------------------
Apply-PnPTenantTemplate -Path myfile.pnp -SequenceId "mysequence"

Will read the tenant template from the filesystem and will apply the specified sequence in the template
------------------EXAMPLE 3------------------

Apply-PnPTenantTemplate -Path myfile.pnp -Parameters @{"ListTitle"="Projects";"parameter2"="a second value"}

Applies a tenant template to the current tenant. It will populate the parameter in the template the values as
specified and in the template you can refer to those values with the {parameter:} token.
For instance with the example above, specifying {parameter:ListTitle} in your template will translate to 'Projects'
when applying the template. These tokens can be used in most string values in a template.

Parameters
-ClearNavigation
Override the RemoveExistingNodes attribute in the Navigation elements of the template. If you specify this value
the navigation nodes will always be removed before adding the nodes in the template

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Configuration
Specify a JSON configuration file to configure the extraction progress.

Type: ApplyConfigurationPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeHandlers
Allows you to run all handlers, excluding the ones specified.
Type: Handlers
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExtensibilityHandlers
Allows you to specify ExtensbilityHandlers to execute while applying a template

Type: ExtensibilityHandler[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Handlers
Allows you to only process a specific part of the template. Notice that this might fail, as some of the handlers
require other artifacts in place if they are not part of what your applying.

Type: Handlers
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreDuplicateDataRowErrors
Ignore duplicate data row errors when the data row in the template already exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OverwriteSystemPropertyBagValues
Specify this parameter if you want to overwrite and/or create properties that are known to be system entries
(starting with vti_, dlc_, etc.)

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Parameters
Allows you to specify parameters that can be referred to in the tenant template by means of the {parameter:<Key>}
token. See examples on how to use this parameter.
Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path to the xml or pnp file containing the tenant template.

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-ProvisionContentTypesToSubWebs
If set content types will be provisioned if the target web is a subweb.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ProvisionFieldsToSubWebs
If set fields will be provisioned if the target web is a subweb.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ResourceFolder
Root folder where resources/files that are being referenced in the template are located. If not specified the same
folder as where the tenant template is located will be used.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SequenceId

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Template
Type: ProvisioningHierarchy
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while applying a template.

Type: ITemplateProviderExtension[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Approve-PnPTenantServicePrincipalPermissionRequest
In ths Article

Approves a permission request for the current tenant's "SharePoint Online Client" service principal

Syntax
Approve-PnPTenantServicePrincipalPermissionRequest -RequestId <GuidPipeBind>
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
Approves a permission request for the current tenant's "SharePoint Online Client" service principal
The return value of a successful call is a permission grant object.
To get the collection of permission grants for the "SharePoint Online Client" service principal, use the Get-
PnPTenantServicePrincipalPermissionGrants command.
Approving a permission request also removes that request from the list of permission requests.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RequestId
Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Clear-PnPDefaultColumnValues
In ths Article

Clear default column values for a document library

Syntax
Clear-PnPDefaultColumnValues -List <ListPipeBind>
-Field <FieldPipeBind>
[-Folder <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Clear default column values for a document library, per folder, or for the root folder if the folder parameter has not
been specified.

Examples
------------------EXAMPLE 1------------------

Clear-PnPDefaultColumnValues -List Documents -Field MyField

Clears the default value for the field MyField on a library


------------------EXAMPLE 2------------------

Clear-PnPDefaultColumnValues -List Documents -Field MyField -Folder A

Clears the default value for the field MyField on the folder A on a library

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Field
The internal name, id or a reference to a field

Type: FieldPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
A library relative folder path, if not specified it will set the default column values on the root folder of the library
('/')

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Name or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Clear-PnPListItemAsRecord
In ths Article

Undeclares a list item as a record

Syntax
Clear-PnPListItemAsRecord -List <ListPipeBind>
-Identity <ListItemPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Clear-PnPListItemAsRecord -List "Documents" -Identity 4

Undeclares the document in the documents library with id 4 as a record

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the listitem, or actual ListItem object

Type: ListItemPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-List
The ID, Title or Url of the list.
Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Clear-PnPRecycleBinItem
In ths Article

Permanently deletes all or a specific recycle bin item

Syntax
Clear-PnPRecycleBinItem [-All [<SwitchParameter>]]
[-SecondStageOnly [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Clear-PnPRecycleBinItem -Identity <RecycleBinItemPipeBind>


[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPRecycleBinItem | ? FileLeafName -like "*.docx" | Clear-PnpRecycleBinItem

Permanently deletes all the items in the first and second stage recycle bins of which the file names have the .docx
extension
------------------EXAMPLE 2------------------

Clear-PnpRecycleBinItem -Identity 72e4d749-d750-4989-b727-523d6726e442

Permanently deletes the recycle bin item with Id 72e4d749-d750-4989-b727-523d6726e442 from the recycle bin
------------------EXAMPLE 3------------------

Clear-PnpRecycleBinItem -Identity $item -Force

Permanently deletes the recycle bin item stored under variable $item from the recycle bin without asking for
confirmation from the end user first

Parameters
-All
Clears all items
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If provided, no confirmation will be asked to permanently delete the recycle bin item

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Id of the recycle bin item or the recycle bin item itself to permanently delete

Type: RecycleBinItemPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-SecondStageOnly
If provided, only all the items in the second stage recycle bin will be cleared
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Clear-PnPTenantRecycleBinItem
In ths Article

Permanently deletes a site collection from the tenant scoped recycle bin

Syntax
Clear-PnPTenantRecycleBinItem -Url <String>
[-Wait [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
The Clear-PnPTenantRecycleBinItem cmdlet allows a site collection that has been deleted and still exists in the
tenant recycle bin to be permanently deleted from the recycle bin as well.

Examples
------------------EXAMPLE 1------------------

Clear-PnPTenantRecycleBinItem -Url https://tenant.sharepoint.com/sites/contoso

This will permanently delete site collection with the url 'https://tenant.sharepoint.com/sites/contoso' from the
tenant recycle bin
------------------EXAMPLE 2------------------

Clear-PnPTenantRecycleBinItem -Url https://tenant.sharepoint.com/sites/contoso -Wait

This will permanently delete site collection with the url 'https://tenant.sharepoint.com/sites/contoso' from the
tenant recycle bin and will wait with executing further PowerShell commands until the operation has completed

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If provided, no confirmation will be asked to permanently delete the site collection from the tenant recycle bin
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
Url of the site collection to permanently delete from the tenant recycle bin
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Wait
If provided, the PowerShell execution will halt until the operation has completed
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Connect-PnPMicrosoftGraph
In ths Article

Connect to the Microsoft Graph

Syntax
Connect-PnPMicrosoftGraph -Scopes <String[]>

Connect-PnPMicrosoftGraph -AppId <String>


-AppSecret <String>
-AADDomain <String>

Description
Uses the Microsoft Authentication Library (Preview ) to connect to Azure AD and to get an OAuth 2.0 Access Token
to consume the Microsoft Graph API

Examples
------------------EXAMPLE 1------------------

Connect-PnPMicrosoftGraph -Scopes $arrayOfScopes

Connects to Azure AD and gets and OAuth 2.0 Access Token to consume the Microsoft Graph API including the
declared permission scopes. The available permission scopes are defined at the following URL:
https://graph.microsoft.io/en-us/docs/authorization/permission_scopes
------------------EXAMPLE 2------------------

Connect-PnPMicrosoftGraph -AppId '' -AppSecret '' -AADDomain 'contoso.onmicrosoft.com'

Connects to the Microsoft Graph API using application permissions via an app's declared permission scopes. See
https://github.com/SharePoint/PnP -PowerShell/tree/master/Samples/Graph.ConnectUsingAppPermissions for a
sample on how to get started.

Parameters
-AADDomain
The AAD where the O365 app is registered. Eg.: contoso.com, or contoso.onmicrosoft.com.
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AppId
The client id of the app which gives you access to the Microsoft Graph API.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AppSecret
The app key of the app which gives you access to the Microsoft Graph API.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scopes
The array of permission scopes for the Microsoft Graph API.

Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Connect-PnPOnline
In ths Article

Connect to a SharePoint site

Syntax
Connect-PnPOnline -Url <String>
[-ReturnConnection [<SwitchParameter>]]
[-Credentials <CredentialPipeBind>]
[-CurrentCredentials [<SwitchParameter>]]
[-UseAdfs [<SwitchParameter>]]
[-UseAdfsCert [<SwitchParameter>]]
[-Kerberos [<SwitchParameter>]]
[-LoginProviderName <String>]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-AuthenticationMode <ClientAuthenticationMode>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-Scopes <String[]>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -AccessToken <String>


[-ReturnConnection [<SwitchParameter>]]
[-Url <String>]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -Graph [<SwitchParameter>]


[-LaunchBrowser [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -Scopes <String[]>


[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]
Connect-PnPOnline -Url <String>
-UseWebLogin [<SwitchParameter>]
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-Scopes <String[]>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -Url <String>


-SPOManagementShell [<SwitchParameter>]
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-ClearTokenCache [<SwitchParameter>]]
[-Scopes <String[]>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -Url <String>


-PnPO365ManagementShell [<SwitchParameter>]
[-ReturnConnection [<SwitchParameter>]]
[-LaunchBrowser [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -Url <String>


-AppId <String>
-AppSecret <String>
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-Realm <String>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-Scopes <String[]>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]
Connect-PnPOnline -Url <String>
-ClientId <String>
-RedirectUri <String>
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-ClearTokenCache [<SwitchParameter>]]
[-AzureEnvironment <AzureEnvironment>]
[-Scopes <String[]>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -Url <String>


-ClientId <String>
-Tenant <String>
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-CertificatePath <String>]
[-CertificateBase64Encoded <String>]
[-Certificate <X509Certificate2>]
[-CertificatePassword <SecureString>]
[-AzureEnvironment <AzureEnvironment>]
[-Scopes <String[]>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -Url <String>


-ClientId <String>
-Tenant <String>
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-AzureEnvironment <AzureEnvironment>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -AppId <String>


-AppSecret <String>
-AADDomain <String>
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]
Connect-PnPOnline -Url <String>
-ClientId <String>
-HighTrustCertificate <X509Certificate2>
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-HighTrustCertificateIssuerId <String>]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -Url <String>


-ClientId <String>
-Tenant <String>
-Thumbprint <String>
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-AzureEnvironment <AzureEnvironment>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Connect-PnPOnline -Url <String>


-ClientId <String>
-HighTrustCertificatePath <String>
-HighTrustCertificatePassword <String>
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-HighTrustCertificateIssuerId <String>]
[-NoTelemetry [<SwitchParameter>]]
Connect-PnPOnline -Url <String>
-ClientId <String>
-Tenant <String>
-PEMCertificate <String>
-PEMPrivateKey <String>
[-ReturnConnection [<SwitchParameter>]]
[-MinimalHealthScore <Int>]
[-RetryCount <Int>]
[-RetryWait <Int>]
[-RequestTimeout <Int>]
[-CreateDrive [<SwitchParameter>]]
[-DriveName <String>]
[-CertificatePassword <SecureString>]
[-AzureEnvironment <AzureEnvironment>]
[-TenantAdminUrl <String>]
[-SkipTenantAdminCheck [<SwitchParameter>]]
[-IgnoreSslErrors [<SwitchParameter>]]
[-NoTelemetry [<SwitchParameter>]]

Description
If no credentials have been specified, and the CurrentCredentials parameter has not been specified, you will be
prompted for credentials.

Examples
------------------EXAMPLE 1------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com

This will prompt for username and password and creates a context for the other PowerShell commands to use.
When a generic credential is added to the Windows Credential Manager with https://contoso.sharepoint.com,
PowerShell will not prompt for username and password.
------------------EXAMPLE 2------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com -Credentials (Get-Credential)

This will prompt for username and password and creates a context for the other PowerShell commands to use.
------------------EXAMPLE 3------------------

Connect-PnPOnline -Url http://yourlocalserver -CurrentCredentials

This will use the current user credentials and connects to the server specified by the Url parameter.
------------------EXAMPLE 4------------------

Connect-PnPOnline -Url http://yourlocalserver -Credentials 'O365Creds'

This will use credentials from the Windows Credential Manager, as defined by the label 'O365Creds'.
------------------EXAMPLE 5------------------
Connect-PnPOnline -Url http://yourlocalserver -Credentials (Get-Credential) -UseAdfs

This will prompt for username and password and creates a context using ADFS to authenticate.
------------------EXAMPLE 6------------------

Connect-PnPOnline -Url http://yourlocalserver -UseAdfsCert

This will enable you to select a certificate to create a context using ADFS to authenticate.
------------------EXAMPLE 7------------------

Connect-PnPOnline -Url https://yourserver -Credentials (Get-Credential) -CreateDrive


cd SPO:\\
dir

This will prompt you for credentials and creates a context for the other PowerShell commands to use. It will also
create a SPO:\ drive you can use to navigate around the site
------------------EXAMPLE 8------------------

Connect-PnPOnline -Url https://yourserver -Credentials (Get-Credential) -AuthenticationMode FormsAuthentication

This will prompt you for credentials and creates a context for the other PowerShell commands to use. It assumes
your server is configured for Forms Based Authentication (FBA)
------------------EXAMPLE 9------------------

Connect-PnPOnline -Url https://contoso.sharepoint.de -AppId 344b8aab-389c-4e4a-8fa1-4c1ae2c0a60d -AppSecret


a3f3faf33f3awf3a3sfs3f3ss3f4f4a3fawfas3ffsrrffssfd -AzureEnvironment Germany

This will authenticate you to the German Azure environment using the German Azure endpoints for authentication
------------------EXAMPLE 10------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com -SPOManagementShell

This will authenticate you using the SharePoint Online Management Shell application
------------------EXAMPLE 11------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com -PnPO365ManagementShell

This will authenticate you using the PnP O365 Management Shell Multi-Tenant application. A browser window will
have to be opened where you have to enter a code that is shown in your PowerShell window.
------------------EXAMPLE 12------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com -PnPO365ManagementShell -LaunchBrowser

This will authenticate you using the PnP O365 Management Shell Multi-Tenant application. A browser window will
automatically open and the code you need to enter will be automatically copied to your clipboard.
------------------EXAMPLE 13------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com -AccessToken $myaccesstoken

This will authenticate you using the provided access token


------------------EXAMPLE 14------------------

Connect-PnPOnline -Scopes "Mail.Read","Files.Read"

Connects to Azure AD and gets and OAuth 2.0 Access Token to consume the Microsoft Graph API including the
declared permission scopes. The available permission scopes are defined at the following URL:
https://docs.microsoft.com/en-us/graph/permissions-reference
------------------EXAMPLE 15------------------

Connect-PnPOnline -AppId '' -AppSecret '' -AADDomain 'contoso.onmicrosoft.com'

Connects to the Microsoft Graph API using application permissions via an app's declared permission scopes. See
https://github.com/SharePoint/PnP -PowerShell/tree/master/Samples/Graph.ConnectUsingAppPermissions for a
sample on how to get started.
------------------EXAMPLE 16------------------

certutil.exe -csp 'Microsoft Enhanced RSA and AES Cryptographic Provider' -v -p 'password' -importpfx -user
c:\HighTrust.pfx NoRoot
Connect-PnPOnline -Url https://yourserver -ClientId -HighTrustCertificate (Get-Item Cert:\CurrentUser\My\)

Connect to an on-premises SharePoint environment using a high trust certificate, stored in the Personal certificate
store of the current user.
------------------EXAMPLE 17------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com -ClientId '' -Tenant 'contoso.onmicrosoft.com' -


CertificatePath c:\absolute-path\to\pnp.pfx -CertificatePassword

Connects to SharePoint using app-only tokens via an app's declared permission scopes. See
https://github.com/SharePoint/PnP -PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions
for a sample on how to get started.
------------------EXAMPLE 18------------------

Connect-PnPOnline -ClientId -CertificatePath 'c:\mycertificate.pfx' -CertificatePassword (ConvertTo-


SecureString -AsPlainText 'myprivatekeypassword' -Force) -Url https://contoso.sharepoint.com -Tenant
'contoso.onmicrosoft.com'

Connects using an Azure Active Directory registered application using a locally available certificate containing a
private key. See https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread for
a sample on how to get started.
------------------EXAMPLE 19------------------
Connect-PnPOnline -Url https://yourserver -ClientId 763d5e60-b57e-426e-8e87-b7258f7f8188 -
HighTrustCertificatePath c:\HighTrust.pfx -HighTrustCertificatePassword 'password' -
HighTrustCertificateIssuerId 6b9534d8-c2c1-49d6-9f4b-cd415620bca8

Connect to an on-premises SharePoint environment using a high trust certificate stored in a .PFX file.
------------------EXAMPLE 20------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com -ClientId '' -Tenant 'contoso.onmicrosoft.com' -


Thumbprint 34CFAA860E5FB8C44335A38A097C1E41EEA206AA

Connects to SharePoint using app-only tokens via an app's declared permission scopes. See
https://github.com/SharePoint/PnP -PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions
for a sample on how to get started.
------------------EXAMPLE 21------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com -ClientId '' -Tenant 'contoso.onmicrosoft.com' -


PEMCertificate -PEMPrivateKey -CertificatePassword

Connects to SharePoint using app-only tokens via an app's declared permission scopes. See
https://github.com/SharePoint/PnP -PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions
for a sample on how to get started.
------------------EXAMPLE 22------------------

Connect-PnPOnline -ClientId -CertificateBase64Encoded 'xxxx' -CertificatePassword (ConvertTo-SecureString -


AsPlainText 'myprivatekeypassword' -Force) -Url https://contoso.sharepoint.com -Tenant
'contoso.onmicrosoft.com'

Connects using an Azure Active Directory registered application using a certificate containing a private key
encoded in base 64 such as received in an Azure Function when using Azure KeyVault. See
https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread for a sample on
how to get started.
------------------EXAMPLE 23------------------

Connect-PnPOnline -Url https://contoso.sharepoint.com -ClientId '' -Tenant 'contoso.onmicrosoft.com' -


Certificate

Connects to SharePoint using app-only auth in combination with a certificate. See https://docs.microsoft.com/en-
us/sharepoint/dev/solution-guidance/security-apponly-azuread#using-this-principal-in-your-powershell-script-
using-the-pnp-sites-core-library for a sample on how to get started.
------------------EXAMPLE 24------------------

Connect-PnPOnline -ClientId -Certificate $cert -CertificatePassword (ConvertTo-SecureString -AsPlainText


'myprivatekeypassword' -Force) -Url https://contoso.sharepoint.com -Tenant 'contoso.onmicrosoft.com'

Connects using an Azure Active Directory registered application using a certificate instance containing a private
key. See https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread for a
sample on how to get started.
Parameters
-AADDomain
The AAD where the O365 app is registered. Eg.: contoso.com, or contoso.onmicrosoft.com.
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AccessToken
Connect with an existing Access Token
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AppId
The Application Client ID to use.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AppSecret
The Application Client Secret to use.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AuthenticationMode
Specify to use for instance use forms based authentication (FBA)

Type: ClientAuthenticationMode
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AzureEnvironment
The Azure environment to use for authentication, the defaults to 'Production' which is the main Azure
environment.
Only applicable to: SharePoint Online

Type: AzureEnvironment
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Certificate
X509Certificate2 reference containing the private key to authenticate the requests to SharePoint Online
Only applicable to: SharePoint Online

Type: X509Certificate2
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CertificateBase64Encoded
Base64 Encoded X509Certificate2 certificate containing the private key to authenticate the requests to SharePoint
Online such as retrieved in Azure Functions from Azure KeyVault
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CertificatePassword
Password to the certificate (*.pfx)
Only applicable to: SharePoint Online

Type: SecureString
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CertificatePath
Path to the certificate containing the private key (*.pfx)
Only applicable to: SharePoint Online
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClearTokenCache
Clears the token cache.
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClientId
The Client ID of the Azure AD Application

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CreateDrive
If you want to create a PSDrive connected to the URL

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Credentials
Credentials of the user to connect with. Either specify a PSCredential object or a string. In case of a string value a
lookup will be done to the Generic Credentials section of the Windows Credentials in the Windows Credential
Manager for the correct credentials.

Type: CredentialPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CurrentCredentials
If you want to connect with the current user credentials
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DriveName
Name of the PSDrive to create (default: SPO )

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Graph
Log in using the PnP O365 Management Shell application towards the Graph. You will be asked to consent to:
Read and write managed metadata
Have full control of all site collections
Read user profiles
Invite guest users to the organization
Read and write all groups
Read and write directory data
Read and write identity providers
Access the directory as you
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HighTrustCertificate
The certificate which has been registered in SharePoint as a Trusted Security Token issuer to use for the High Trust
connection. Note that CNG key storage providers are not supported.
Only applicable to: SharePoint Server 2019, SharePoint Server 2016, SharePoint Server 2013

Type: X509Certificate2
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HighTrustCertificateIssuerId
The IssuerID under which the certificate has been registered in SharePoint as a Trusted Security Token issuer to
use for the High Trust connection. Uses the ClientID if not specified.
Only applicable to: SharePoint Server 2019, SharePoint Server 2016, SharePoint Server 2013
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HighTrustCertificatePassword
The password of the private key certificate (.pfx) to use for the High Trust connection
Only applicable to: SharePoint Server 2019, SharePoint Server 2016, SharePoint Server 2013

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HighTrustCertificatePath
The path to the private key certificate (.pfx) to use for the High Trust connection
Only applicable to: SharePoint Server 2019, SharePoint Server 2016, SharePoint Server 2013

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IgnoreSslErrors
Ignores any SSL errors. To be used i.e. when connecting to a SharePoint farm using self signed certificates or using
a certificate authority not trusted by this machine.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Kerberos
Authenticate using Kerberos to an on-premises ADFS instance.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LaunchBrowser
Launch a browser automatically and copy the code to enter to the clipboard
Only applicable to: SharePoint Online
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LoginProviderName
The name of the ADFS trusted login provider

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MinimalHealthScore
Specifies a minimal server healthscore before any requests are executed.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NoTelemetry
In order to help to make PnP PowerShell better, we can track anonymous telemetry. We track the version of the
cmdlets you are using, which cmdlet you are executing and which version of SharePoint you are connecting to. Use
Disable-PnPPowerShellTelemetry to turn this off in general or use the -NoTelemetry switch to turn it off for that
session.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PEMCertificate
PEM encoded certificate
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PEMPrivateKey
PEM encoded private key for the certificate
Only applicable to: SharePoint Online
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PnPO365ManagementShell
Log in using the PnP O365 Management Shell application. You will be asked to consent to:
Read and write managed metadata
Have full control of all site collections
Read user profiles
Invite guest users to the organization
Read and write all groups
Read and write directory data
Read and write identity providers
Access the directory as you
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Realm
Authentication realm. If not specified will be resolved from the url specified.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RedirectUri
The Redirect URI of the Azure AD Application
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RequestTimeout
The request timeout. Default is 1800000
Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RetryCount
Defines how often a retry should be executed if the server healthscore is not sufficient. Default is 10 times.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RetryWait
Defines how many seconds to wait before each retry. Default is 1 second.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ReturnConnection
Returns the connection for use with the -Connection parameter on cmdlets.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Scopes
The array of permission scopes for the Microsoft Graph API.
Only applicable to: SharePoint Online

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SkipTenantAdminCheck
Should we skip the check if this site is the Tenant admin site. Default is false
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SPOManagementShell
Log in using the SharePoint Online Management Shell application
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
The Azure AD Tenant name,e.g. mycompany.onmicrosoft.com
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TenantAdminUrl
The url to the Tenant Admin site. If not specified, the cmdlets will assume to connect automatically to
https://<tenantname>-admin.sharepoint.com where appropriate.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Thumbprint
Certificate thumbprint
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The Url of the site collection to connect to.
Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-UseAdfs
If you want to connect to your on-premises SharePoint farm using ADFS

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UseAdfsCert
If you want to connect to your SharePoint farm using ADFS with Certificate Authentication

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UseWebLogin
If you want to connect to SharePoint with browser based login. This is required when you have multi-factor
authentication (MFA) enabled.

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Convert-PnPFolderToProvisioningTemplate
In ths Article

Creates a pnp package file of an existing template xml, and includes all files in the current folder

Syntax
Convert-PnPFolderToProvisioningTemplate -Out <String>
[-Force [<SwitchParameter>]]
[-Folder <String>]

Examples
------------------EXAMPLE 1------------------

Convert-PnPFolderToProvisioningTemplate -Out template.pnp

Creates a pnp package file of an existing template xml, and includes all files in the current folder
------------------EXAMPLE 2------------------

Convert-PnPFolderToProvisioningTemplate -Out template.pnp -Folder c:\temp

Creates a pnp package file of an existing template xml, and includes all files in the c:\temp folder

Parameters
-Folder
Folder to process. If not specified the current folder will be used.

Type: String
Required: False
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the output file if it exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Out
Filename to write to, optionally including full path.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Convert-PnPProvisioningTemplate
In ths Article

Converts a provisioning template to an other schema version

Syntax
Convert-PnPProvisioningTemplate -Path <String>
[-Out <String>]
[-Encoding <Encoding>]
[-Force [<SwitchParameter>]]
[-ToSchema <XMLPnPSchemaVersion>]

Examples
------------------EXAMPLE 1------------------

Convert-PnPProvisioningTemplate -Path template.xml

Converts a provisioning template to the latest schema and outputs the result to current console.
------------------EXAMPLE 2------------------

Convert-PnPProvisioningTemplate -Path template.xml -Out newtemplate.xml

Converts a provisioning template to the latest schema and outputs the result the newtemplate.xml file.
------------------EXAMPLE 3------------------

Convert-PnPProvisioningTemplate -Path template.xml -Out newtemplate.xml -ToSchema V201512

Converts a provisioning template to the latest schema using the 201512 schema and outputs the result the
newtemplate.xml file.

Parameters
-Encoding
The encoding type of the XML file, Unicode is default

Type: Encoding
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Force
Overwrites the output file if it exists

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Out
Filename to write to, optionally including full path

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path to the xml file containing the site template

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-ToSchema
The schema of the output to use, defaults to the latest schema

Type: XMLPnPSchemaVersion
Required: False
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

ConvertTo-PnPClientSidePage
In ths Article

Converts a classic page (wiki or web part page) into a Client-Side Page

Syntax
ConvertTo-PnPClientSidePage -Identity <PagePipeBind>
[-Library <String>]
[-Folder <String>]
[-WebPartMappingFile <String>]
[-Overwrite [<SwitchParameter>]]
[-TakeSourcePageName [<SwitchParameter>]]
[-ReplaceHomePageWithDefault [<SwitchParameter>]]
[-AddPageAcceptBanner [<SwitchParameter>]]
[-SkipItemLevelPermissionCopyToClientSidePage [<SwitchParameter>]]
[-SkipUrlRewriting [<SwitchParameter>]]
[-SkipDefaultUrlRewriting [<SwitchParameter>]]
[-UrlMappingFile <String>]
[-ClearCache [<SwitchParameter>]]
[-CopyPageMetadata [<SwitchParameter>]]
[-AddTableListImageAsImageWebPart [<SwitchParameter>]]
[-UseCommunityScriptEditor [<SwitchParameter>]]
[-SummaryLinksToHtml [<SwitchParameter>]]
[-TargetWebUrl <String>]
[-LogType <ClientSidePageTransformatorLogType>]
[-LogFolder <String>]
[-LogSkipFlush [<SwitchParameter>]]
[-LogVerbose [<SwitchParameter>]]
[-DontPublish [<SwitchParameter>]]
[-KeepPageCreationModificationInformation [<SwitchParameter>]]
[-SetAuthorInPageHeader [<SwitchParameter>]]
[-PostAsNews [<SwitchParameter>]]
[-DisablePageComments [<SwitchParameter>]]
[-PublishingPage [<SwitchParameter>]]
[-BlogPage [<SwitchParameter>]]
[-DelveBlogPage [<SwitchParameter>]]
[-DelveKeepSubTitle [<SwitchParameter>]]
[-PageLayoutMapping <String>]
[-PublishingTargetPageName <String>]
[-TargetPageName <String>]
[-TargetPageFolder <String>]
[-TargetPageFolderOverridesDefaultFolder [<SwitchParameter>]]
[-TargetConnection <SPOnlineConnection>]
[-SkipUserMapping [<SwitchParameter>]]
[-UserMappingFile <String>]
[-LDAPConnectionString <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------
ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -Overwrite

Converts a wiki/web part page named 'somepage' to a client side page


------------------EXAMPLE 2------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -Overwrite -WebPartMappingFile


c:\contoso\webpartmapping.xml

Converts a wiki/web part page named 'somepage' to a client side page using a custom provided mapping file
------------------EXAMPLE 3------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -Overwrite -AddPageAcceptBanner

Converts a wiki/web part page named 'somepage' to a client side page and adds the page accept banner web part
on top of the page. This requires that the SPFX solution holding the web part (https://github.com/SharePoint/sp-
dev-modernization/blob/master/Solutions/PageTransformationUI/assets/sharepointpnp-pagetransformation-
client.sppkg?raw=true) has been installed to the tenant app catalog
------------------EXAMPLE 4------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -Overwrite -CopyPageMetadata

Converts a wiki/web part page named 'somepage' to a client side page, including the copying of the page metadata
(if any)
------------------EXAMPLE 5------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -PublishingPage -Overwrite -TargetWebUrl


https://contoso.sharepoint.com/sites/targetmodernsite

Converts a publishing page named 'somepage' to a client side page in the


https://contoso.sharepoint.com/sites/targetmodernsite site
------------------EXAMPLE 6------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -PublishingPage -Overwrite -TargetConnection $target

Converts a publishing page named 'somepage' to a client side page in the site specified by the TargetConnection
connection. This allows to read a page in one environment (on-premises, tenant A) and create in another online
location (tenant B )
------------------EXAMPLE 7------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -Library "SiteAssets" -Folder "Folder1" -Overwrite

Converts a web part page named 'somepage' living inside the SiteAssets library in a folder named folder1 into a
client side page
------------------EXAMPLE 8------------------
ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -Folder "" -Overwrite

Converts a web part page named 'somepage' living inside the root of the site collection (so outside of a library)
------------------EXAMPLE 9------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -Overwrite -TargetWebUrl


https://contoso.sharepoint.com/sites/targetmodernsite

Converts a wiki/web part page named 'somepage' to a client side page in the
https://contoso.sharepoint.com/sites/targetmodernsite site
------------------EXAMPLE 10------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -LogType File -LogFolder c:\temp -LogVerbose -Overwrite

Converts a wiki/web part page named 'somepage' and creates a log file in c:\temp using verbose logging
------------------EXAMPLE 11------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -LogType SharePoint -LogSkipFlush

Converts a wiki/web part page named 'somepage' and creates a log file in SharePoint but skip the actual write. Use
this option to make multiple ConvertTo-PnPClientSidePage invocations create a single log
------------------EXAMPLE 12------------------

ConvertTo-PnPClientSidePage -Identity "My post title" -BlogPage -LogType Console -Overwrite -TargetWebUrl
https://contoso.sharepoint.com/sites/targetmodernsite

Converts a blog page with a title starting with 'my post title' to a client side page in the
https://contoso.sharepoint.com/sites/targetmodernsite site
------------------EXAMPLE 13------------------

ConvertTo-PnPClientSidePage -Identity "My post title" -DelveBlogPage -LogType Console -Overwrite -TargetWebUrl
https://contoso.sharepoint.com/sites/targetmodernsite

Converts a Delve blog page with a title starting with 'my post title' to a client side page in the
https://contoso.sharepoint.com/sites/targetmodernsite site
------------------EXAMPLE 14------------------

ConvertTo-PnPClientSidePage -Identity "somepage.aspx" -PublishingPage -Overwrite -TargetConnection $target -


UserMappingFile c:\\temp\user_mapping_file.csv

Converts a publishing page named 'somepage' to a client side page in the site specified by the TargetConnection
connection. This allows to read a page in on-premises environment and create in another online locations including
using specific user mappings between the two environments.

Parameters
-AddPageAcceptBanner
Adds the page accept banner web part. The actual web part is specified in webpartmapping.xml file

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AddTableListImageAsImageWebPart
When an image lives inside a table/list then it's also created as separate image web part underneath that table/list
by default. Use this switch set to $false to change that

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-BlogPage
I'm transforming a blog page

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClearCache
Clears the cache. Can be needed if you've installed a new web part to the site and want to use that in a custom
webpartmapping file. Restarting your PS session has the same effect

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CopyPageMetadata
Copies the page metadata to the created modern page
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DelveBlogPage
I'm transforming a Delve blog page

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DelveKeepSubTitle
Transform the possible sub title as topic header on the modern page

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisablePageComments
Disable comments for the created modern page

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DontPublish
Don't publish the created modern page

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
The folder to load the provided page from. If not provided all folders are searched

Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False
-Identity
The name of the page to convert

Type: PagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-KeepPageCreationModificationInformation
Keep the author, editor, created and modified information from the source page (when source page lives in SPO )

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LDAPConnectionString
Specifies a LDAP connection string e.g. LDAP://OU=Users,DC=Contoso,DC=local

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Library
The name of the library containing the page. If SitePages then please omit this parameter

Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-LogFolder
Folder in where the log file will be created (if LogType==File)

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LogSkipFlush
By default each cmdlet invocation will result in a log file, use the -SkipLogFlush to delay the log flushing. The first
call without -SkipLogFlush will then write all log entries to a single log
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LogType
Allows to generate a transformation log (File | SharePoint)

Type: ClientSidePageTransformatorLogType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LogVerbose
Configure logging to include verbose log entries

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Overwrites page if already existing

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PageLayoutMapping
Path and name of the page layout mapping file driving the publishing page transformation

Type: String
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-PostAsNews
Post the created, and published, modern page as news

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-PublishingPage
I'm transforming a publishing page

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PublishingTargetPageName
Name for the target page (only applies to publishing page transformation)

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ReplaceHomePageWithDefault
Replaces a home page with a default stock modern home page

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SetAuthorInPageHeader
Set's the author of the source page as author in the modern page header (when source page lives in SPO )

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SkipDefaultUrlRewriting
Set this flag to prevent the default URL rewriting while you still want to do URL rewriting using a custom URL
mapping file

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SkipItemLevelPermissionCopyToClientSidePage
By default the item level permissions on a page are copied to the created client side page. Use this switch to
prevent the copy
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SkipUrlRewriting
If transforming cross site then by default urls in html and summarylinks are rewritten for the target site. Set this
flag to prevent that

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SkipUserMapping
Disables user mapping during transformation

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SummaryLinksToHtml
By default summarylinks web parts are replaced by QuickLinks, but you can transform to plain html by setting this
switch

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TakeSourcePageName
Created client side page takes name from previous classic page. Classic page gets renamed to
previous_<Page>.aspx

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TargetConnection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TargetPageFolder
Folder to create the target page in (will be used in conjunction with auto-generated folders that ensure page name
uniqueness)

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TargetPageFolderOverridesDefaultFolder
When setting a target page folder then the target page folder overrides possibly default folder path (e.g. in the
source page lived in a folder) instead of being appended to it

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TargetPageName
Name for the target page (only applies when doing cross site page transformation)

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TargetWebUrl
Url of the target web that will receive the modern page. Defaults to null which means in-place transformation

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UrlMappingFile
File holding custom URL mapping definitions
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UseCommunityScriptEditor
Uses the community script editor (https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-
script-editor) as replacement for the classic script editor web part

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UserMappingFile
Specifies a user mapping file

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebPartMappingFile
Path and name of the web part mapping file driving the transformation

Type: String
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Copy-PnPFile
In ths Article

Copies a file or folder to a different location, currently there is a 200MB file size limit for the file to be copied.

Syntax
Copy-PnPFile -SourceUrl <String>
-TargetUrl <String>
[-OverwriteIfAlreadyExists [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-SkipSourceFolderName [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl /sites/otherproject/Documents/company.docx

Copies a file named company.docx located in a document library called Documents in the current site to the site
collection otherproject. If a file named company.docx already exists, it won't perform the copy.
------------------EXAMPLE 2------------------

PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl Documents/company2.docx

Copies a file named company.docx located in a document library called Documents to a new document named
company2.docx in the same library.
------------------EXAMPLE 3------------------

PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl Documents2/company.docx

Copies a file named company.docx located in a document library called Documents to a document library called
Documents2 in the same site.
------------------EXAMPLE 4------------------

PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl Subsite/Documents/company2.docx

Copies a file named company.docx located in a document library called Documents to the document library named
Document in a subsite named Subsite as a new document named company2.docx.
------------------EXAMPLE 5------------------
PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl Subsite/Documents

Copies a file named company.docx located in a document library called Documents to the document library named
Document in a subsite named Subsite keeping the file name.
------------------EXAMPLE 6------------------

PS:>Copy-PnPFile -SourceUrl Documents/company.docx -TargetUrl /sites/otherproject/Documents/company.docx -


OverwriteIfAlreadyExists

Copies a file named company.docx located in a document library called Documents in the current site to the site
collection otherproject. If a file named company.docx already exists, it will still perform the copy and replace the
original company.docx file.
------------------EXAMPLE 7------------------

PS:>Copy-PnPFile -SourceUrl Documents/MyDocs -TargetUrl /sites/otherproject/Documents -OverwriteIfAlreadyExists

Copies a folder named MyDocs in the document library called Documents located in the current site to the site
collection otherproject. If the MyDocs folder exist it will copy into it, if not it will be created.
------------------EXAMPLE 8------------------

PS:>Copy-PnPFile -SourceUrl Documents/MyDocs -TargetUrl /sites/otherproject/Documents -SkipSourceFolderName -


OverwriteIfAlreadyExists

Copies a folder named MyDocs in the document library called Documents located in the current site to the root
folder of the library named Documents in the site collection otherproject.
------------------EXAMPLE 9------------------

PS:>Copy-PnPFile -SourceUrl Documents/MyDocs -TargetUrl /sites/otherproject/Documents/MyDocs -


SkipSourceFolderName -OverwriteIfAlreadyExists

Copies a folder named MyDocs in the MyDocs folder of the library named Documents. If the MyDocs folder does
not exists, it will be created.
------------------EXAMPLE 10------------------

PS:>Copy-PnPFile -SourceUrl Documents/MyDocs -TargetUrl /sites/otherproject/Documents/MyDocs -


OverwriteIfAlreadyExists

Copies a folder named MyDocs in the root of the library named Documents. If the MyDocs folder exists in the
target, a subfolder also named MyDocs is created.
------------------EXAMPLE 11------------------

PS:>Copy-PnPFile -SourceUrl SubSite1/Documents/company.docx -TargetUrl SubSite2/Documents

Copies a file named company.docx in the library named Documents in SubSite1 to the library named Documents
in SubSite2.
Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If provided, no confirmation will be requested and the action will be performed

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OverwriteIfAlreadyExists
If provided, if a file already exists at the TargetUrl, it will be overwritten. If omitted, the copy operation will be
canceled if the file already exists at the TargetUrl location.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SkipSourceFolderName
If the source is a folder, the source folder name will not be created, only the contents within it.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SourceUrl
Site relative Url specifying the file or folder to copy.

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-TargetUrl
Server relative Url where to copy the file or folder to.
Type: String
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Copy-PnPItemProxy
In ths Article

Proxy cmdlet for using Copy-Item between SharePoint provider and FileSystem provider

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Deny-PnPTenantServicePrincipalPermissionRequest
In ths Article

Denies a permission request for the current tenant's "SharePoint Online Client" service principal

Syntax
Deny-PnPTenantServicePrincipalPermissionRequest -RequestId <GuidPipeBind>
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
Denies a permission request for the current tenant's "SharePoint Online Client" service principal
Denying a permission request removes that request from the list of permission requests.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RequestId

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Disable-PnPFeature
In ths Article

Disables a feature

Syntax
Disable-PnPFeature -Identity <GuidPipeBind>
[-Force [<SwitchParameter>]]
[-Scope <FeatureScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Deactivates a feature that was active on a site

Examples
------------------EXAMPLE 1------------------

Disable-PnPFeature -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will disable the feature with the id "99a00f6e-fb81-4dc7-8eac-e09c6f9132fe"


------------------EXAMPLE 2------------------

Disable-PnPFeature -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Force

This will disable the feature with the id "99a00f6e-fb81-4dc7-8eac-e09c6f9132fe" with force.
------------------EXAMPLE 3------------------

Disable-PnPFeature -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Web

This will disable the feature with the id "99a00f6e-fb81-4dc7-8eac-e09c6f9132fe" with the web scope.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifies whether to continue if an error occurs when deactivating the feature.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The id of the feature to disable.

Type: GuidPipeBind
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Specify the scope of the feature to deactivate, either Web or Site. Defaults to Web.

Type: FeatureScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Disable-PnPInPlaceRecordsManagementForSite
In ths Article

Disables in place records management for a site.

Syntax
Disable-PnPInPlaceRecordsManagementForSite [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Disable-PnPInPlaceRecordsManagementForSite

The in place records management feature will be disabled

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Disable-PnPPowerShellTelemetry
In ths Article

Disables PnP PowerShell telemetry tracking

Syntax
Disable-PnPPowerShellTelemetry [-Force [<SwitchParameter>]]

Description
Disables PnP PowerShell telemetry tracking

Examples
------------------EXAMPLE 1------------------

Disable-PnPPowerShellTelemetry

Will prompt you to confirm to disable telemetry tracking.


------------------EXAMPLE 2------------------

Disable-PnPPowerShellTelemetry -Force

Will disable telemetry tracking without prompting.

Parameters
-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Disable-PnPResponsiveUI
In ths Article

Deactivate the PnP Response UI add-on

Syntax
Disable-PnPResponsiveUI [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Disables the PnP Responsive UI implementation on a classic SharePoint Site

Examples
------------------EXAMPLE 1------------------

Disable-PnPResponsiveUI

If enabled previously, this will remove the PnP Responsive UI from a site.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Disable-PnPSiteClassification
In ths Article

Disables Site Classifications for the tenant. Requires a connection to the Microsoft Graph.

Examples
------------------EXAMPLE 1------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Disable-PnPSiteClassification

Disables Site Classifications for your tenant.

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Disable-PnPTenantServicePrincipal
In ths Article

Enables the current tenant's "SharePoint Online Client" service principal.

Syntax
Disable-PnPTenantServicePrincipal [-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
Enables the current tenant's "SharePoint Online Client" service principal.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Disconnect-PnPOnline
In ths Article

Disconnects the context

Syntax
Disconnect-PnPOnline [-Connection <SPOnlineConnection>]

Description
Disconnects the current context and requires you to build up a new connection in order to use the Cmdlets again.
Using Connect-PnPOnline to connect to a different site has the same effect.

Examples
------------------EXAMPLE 1------------------

Disconnect-PnPOnline

This will disconnect you from the server.

Parameters
-Connection
Connection to be used by cmdlet

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Enable-PnPCommSite
In ths Article

Enable communication site on the root site of a tenant

Syntax
Enable-PnPCommSite [-SiteUrl <String>]
[-Connection <SPOnlineConnection>]

Description
The Enable-PnPCommSite cmdlet converts the root site of a tenant to be a communication site. This action is not
reversible.

Examples
------------------EXAMPLE 1------------------

Enable-PnPCommSite

This will convert the root site collection to become a communication site
------------------EXAMPLE 2------------------

Enable-PnPCommSite -SiteUrl https://tenant.sharepoint.com

This will convert the root site collection to become a communication site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SiteUrl
Specifies the full URL of the new site collection. It must be in a valid managed path in the company's site. For
example, for company contoso, valid managed paths are https://contoso.sharepoint.com/sites and
https://contoso.sharepoint.com/teams.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Enable-PnPFeature
In ths Article

Enables a feature

Syntax
Enable-PnPFeature -Identity <GuidPipeBind>
[-Force [<SwitchParameter>]]
[-Scope <FeatureScope>]
[-Sandboxed [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Enable-PnPFeature -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will enable the feature with the id "99a00f6e-fb81-4dc7-8eac-e09c6f9132fe"


------------------EXAMPLE 2------------------

Enable-PnPFeature -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Force

This will enable the feature with the id "99a00f6e-fb81-4dc7-8eac-e09c6f9132fe" with force.
------------------EXAMPLE 3------------------

Enable-PnPFeature -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Web

This will enable the feature with the id "99a00f6e-fb81-4dc7-8eac-e09c6f9132fe" with the web scope.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Force
Specifies whether to overwrite an existing feature with the same feature identifier. This parameter is ignored if
there are no errors.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The id of the feature to enable.

Type: GuidPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Sandboxed
Specify this parameter if the feature you're trying to activate is part of a sandboxed solution.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Specify the scope of the feature to activate, either Web or Site. Defaults to Web.

Type: FeatureScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Enable-PnPInPlaceRecordsManagementForSite
In ths Article

Enables in place records management for a site.

Syntax
Enable-PnPInPlaceRecordsManagementForSite [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Enable-PnPInPlaceRecordsManagementForSite

The in place records management feature will be enabled and the in place record management will be enabled in
all locations with record declaration allowed by all contributors and undeclaration by site admins

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Enable-PnPPowerShellTelemetry
In ths Article

Enables PnP PowerShell telemetry tracking.

Syntax
Enable-PnPPowerShellTelemetry [-Force [<SwitchParameter>]]

Description
In order to help to make PnP PowerShell better, we can track anonymous telemetry. We track the version of the
cmdlets you are using, which cmdlet you are executing and which version of SharePoint you are connecting to. Use
Disable-PnPPowerShellTelemetry to turn this off, alternative, use the -NoTelemetry switch on Connect-PnPOnline
to turn it off for that session.

Examples
------------------EXAMPLE 1------------------

Enable-PnPPowerShellTelemetry

Will prompt you to confirm to enable telemetry tracking.


------------------EXAMPLE 2------------------

Enable-PnPPowerShellTelemetry -Force

Will enable telemetry tracking without prompting.

Parameters
-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Enable-PnPResponsiveUI
In ths Article

Activates the PnP Response UI Add-on

Syntax
Enable-PnPResponsiveUI [-InfrastructureSiteUrl <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Enables the PnP Responsive UI implementation on a classic SharePoint Site

Examples
------------------EXAMPLE 1------------------

Enable-PnPResponsiveUI

Will upload a CSS file, a JavaScript file and adds a custom action to the root web of the current site collection,
enabling the responsive UI on the site collection. The CSS and JavaScript files are located in the style library, in a
folder called SP.Responsive.UI.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InfrastructureSiteUrl
A full URL pointing to an infrastructure site. If specified, it will add a custom action pointing to the responsive UI JS
code in that site.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Enable-PnPSiteClassification
In ths Article

Enables Site Classifications for the tenant. Requires a connection to the Microsoft Graph.

Syntax
Enable-PnPSiteClassification -Classifications <String>
-DefaultClassification <String>
[-UsageGuidelinesUrl <String>]

Examples
------------------EXAMPLE 1------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Enable-PnPSiteClassification -Classifications "HBI","LBI","Top Secret" -DefaultClassification "LBI"

Enables Site Classifications for your tenant and provides three classification values. The default value will be set to
"LBI"
------------------EXAMPLE 2------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Enable-PnPSiteClassification -Classifications "HBI","LBI","Top Secret" -UsageGuidelinesUrl https://aka.ms/sppnp

Enables Site Classifications for your tenant and provides three classification values. The usage guideliness will be
set to the specified URL.

Parameters
-Classifications

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultClassification

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-UsageGuidelinesUrl

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Enable-PnPTenantServicePrincipal
In ths Article

Enables the current tenant's "SharePoint Online Client" service principal.

Syntax
Enable-PnPTenantServicePrincipal [-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
Enables the current tenant's "SharePoint Online Client" service principal.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Export-PnPClientSidePage
In ths Article

Exports a Client Side Page to a PnP Provisioning Template

Syntax
Export-PnPClientSidePage -Identity <ClientSidePagePipeBind>
[-PersistBrandingFiles [<SwitchParameter>]]
[-Out <String>]
[-Force [<SwitchParameter>]]
[-Configuration <ExtractConfigurationPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Export-PnPClientSidePage -Identity Home.aspx

Exports the page 'Home.aspx' to a new PnP Provisioning Template

Parameters
-Configuration
Specify a JSON configuration file to configure the extraction progress.

Type: ExtractConfigurationPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specify to override the question to overwrite a file if it already exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The name of the page

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Out
If specified the template will be saved to the file specified with this parameter.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PersistBrandingFiles
If specified referenced files will be exported to the current folder.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Export-PnPClientSidePageMapping
In ths Article

Get's the built-in maping files or a custom mapping file for your publishing portal page layouts. These mapping
files are used to tailor the page transformation experience.

Syntax
Export-PnPClientSidePageMapping [-BuiltInWebPartMapping [<SwitchParameter>]]
[-BuiltInPageLayoutMapping [<SwitchParameter>]]
[-CustomPageLayoutMapping [<SwitchParameter>]]
[-PublishingPage <PagePipeBind>]
[-AnalyzeOOBPageLayouts [<SwitchParameter>]]
[-Folder <String>]
[-Overwrite [<SwitchParameter>]]
[-Logging [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Export-PnPClientSidePageMapping -BuiltInPageLayoutMapping -CustomPageLayoutMapping -Folder c:\\temp -Overwrite

Exports the built in page layout mapping and analyzes the current site's page layouts and exports these to files in
folder c:\temp
------------------EXAMPLE 2------------------

Export-PnPClientSidePageMapping -CustomPageLayoutMapping -PublishingPage mypage.aspx -Folder c:\\temp -


Overwrite

Analyzes the page layout of page mypage.aspx and exports this to a file in folder c:\temp
------------------EXAMPLE 3------------------

Export-PnPClientSidePageMapping -BuiltInWebPartMapping -Folder c:\\temp -Overwrite

Exports the built in webpart mapping to a file in folder c:\temp. Use this a starting basis if you want to tailer the
web part mapping behavior.

Parameters
-AnalyzeOOBPageLayouts
Set this flag if you also want to analyze the OOB page layouts...typically these are covered via the default mapping,
but if you've updated these page layouts you might want to analyze them again

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-BuiltInPageLayoutMapping
Exports the builtin pagelayout mapping file (only needed for publishing page transformation)

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-BuiltInWebPartMapping
Exports the builtin web part mapping file

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CustomPageLayoutMapping
Analyzes the pagelayouts in the current publishing portal and exports them as a pagelayout mapping file

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
The folder to created the mapping file(s) in
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Logging
Outputs analyser logging to the console

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Overwrites existing mapping files

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PublishingPage
The name of the publishing page to export a page layout mapping file for

Type: PagePipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Export-PnPListToProvisioningTemplate
In ths Article

Exports one or more lists to provisioning template

Syntax
Export-PnPListToProvisioningTemplate -List <String>
[-Out <String>]
[-Force [<SwitchParameter>]]
[-OutputInstance [<SwitchParameter>]]
[-Schema <XMLPnPSchemaVersion>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Export-PnPListToProvisioningTemplate -Out template.xml -List "Documents"

Extracts a list to a new provisioning template including the list specified by title or ID.
------------------EXAMPLE 2------------------

Export-PnPListToProvisioningTemplate -Out template.pnp -List "Documents","Events"

Extracts a list to a new provisioning template Office Open XML file, including the lists specified by title or ID.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the output file if it exists.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
Specify the lists to extract, either providing their ID or their Title.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Out
Filename to write to, optionally including full path

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-OutputInstance
Returns the template as an in-memory object, which is an instance of the ProvisioningTemplate type of the PnP
Core Component. It cannot be used together with the -Out parameter.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Schema
The schema of the output to use, defaults to the latest schema

Type: XMLPnPSchemaVersion
Required: False
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Export-PnPTaxonomy
In ths Article

Exports a taxonomy to either the output or to a file.

Syntax
Export-PnPTaxonomy [-TermSetId <GuidPipeBind>]
[-TermStoreName <String>]
[-Lcid <Int>]
[-IncludeID [<SwitchParameter>]]
[-Path <String>]
[-Force [<SwitchParameter>]]
[-Delimiter <String>]
[-Encoding <Encoding>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Export-PnPTaxonomy

Exports the full taxonomy to the standard output


------------------EXAMPLE 2------------------

Export-PnPTaxonomy -Path c:\output.txt

Exports the full taxonomy the file output.txt


------------------EXAMPLE 3------------------

Export-PnPTaxonomy -Path c:\output.txt -TermSet f6f43025-7242-4f7a-b739-41fa32847254

Exports the term set with the specified id


------------------EXAMPLE 4------------------

Export-PnPTaxonomy -Path c:\output.txt -TermSet f6f43025-7242-4f7a-b739-41fa32847254 -Lcid 1044

Exports the term set with the specified id using Norwegian labels

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Delimiter
The path delimiter to be used, by default this is '|'

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Encoding
Defaults to Unicode

Type: Encoding
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the output file if it exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeID
If specified will include the ids of the taxonomy items in the output. Format: <label>;#<guid>

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Lcid
Specify the language code for the exported terms
Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
File to export the data to.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermSetId
If specified, will export the specified termset only

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermStoreName
Term store to export; if not specified the default term store is used.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Export-PnPTermGroupToXml
In ths Article

Exports a taxonomy TermGroup to either the output or to an XML file.

Syntax
Export-PnPTermGroupToXml [-Identity <Id, Title or TermGroup>]
[-Out <String>]
[-FullTemplate [<SwitchParameter>]]
[-Encoding <Encoding>]
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Export-PnPTermGroupToXml

Exports all term groups in the default site collection term store to the standard output
------------------EXAMPLE 2------------------

Export-PnPTermGroupToXml -Out output.xml

Exports all term groups in the default site collection term store to the file 'output.xml' in the current folder
------------------EXAMPLE 3------------------

Export-PnPTermGroupToXml -Out c:\output.xml -Identity "Test Group"

Exports the term group with the specified name to the file 'output.xml' located in the root folder of the C: drive.
------------------EXAMPLE 4------------------

$termgroup = Get-PnPTermGroup -GroupName Test


$termgroup | Export-PnPTermGroupToXml -Out c:\output.xml

Retrieves a termgroup and subsequently exports that term group to a the file named 'output.xml'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Encoding
Defaults to Unicode

Type: Encoding
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the output file if it exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FullTemplate
If specified, a full provisioning template structure will be returned

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID or name of the termgroup

Type: Id, Title or TermGroup


Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Out
File to export the data to.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Find-PnPFile
In ths Article

Finds a file in the virtual file system of the web.

Syntax
Find-PnPFile -Match <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Find-PnPFile -Match <String>


-List <ListPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Find-PnPFile -Match <String>


-Folder <FolderPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Find-PnPFile -Match *.master

Will return all masterpages located in the current web.


------------------EXAMPLE 2------------------

Find-PnPFile -List "Documents" -Match *.pdf

Will return all pdf files located in given list.


------------------EXAMPLE 3------------------

Find-PnPFile -Folder "Shared Documents/Sub Folder" -Match *.docx

Will return all docx files located in given folder.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
Folder object or relative url of a folder to query

Type: FolderPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
List title, url or an actual List object to query

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Match
Wildcard query

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.File
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPAccessToken
In ths Article

Returns the current OAuth Access token

Syntax
Get-PnPAccessToken [-Decoded [<SwitchParameter>]]

Description
Gets the OAuth 2.0 Access Token to consume the Microsoft Graph API

Examples
------------------EXAMPLE 1------------------

Get-PnPAccessToken

Gets the OAuth 2.0 Access Token to consume the Microsoft Graph API

Parameters
-Decoded
Returns the access token in a decoded manner

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPAlert
In ths Article

Returns registered alerts for a user.

Syntax
Get-PnPAlert [-List <ListPipeBind>]
[-User <UserPipeBind>]
[-Title <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPAlert

Returns all registered alerts for the current user


------------------EXAMPLE 2------------------

Get-PnPAlert -List "Demo List"

Returns all alerts registered on the given list for the current user.
------------------EXAMPLE 3------------------

Get-PnPAlert -List "Demo List" -User "i:0#.f|membership|Alice@contoso.onmicrosoft.com"

Returns all alerts registered on the given list for the specified user.
------------------EXAMPLE 4------------------

Get-PnPAlert -Title "Demo Alert"

Returns all alerts with the given title for the current user. Title comparison is case sensitive.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Title or Url of the list.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ListPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Title
Retrieve alerts with this title. Title comparison is case sensitive.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-User
User to retrieve the alerts for (User ID, login name or actual User object). Skip this parameter to retrieve the alerts
for the current user. Note: Only site owners can retrieve alerts for other users.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: UserPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPApp
In ths Article

Returns the available apps from the app catalog

Syntax
Get-PnPApp [-Identity <AppMetadataPipeBind>]
[-Scope <AppCatalogScope>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPApp

This will return all available apps from the tenant app catalog. It will list the installed version in the current site.
------------------EXAMPLE 2------------------

Get-PnPApp -Scope Site

This will return all available apps from the site collection scoped app catalog. It will list the installed version in the
current site.
------------------EXAMPLE 3------------------

Get-PnPApp -Identity 2646ccc3-6a2b-46ef-9273-81411cbbb60f

This will retrieve the specific app from the app catalog.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Id of an app which is available in the app catalog
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppMetadataPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Defines which app catalog to use. Defaults to Tenant
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppCatalogScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
List<OfficeDevPnP.Core.ALM.AppMetadata>

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPAppAuthAccessToken
In ths Article

Returns the access token

Syntax
Get-PnPAppAuthAccessToken [-Connection <SPOnlineConnection>]

Description
Returns the access token from the current client context (only works with App-Only authentication)

Examples
------------------EXAMPLE 1------------------

$accessToken = Get-PnPAppAuthAccessToken

This will put the access token from current context in the $accessToken variable. Will only work in App
authentication flow (App+user or App-Only)

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.String

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPAppInstance
In ths Article

Returns a SharePoint AddIn Instance

Syntax
Get-PnPAppInstance [-Includes <String[]>]
[-Identity <AppPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Returns a SharePoint App/Addin that has been installed in the current site

Examples
------------------EXAMPLE 1------------------

Get-PnPAppInstance

This will return all addin instances in the site.


------------------EXAMPLE 2------------------

Get-PnPAppInstance -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will return an addin instance with the specified id.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Id of the App Instance
Type: AppPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
List<Microsoft.SharePoint.Client.AppInstance>

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPApplicationCustomizer
In ths Article

Returns all SharePoint Framework client side extension application customizers

Syntax
Get-PnPApplicationCustomizer [-Identity <GuidPipeBind>]
[-Scope <CustomActionScope>]
[-ThrowExceptionIfCustomActionNotFound [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPApplicationCustomizer [-Includes <String[]>]


[-Scope <CustomActionScope>]
[-ThrowExceptionIfCustomActionNotFound [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPApplicationCustomizer -ClientSideComponentId <GuidPipeBind>


[-Scope <CustomActionScope>]
[-ThrowExceptionIfCustomActionNotFound [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Returns all SharePoint Framework client side extension application customizers registered on the current web
and/or site

Examples
------------------EXAMPLE 1------------------

Get-PnPApplicationCustomizer

Returns the custom action representing the SharePoint Framework client side extension registrations registered on
the current site collection and web.
------------------EXAMPLE 2------------------

Get-PnPApplicationCustomizer -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2

Returns the custom action representing the SharePoint Framework client side extension registration with the id
'aa66f67e-46c0-4474-8a82-42bf467d07f2'.
------------------EXAMPLE 3------------------

Get-PnPApplicationCustomizer -ClientSideComponentId aa66f67e-46c0-4474-8a82-42bf467d07f2 -Scope Web

Returns the custom action(s) being registered for a SharePoint Framework solution having the id 'aa66f67e-46c0-
4474-8a82-42bf467d07f2' in its manifest from the current web.

Parameters
-ClientSideComponentId
The Client Side Component Id of the SharePoint Framework client side extension application customizer found in
the manifest for which existing custom action(s) should be removed
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Identity of the SharePoint Framework client side extension application customizer to return. Omit to return all
SharePoint Frameworkclient side extension application customizer.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Scope of the SharePoint Framework client side extension application customizer, either Web, Site or All to return
both (all is the default)
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ThrowExceptionIfCustomActionNotFound
Switch parameter if an exception should be thrown if the requested SharePoint Frameworkclient side extension
application customizer does not exist (true) or if omitted, nothing will be returned in case the SharePoint
Framework client side extension application customizer does not exist
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPAuditing
In ths Article

Get the Auditing setting of a site

Syntax
Get-PnPAuditing [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPAuditing

Gets the auditing settings of the current site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Audit

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPAuthenticationRealm
In ths Article

Returns the authentication realm

Syntax
Get-PnPAuthenticationRealm [-Url <String>]
[-Connection <SPOnlineConnection>]

Description
Gets the authentication realm for the current web

Examples
------------------EXAMPLE 1------------------

Get-PnPAuthenticationRealm

This will get the authentication realm for the current connected site
------------------EXAMPLE 2------------------

Get-PnPAuthenticationRealm -Url https://contoso.sharepoint.com

This will get the authentication realm for https://contoso.sharepoint.com

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the site
Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Outputs
System.String

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPAvailableClientSideComponents
In ths Article

Gets the available client side components on a particular page

Syntax
Get-PnPAvailableClientSideComponents -Page <ClientSidePagePipeBind>
[-Component <ClientSideComponentPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPAvailableClientSideComponents -Page "MyPage.aspx"

Gets the list of available client side components on the page 'MyPage.aspx'
------------------EXAMPLE 2------------------

Get-PnPAvailableClientSideComponents $page

Gets the list of available client side components on the page contained in the $page variable
------------------EXAMPLE 3------------------

Get-PnPAvailableClientSideComponents -Page "MyPage.aspx" -ComponentName "HelloWorld"

Gets the client side component 'HelloWorld' if available on the page 'MyPage.aspx'

Parameters
-Component
Specifies the component instance or Id to look for.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSideComponentPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Page
The name of the page.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPAzureADManifestKeyCredentials
In ths Article

Return the JSON Manifest snippet for Azure Apps

Syntax
Get-PnPAzureADManifestKeyCredentials -CertPath <String>

Description
Creates the JSON snippet that is required for the manifest JSON file for Azure WebApplication / WebAPI apps

Examples
------------------EXAMPLE 1------------------

Get-PnPAzureADManifestKeyCredentials -CertPath .\mycert.cer

Output the JSON snippet which needs to be replaced in the application manifest file
------------------EXAMPLE 2------------------

Get-PnPAzureADManifestKeyCredentials -CertPath .\mycert.cer | Set-Clipboard

Output the JSON snippet which needs to be replaced in the application manifest file and copies it to the clipboard

Parameters
-CertPath
Specifies the path to the certificate like .\mycert.cer

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.String
Outputs a JSON formatted string
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPAzureCertificate
In ths Article

Get PEM values and manifest settings for an existing certificate (.pfx) for use when using CSOM via an app-only
ADAL application. See https://github.com/SharePoint/PnP -
PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions for a sample on how to get started.
KeyCredentials contains the ADAL app manifest sections. Certificate contains the PEM encoded certificate.
PrivateKey contains the PEM encoded private key of the certificate.

Syntax
Get-PnPAzureCertificate -CertificatePath <String>
[-CertificatePassword <SecureString>]

Examples
------------------EXAMPLE 1------------------

Get-PnPAzureCertificate -CertificatePath "mycert.pfx"

This will output PEM values and ADAL app manifest settings for the certificate mycert.pfx.
------------------EXAMPLE 2------------------

Get-PnPAzureCertificate -CertificatePath "mycert.pfx" -CertificatePassword (ConvertTo-SecureString -String


"YourPassword" -AsPlainText -Force)

This will output PEM values and ADAL app manifest settings for the certificate mycert.pfx which has the password
YourPassword.
------------------EXAMPLE 3------------------

Get-PnPAzureCertificate -CertificatePath "mycert.cer" | clip

Output the JSON snippet which needs to be replaced in the application manifest file and copies it to the clipboard

Parameters
-CertificatePassword
Password to the certificate (*.pfx)
Type: SecureString
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CertificatePath
Path to the certificate (*.pfx)

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPClientSideComponent
In ths Article

Retrieve one or more Client-Side components from a page

Syntax
Get-PnPClientSideComponent -Page <ClientSidePagePipeBind>
[-InstanceId <GuidPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPClientSideComponent -Page Home

Returns all controls defined on the given page.


------------------EXAMPLE 2------------------

Get-PnPClientSideComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82

Returns a specific control defined on the given page.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InstanceId
The instance id of the component
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Page
The name of the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPClientSidePage
In ths Article

Gets a Client-Side Page

Syntax
Get-PnPClientSidePage -Identity <ClientSidePagePipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPClientSidePage -Identity "MyPage.aspx"

Gets the Modern Page (Client-Side) named 'MyPage.aspx' in the current SharePoint site
------------------EXAMPLE 2------------------

Get-PnPClientSidePage "MyPage"

Gets the Modern Page (Client-Side) named 'MyPage.aspx' in the current SharePoint site
------------------EXAMPLE 3------------------

Get-PnPClientSidePage "Templates/MyPageTemplate"

Gets the Modern Page (Client-Side) named 'MyPageTemplate.aspx' from the templates folder of the Page Library
in the current SharePoint site
------------------EXAMPLE 4------------------

Get-PnPClientSidePage -Identity "MyPage.aspx" -Web (Get-PnPWeb -Identity "Subsite1")

Gets the Modern Page (Client-Side) named 'MyPage.aspx' from the subsite named 'Subsite1'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The name of the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPConnection
In ths Article

Returns the current context

Description
Returns a PnP PowerShell Connection for use with the -Connection parameter on other cmdlets.

Examples
------------------EXAMPLE 1------------------

$ctx = Get-PnPConnection

This will put the current connection for use with the -Connection parameter on other cmdlets.

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPContentType
In ths Article

Retrieves a content type

Syntax
Get-PnPContentType [-Identity <ContentTypePipeBind>]
[-List <ListPipeBind>]
[-InSiteHierarchy [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPContentType

This will get a listing of all available content types within the current web
------------------EXAMPLE 2------------------

Get-PnPContentType -InSiteHierarchy

This will get a listing of all available content types within the site collection
------------------EXAMPLE 3------------------

Get-PnPContentType -Identity "Project Document"

This will get the content type with the name "Project Document" within the current context
------------------EXAMPLE 4------------------

Get-PnPContentType -List "Documents"

This will get a listing of all available content types within the list "Documents"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Name or ID of the content type to retrieve

Type: ContentTypePipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-InSiteHierarchy
Search site hierarchy for content types

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
List to query

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.ContentType

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPContentTypePublishingHubUrl
In ths Article

Returns the url to Content Type Publishing Hub

Syntax
Get-PnPContentTypePublishingHubUrl [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

$url = Get-PnPContentTypePublishingHubUrl
Connect-PnPOnline -Url $url
Get-PnPContentType

This will retrieve the url to the content type hub, connect to it, and then retrieve the content types form that site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPContext
In ths Article

Returns the current context

Description
Returns a Client Side Object Model context

Examples
------------------EXAMPLE 1------------------

$ctx = Get-PnPContext

This will put the current context in the $ctx variable.


------------------EXAMPLE 2------------------

Connect-PnPOnline -Url $siteAurl -Credentials $credentials


$ctx = Get-PnPContext
Get-PnPList # returns the lists from site specified with $siteAurl
Connect-PnPOnline -Url $siteBurl -Credentials $credentials
Get-PnPList # returns the lists from the site specified with $siteBurl
Set-PnPContext -Context $ctx # switch back to site A
Get-PnPList # returns the lists from site A

Outputs
Microsoft.SharePoint.Client.ClientContext

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPCustomAction
In ths Article

Return user custom actions

Syntax
Get-PnPCustomAction [-Includes <String[]>]
[-Identity <GuidPipeBind>]
[-Scope <CustomActionScope>]
[-ThrowExceptionIfCustomActionNotFound [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Returns all or a specific user custom action

Examples
------------------EXAMPLE 1------------------

Get-PnPCustomAction

Returns all custom actions of the current site.


------------------EXAMPLE 2------------------

Get-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2

Returns the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2'.


------------------EXAMPLE 3------------------

Get-PnPCustomAction -Scope web

Returns all custom actions for the current web object.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Identity of the CustomAction to return. Omit to return all CustomActions.

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Scope of the CustomAction, either Web, Site or All to return both

Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ThrowExceptionIfCustomActionNotFound
Switch parameter if an exception should be thrown if the requested CustomAction does not exist (true) or if
omitted, nothing will be returned in case the CustomAction does not exist

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Outputs
List<Microsoft.SharePoint.Client.UserCustomAction>

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPDefaultColumnValues
In ths Article

Gets the default column values for all folders in document library

Syntax
Get-PnPDefaultColumnValues -List <ListPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Gets the default column values for a document library, per folder. Supports both text, people and taxonomy fields.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Name or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPDeletedUnifiedGroup
In ths Article

Gets one deleted Office 365 Group (aka Unified Group) or a list of deleted Office 365 Groups

Syntax
Get-PnPDeletedUnifiedGroup [-Identity <UnifiedGroupPipeBind>]

Examples
------------------EXAMPLE 1------------------

Get-PnPDeletedUnifiedGroup

Retrieves all deleted Office 365 Groups


------------------EXAMPLE 2------------------

Get-PnPDeletedUnifiedGroup -Identity 38b32e13-e900-4d95-b860-fb52bc07ca7f

Retrieves a specific deleted Office 365 Group based on its ID

Parameters
-Identity
The Identity of the Office 365 Group.

Type: UnifiedGroupPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPDocumentSetTemplate
In ths Article

Retrieves a document set template

Syntax
Get-PnPDocumentSetTemplate -Identity <DocumentSetPipeBind>
[-Includes <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPDocumentSetTemplate -Identity "Test Document Set"

This will get the document set template with the name "Test Document Set"
------------------EXAMPLE 2------------------

Get-PnPDocumentSetTemplate -Identity "0x0120D520005DB65D094035A241BAC9AF083F825F3B"

This will get the document set template with the id "0x0120D520005DB65D094035A241BAC9AF083F825F3B"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Either specify a name, an id, a document set template object or a content type object
Type: DocumentSetPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.DocumentSet.DocumentSetTemplate

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPEventReceiver
In ths Article

Return registered eventreceivers

Syntax
Get-PnPEventReceiver [-List <ListPipeBind>]
[-Identity <EventReceiverPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPEventReceiver [-Includes <String[]>]


[-Identity <EventReceiverPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Returns all registered or a specific eventreceiver

Examples
------------------EXAMPLE 1------------------

Get-PnPEventReceiver

This will return all registered event receivers on the current web
------------------EXAMPLE 2------------------

Get-PnPEventReceiver -Identity fb689d0e-eb99-4f13-beb3-86692fd39f22

This will return the event receiver with the provided ReceiverId "fb689d0e-eb99-4f13-beb3-86692fd39f22" from
the current web
------------------EXAMPLE 3------------------

Get-PnPEventReceiver -Identity MyReceiver

This will return the event receiver with the provided ReceiverName "MyReceiver" from the current web
------------------EXAMPLE 4------------------
Get-PnPEventReceiver -List "ProjectList"

This will return all registered event receivers in the provided "ProjectList" list
------------------EXAMPLE 5------------------

Get-PnPEventReceiver -List "ProjectList" -Identity fb689d0e-eb99-4f13-beb3-86692fd39f22

This will return the event receiver in the provided "ProjectList" list with with the provided ReceiverId "fb689d0e-
eb99-4f13-beb3-86692fd39f22"
------------------EXAMPLE 6------------------

Get-PnPEventReceiver -List "ProjectList" -Identity MyReceiver

This will return the event receiver in the "ProjectList" list with the provided ReceiverName "MyReceiver"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Guid of the event receiver

Type: EventReceiverPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object from which to get the event receiver object
Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.EventReceiverDefinition

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPException
In ths Article

Returns the last exception that occurred

Syntax
Get-PnPException [-All [<SwitchParameter>]]

Description
Returns the last exception which can be used while debugging PnP Cmdlets

Examples
------------------EXAMPLE 1------------------

Get-PnPException

Returns the last exception


------------------EXAMPLE 2------------------

Get-PnPException -All

Returns all exceptions that occurred

Parameters
-All
Show all exceptions

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPFeature
In ths Article

Returns all activated or a specific activated feature

Syntax
Get-PnPFeature [-Includes <String[]>]
[-Identity <FeaturePipeBind>]
[-Scope <FeatureScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPFeature

This will return all activated web scoped features


------------------EXAMPLE 2------------------

Get-PnPFeature -Scope Site

This will return all activated site scoped features


------------------EXAMPLE 3------------------

Get-PnPFeature -Identity fb689d0e-eb99-4f13-beb3-86692fd39f22

This will return a specific activated web scoped feature


------------------EXAMPLE 4------------------

Get-PnPFeature -Identity fb689d0e-eb99-4f13-beb3-86692fd39f22 -Scope Site

This will return a specific activated site scoped feature

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The feature ID or name to query for, Querying by name is not supported in version 15 of the Client Side Object
Model

Type: FeaturePipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Scope
The scope of the feature. Defaults to Web.

Type: FeatureScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
List<Microsoft.SharePoint.Client.Feature>

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPField
In ths Article

Returns a field from a list or site

Syntax
Get-PnPField [-Includes <String[]>]
[-List <ListPipeBind>]
[-Identity <FieldPipeBind>]
[-Group <String>]
[-InSiteHierarchy [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPField

Gets all the fields from the current site


------------------EXAMPLE 2------------------

Get-PnPField -List "Demo list" -Identity "Speakers"

Gets the speakers field from the list Demo list

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Group
Filter to the specified group
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The field object or name to get

Type: FieldPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-InSiteHierarchy
Search site hierarchy for fields

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object or name where to get the field from

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Outputs
Microsoft.SharePoint.Client.Field

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPFile
In ths Article

Downloads a file.

Syntax
Get-PnPFile -Url <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPFile -Url <String>


[-AsListItem [<SwitchParameter>]]
[-ThrowExceptionIfFileNotFound [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPFile -Url <String>


[-AsString [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPFile -Url <String>


-AsFile [<SwitchParameter>]
[-Path <String>]
[-Filename <String>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPFile -Url /sites/project/_catalogs/themes/15/company.spcolor

Retrieves the file and downloads it to the current folder


------------------EXAMPLE 2------------------

Get-PnPFile -Url /sites/project/_catalogs/themes/15/company.spcolor -Path c:\temp -FileName company.spcolor -


AsFile

Retrieves the file and downloads it to c:\temp\company.spcolor


------------------EXAMPLE 3------------------
Get-PnPFile -Url /sites/project/_catalogs/themes/15/company.spcolor -AsString

Retrieves the file and outputs its contents to the console


------------------EXAMPLE 4------------------

Get-PnPFile -Url /sites/project/_catalogs/themes/15/company.spcolor -AsFile

Retrieves the file and returns it as a File object


------------------EXAMPLE 5------------------

Get-PnPFile -Url /sites/project/_catalogs/themes/15/company.spcolor -AsListItem

Retrieves the file and returns it as a ListItem object


------------------EXAMPLE 6------------------

Get-PnPFile -Url _catalogs/themes/15/company.spcolor -Path c:\temp -FileName company.spcolor -AsFile

Retrieves the file by site relative URL and downloads it to c:\temp\company.spcolor

Parameters
-AsFile

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AsListItem
Returns the file as a listitem showing all its properties

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AsString
Retrieve the file contents as a string

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Filename
Name for the local file

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the file if it exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Local path where the file should be saved

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ThrowExceptionIfFileNotFound
If provided in combination with -AsListItem, a System.ArgumentException will be thrown if the file specified in the
-Url argument does not exist. Otherwise it will return nothing instead.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The URL (server or site relative) to the file
Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.File

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPFolder
In ths Article

Return a folder object

Syntax
Get-PnPFolder [-Includes <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPFolder -Url <String>


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPFolder -List <ListPipeBind>


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Retrieves a folder if it exists or all folders inside a provided list or library. Use Resolve-PnPFolder to create the
folder if it does not exist.

Examples
------------------EXAMPLE 1------------------

Get-PnPFolder -Url "Shared Documents"

Returns the folder called 'Shared Documents' which is located in the root of the current web
------------------EXAMPLE 2------------------

Get-PnPFolder -Url "/sites/demo/Shared Documents"

Returns the folder called 'Shared Documents' which is located in the root of the current web
------------------EXAMPLE 3------------------

Get-PnPFolder -List "Shared Documents"

Returns the folder(s) residing inside a folder called 'Shared Documents'


Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-List
Name, ID or instance of a list or document library to retrieve the folders residing in it for.

Type: ListPipeBind
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Url
Site or server relative URL of the folder to retrieve. In the case of a server relative url, make sure that the url starts
with the managed path as the current web.

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Folder

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPFolderItem
In ths Article

List content in folder

Syntax
Get-PnPFolderItem [-FolderSiteRelativeUrl <String>]
[-ItemType <String>]
[-ItemName <String>]
[-Recursive [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPFolderItem [-Identity <FolderPipeBind>]


[-ItemType <String>]
[-ItemName <String>]
[-Recursive [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPFolderItem -FolderSiteRelativeUrl "SitePages"

Returns the contents of the folder SitePages which is located in the root of the current web
------------------EXAMPLE 2------------------

Get-PnPFolderItem -FolderSiteRelativeUrl "SitePages" -ItemName "Default.aspx"

Returns the file 'Default.aspx' which is located in the folder SitePages which is located in the root of the current web
------------------EXAMPLE 3------------------

Get-PnPFolderItem -FolderSiteRelativeUrl "SitePages" -ItemType Folder

Returns all folders in the folder SitePages which is located in the root of the current web
------------------EXAMPLE 4------------------

Get-PnPFolderItem -FolderSiteRelativeUrl "SitePages" -ItemType File

Returns all files in the folder SitePages which is located in the root of the current web
------------------EXAMPLE 5------------------

Get-PnPFolderItem -FolderSiteRelativeUrl "SitePages" -Recursive

Returns all files and folders, including contents of any subfolders, in the folder SitePages which is located in the
root of the current web

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FolderSiteRelativeUrl
The site relative URL of the folder to retrieve

Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Identity
A folder instance to the folder to retrieve

Type: FolderPipeBind
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-ItemName
Optional name of the item to retrieve

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ItemType
The type of contents to retrieve, either File, Folder or All (default)
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Recursive
A switch parameter to include contents of all subfolders in the specified folder

Type: SwitchParameter
Required: False
Position: 4
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPGroup
In ths Article

Returns a specific SharePoint group or all SharePoint groups in site.

Syntax
Get-PnPGroup [-Identity <GroupPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPGroup [-AssociatedMemberGroup [<SwitchParameter>]]


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPGroup [-AssociatedVisitorGroup [<SwitchParameter>]]


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPGroup [-AssociatedOwnerGroup [<SwitchParameter>]]


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPGroup [-Includes <String[]>]


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPGroup

Returns all SharePoint groups in a site


------------------EXAMPLE 2------------------

Get-PnPGroup -Identity 'My Site Users'

This will return the group called 'My Site Users' in if available in the current site
------------------EXAMPLE 3------------------
Get-PnPGroup -AssociatedMemberGroup

This will return the current members group for the site

Parameters
-AssociatedMemberGroup
Retrieve the associated member group

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AssociatedOwnerGroup
Retrieve the associated owner group

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AssociatedVisitorGroup
Retrieve the associated visitor group

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Get a specific group by name
Type: GroupPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
List<Microsoft.SharePoint.Client.Group>

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPGroupMembers
In ths Article

Retrieves all members of a group

Syntax
Get-PnPGroupMembers -Identity <GroupPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
This command will return all the users that are a member of the provided SharePoint Group

Examples
------------------EXAMPLE 1------------------

Get-PnPGroupMembers -Identity 'Marketing Site Members'

Returns all the users that are a member of the group 'Marketing Site Members' in the current sitecollection
------------------EXAMPLE 2------------------

Get-PnPGroup | Get-PnPGroupMembers

Returns all the users that are a member of any of the groups in the current sitecollection
------------------EXAMPLE 3------------------

Get-PnPGroup | ? Title -Like 'Marketing*' | Get-PnPGroupMembers

Returns all the users that are a member of any of the groups of which their name starts with the word 'Marketing'
in the current sitecollection

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
A group object, an ID or a name of a group

Type: GroupPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.User

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPGroupPermissions
In ths Article

Returns the permissions for a specific SharePoint group

Syntax
Get-PnPGroupPermissions -Identity <GroupPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPGroupPermissions -Identity 'My Site Members'

Returns the permissions for the SharePoint group with the name 'My Site Members'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Get the permissions of a specific group by name

Type: GroupPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.RoleDefinitionBindingCollection

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPHealthScore
In ths Article

Retrieves the healthscore of the site given in his Url parameter or from the current connection if the Url parameter
is not provided

Description
Retrieves the current X-SharePointHealthScore value of the server, or CPU, on which your SharePoint instance
runs. X-SharePointHealthScore is a value between 0 and 10, where 0 indicates the server is idle and 10 indicates
the server is very busy. For more information visit https://docs.microsoft.com/office365/enterprise/diagnosing-
performance-issues-with-sharepoint-online and https://docs.microsoft.com/openspecs/sharepoint_protocols/ms-
wsshp/c60ddeb6-4113-4a73-9e97-26b5c3907d33.

Examples
------------------EXAMPLE 1------------------

Get-PnPHealthScore

This will retrieve the current health score of the server.


------------------EXAMPLE 2------------------

Get-PnPHealthScore -Url https://contoso.sharepoint.com

This will retrieve the current health score for the url https://contoso.sharepoint.com.

Outputs
System.Int32
Returns a int value representing the current health score value of the server.

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPHideDefaultThemes
In ths Article

Returns if the default / OOTB themes should be visible to users or not.

Syntax
Get-PnPHideDefaultThemes [-Connection <SPOnlineConnection>]

Description
Returns if the default themes are visible. Use Set-PnPHideDefaultThemes to change this value.
You must be a SharePoint Online global administrator to run the cmdlet.

Examples
------------------EXAMPLE 1------------------

Get-PnPHideDefaultThemes

This example returns the current setting if the default themes should be visible

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPHomePage
In ths Article

Return the homepage

Syntax
Get-PnPHomePage [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Returns the URL to the page set as home page

Examples
------------------EXAMPLE 1------------------

Get-PnPHomePage

Will return the URL of the home page of the web.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.String

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPHomeSite
In ths Article

Returns the home site url for your tenant

Syntax
Get-PnPHomeSite [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPHomeSite

Returns the home site url for your tenant

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPHubSite
In ths Article

Retrieve all or a specific hubsite.

Syntax
Get-PnPHubSite [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPHubSite

Returns all hubsite properties


------------------EXAMPLE 2------------------

Get-PnPHubSite -Identity https://contoso.sharepoint.com/sites/myhubsite

Returns the properties of the specified hubsite

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPHubSiteChild
In ths Article

Retrieves all sites linked to a specific hub site

Syntax
Get-PnPHubSiteChild [-Connection <SPOnlineConnection>]

Description
Retrieves all sites linked to a specific hub site

Examples
------------------EXAMPLE 1------------------

Get-PnPHubSiteChild -Identity https://contoso.sharepoint.com/sites/myhubsite

Returns the sites having configured the provided hub site as their hub site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPIndexedPropertyKeys
In ths Article

Returns the keys of the property bag values that have been marked for indexing by search

Syntax
Get-PnPIndexedPropertyKeys [-List <ListPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object or name from where to get the indexed properties

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPInPlaceRecordsManagement
In ths Article

Returns if the place records management feature is enabled.

Syntax
Get-PnPInPlaceRecordsManagement [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPInPlaceRecordsManagement

Returns if $true if in place records management is active

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPJavaScriptLink
In ths Article

Returns all or a specific custom action(s) with location type ScriptLink

Syntax
Get-PnPJavaScriptLink [-Name <String>]
[-Scope <CustomActionScope>]
[-ThrowExceptionIfJavaScriptLinkNotFound [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPJavaScriptLink

Returns all web scoped JavaScript links


------------------EXAMPLE 2------------------

Get-PnPJavaScriptLink -Scope All

Returns all web and site scoped JavaScript links


------------------EXAMPLE 3------------------

Get-PnPJavaScriptLink -Scope Web

Returns all Web scoped JavaScript links


------------------EXAMPLE 4------------------

Get-PnPJavaScriptLink -Scope Site

Returns all Site scoped JavaScript links


------------------EXAMPLE 5------------------

Get-PnPJavaScriptLink -Name Test

Returns the web scoped JavaScript link named Test


Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the Javascript link. Omit this parameter to retrieve all script links

Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Scope of the action, either Web, Site or All to return both, defaults to Web

Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ThrowExceptionIfJavaScriptLinkNotFound
Switch parameter if an exception should be thrown if the requested JavaScriptLink does not exist (true) or if
omitted, nothing will be returned in case the JavaScriptLink does not exist

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Outputs
Microsoft.SharePoint.Client.UserCustomAction

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPLabel
In ths Article

Gets the Office 365 retention label/tag of the specified list or library (if applicable)

Syntax
Get-PnPLabel -List <ListPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPLabel -List "Demo List"

This gets the Office 365 retention label which is set to a list or a library.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPList
In ths Article

Returns a List object

Syntax
Get-PnPList [-Includes <String[]>]
[-Identity <ListPipeBind>]
[-ThrowExceptionIfListNotFound [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPList

Returns all lists in the current web


------------------EXAMPLE 2------------------

Get-PnPList -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

Returns a list with the given id.


------------------EXAMPLE 3------------------

Get-PnPList -Identity Lists/Announcements

Returns a list with the given url.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The ID, name or Url (Lists/MyList) of the list.

Type: ListPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-ThrowExceptionIfListNotFound
Switch parameter if an exception should be thrown if the requested list does not exist (true) or if omitted, nothing
will be returned in case the list does not exist

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.List

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPListInformationRightsManagement
In ths Article

Get the site closure status of the site which has a site policy applied

Syntax
Get-PnPListInformationRightsManagement -List <ListPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPListInformationRightsManagement -List "Documents"

Returns Information Rights Management (IRM ) settings for the list. See 'Get-Help Set-
PnPListInformationRightsManagement -Detailed' for more information about the various values.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPListItem
In ths Article

Retrieves list items

Syntax
Get-PnPListItem -List <ListPipeBind>
[-Id <Int>]
[-Fields <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPListItem -List <ListPipeBind>


[-UniqueId <GuidPipeBind>]
[-Fields <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPListItem -List <ListPipeBind>


[-Query <String>]
[-PageSize <Int>]
[-ScriptBlock <ScriptBlock>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPListItem -List <ListPipeBind>


[-Fields <String[]>]
[-PageSize <Int>]
[-ScriptBlock <ScriptBlock>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPListItem -List Tasks

Retrieves all list items from the Tasks list


------------------EXAMPLE 2------------------

Get-PnPListItem -List Tasks -Id 1

Retrieves the list item with ID 1 from the Tasks list


------------------EXAMPLE 3------------------

Get-PnPListItem -List Tasks -UniqueId bd6c5b3b-d960-4ee7-a02c-85dc6cd78cc3

Retrieves the list item with unique id bd6c5b3b-d960-4ee7-a02c-85dc6cd78cc3 from the tasks lists
------------------EXAMPLE 4------------------

(Get-PnPListItem -List Tasks -Fields "Title","GUID").FieldValues

Retrieves all list items, but only includes the values of the Title and GUID fields in the list item object
------------------EXAMPLE 5------------------

Get-PnPListItem -List Tasks -Query "bd6c5b3b-d960-4ee7-a02c-85dc6cd78cc3"

Retrieves all list items based on the CAML query specified


------------------EXAMPLE 6------------------

Get-PnPListItem -List Tasks -PageSize 1000

Retrieves all list items from the Tasks list in pages of 1000 items
------------------EXAMPLE 7------------------

Get-PnPListItem -List Tasks -PageSize 1000 -ScriptBlock { Param($items) $items.Context.ExecuteQuery() } | % {


$_.BreakRoleInheritance($true, $true) }

Retrieves all list items from the Tasks list in pages of 1000 items and breaks permission inheritance on each item

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Fields
The fields to retrieve. If not specified all fields will be loaded in the returned list object.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Id
The ID of the item to retrieve

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list to query

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-PageSize
The number of items to retrieve per page request.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Query
The CAML query to execute against the list

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ScriptBlock
The script block to run after every page request.

Type: ScriptBlock
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UniqueId
The unique id (GUID ) of the item to retrieve
Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.ListItem

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPListRecordDeclaration
In ths Article

Returns the manual record declaration settings for a list

Syntax
Get-PnPListRecordDeclaration -List <ListPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPListRecordDeclaration -List "Documents"

Returns the record declaration setting for the list "Documents"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list to retrieve the record declaration settings for

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPManagementApiAccessToken
In ths Article

Gets an access token for the Office 365 Management API

Syntax
Get-PnPManagementApiAccessToken -TenantId <String>
-ClientId <String>
-ClientSecret <String>

Examples
------------------EXAMPLE 1------------------

Get-PnPManagementApiAccessToken -TenantId $tenantId -ClientId $clientId -ClientSecret $clientSecret)

Retrieves access token for the Office 365 Management API


------------------EXAMPLE 2------------------

Connect-PnPOnline -AccessToken (Get-PnPManagementApiAccessToken -TenantId $tenantId -ClientId $clientId -


ClientSecret $clientSecret)

Connects to the Office 365 Management API using an access token for the Office 365 Management API

Parameters
-ClientId
The App\Client ID of the app which gives you access to the Office 365 Management API

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClientSecret
The Client Secret of the app which gives you access to the Office 365 Management API
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TenantId
The Tenant ID to connect to the Office 365 Management API

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPMasterPage
In ths Article

Returns the URLs of the default Master Page and the custom Master Page.

Syntax
Get-PnPMasterPage [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPNavigationNode
In ths Article

Returns all or a specific navigation node

Syntax
Get-PnPNavigationNode [-Location <NavigationType>]
[-Tree [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPNavigationNode [-Id <Int>]


[-Tree [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPNavigationNode

Returns all navigation nodes in the quicklaunch navigation


------------------EXAMPLE 2------------------

Get-PnPNavigationNode -Location QuickLaunch

Returns all navigation nodes in the quicklaunch navigation


------------------EXAMPLE 3------------------

Get-PnPNavigationNode -Location TopNavigationBar

Returns all navigation nodes in the top navigation bar


------------------EXAMPLE 4------------------

$node = Get-PnPNavigationNode -Id 2030


PS> $children = $node.Children

Returns the selected navigation node and retrieves any children


Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Id
The Id of the node to retrieve

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Location
The location of the nodes to retrieve. Either TopNavigationBar, QuickLaunch

Type: NavigationType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Tree
Show a tree view of all navigation nodes

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPOrgAssetsLibrary
In ths Article

Returns the list of all the configured organizational asset libraries

Syntax
Get-PnPOrgAssetsLibrary [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPOrgAssetsLibrary

Returns the list of all the configured organizational asset sites


------------------EXAMPLE 2------------------

(Get-PnPOrgAssetsLibrary)[0].OrgAssetsLibraries[0].LibraryUrl.DecodedUrl

Returns the server relative url of the first document library which has been flagged as organizational asset library,
i.e. "sites/branding/logos"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPOrgNewsSite
In ths Article

Returns the list of all the configured organizational news sites.

Syntax
Get-PnPOrgNewsSite [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPOrgNewsSite

Returns the list of all the configured organizational news sites.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPPowerShellTelemetryEnabled
In ths Article

Returns true if the PnP PowerShell Telemetry has been enabled.

Syntax
Get-PnPPowerShellTelemetryEnabled [-Connection <SPOnlineConnection>]

Description
In order to help to make PnP PowerShell better, we can track anonymous telemetry. We track the version of the
cmdlets you are using, which cmdlet you are executing and which version of SharePoint you are connecting to. Use
Disable-PnPPowerShellTelemetry to turn this off, alternative, use the -NoTelemetry switch on Connect-PnPOnline
to turn it off for that session.

Examples
------------------EXAMPLE 1------------------

Get-PnPPowerShellTelemetryEnabled

Will return true of false.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPProperty
In ths Article

Returns a previously not loaded property of a ClientObject

Syntax
Get-PnPProperty -ClientObject <ClientObject>
-Property <String[]>
[-Connection <SPOnlineConnection>]

Description
Will populate properties of an object and optionally, if needed, load the value from the server. If one property is
specified its value will be returned to the output.

Examples
------------------EXAMPLE 1------------------

$web = Get-PnPWeb
Get-PnPProperty -ClientObject $web -Property Id, Lists
$web.Lists

Will load both the Id and Lists properties of the specified Web object.
------------------EXAMPLE 2------------------

$list = Get-PnPList -Identity 'Site Assets'


Get-PnPProperty -ClientObject $list -Property Views

Will load the views object of the specified list object and return its value to the output.

Parameters
-ClientObject
Specifies the object where the properties of should be retrieved

Type: ClientObject
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Property
The properties to load. If one property is specified its value will be returned to the output.

Type: String[]
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.ClientObject

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPPropertyBag
In ths Article

Returns the property bag values.

Syntax
Get-PnPPropertyBag [-Key <String>]
[-Folder <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPPropertyBag

This will return all web property bag values


------------------EXAMPLE 2------------------

Get-PnPPropertyBag -Key MyKey

This will return the value of the key MyKey from the web property bag
------------------EXAMPLE 3------------------

Get-PnPPropertyBag -Folder /MyFolder

This will return all property bag values for the folder MyFolder which is located in the root of the current web
------------------EXAMPLE 4------------------

Get-PnPPropertyBag -Folder /MyFolder -Key vti_mykey

This will return the value of the key vti_mykey from the folder MyFolder which is located in the root of the current
web
------------------EXAMPLE 5------------------

Get-PnPPropertyBag -Folder / -Key vti_mykey

This will return the value of the key vti_mykey from the root folder of the current web
Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
Site relative url of the folder. See examples for use.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key
Key that should be looked up

Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
SharePointPnP.PowerShell.Commands.PropertyBagValue

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPProvisioningTemplate
In ths Article

Generates a provisioning site template from a web

Syntax
Get-PnPProvisioningTemplate [-Out <String>]
[-IncludeAllTermGroups [<SwitchParameter>]]
[-IncludeSiteCollectionTermGroup [<SwitchParameter>]]
[-IncludeSiteGroups [<SwitchParameter>]]
[-IncludeTermGroupsSecurity [<SwitchParameter>]]
[-IncludeSearchConfiguration [<SwitchParameter>]]
[-PersistBrandingFiles [<SwitchParameter>]]
[-PersistPublishingFiles [<SwitchParameter>]]
[-IncludeNativePublishingFiles [<SwitchParameter>]]
[-IncludeHiddenLists [<SwitchParameter>]]
[-IncludeAllClientSidePages [<SwitchParameter>]]
[-SkipVersionCheck [<SwitchParameter>]]
[-PersistMultiLanguageResources [<SwitchParameter>]]
[-ResourceFilePrefix <String>]
[-Handlers <Handlers>]
[-ExcludeHandlers <Handlers>]
[-ExtensibilityHandlers <ExtensibilityHandler[]>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-ContentTypeGroups <String[]>]
[-Force [<SwitchParameter>]]
[-Encoding <Encoding>]
[-TemplateDisplayName <String>]
[-TemplateImagePreviewUrl <String>]
[-TemplateProperties <Hashtable>]
[-OutputInstance [<SwitchParameter>]]
[-ExcludeContentTypesFromSyndication [<SwitchParameter>]]
[-ListsToExtract <String>]
[-Configuration <ExtractConfigurationPipeBind>]
[-Schema <XMLPnPSchemaVersion>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPProvisioningTemplate -Out template.pnp

Extracts a provisioning template in Office Open XML from the current web.
------------------EXAMPLE 2------------------

Get-PnPProvisioningTemplate -Out template.xml


Extracts a provisioning template in XML format from the current web.
------------------EXAMPLE 3------------------

Get-PnPProvisioningTemplate -Out template.pnp -Schema V201503

Extracts a provisioning template in Office Open XML from the current web and saves it in the V201503 version of
the schema.
------------------EXAMPLE 4------------------

Get-PnPProvisioningTemplate -Out template.pnp -IncludeAllTermGroups

Extracts a provisioning template in Office Open XML from the current web and includes all term groups, term sets
and terms from the Managed Metadata Service Taxonomy.
------------------EXAMPLE 5------------------

Get-PnPProvisioningTemplate -Out template.pnp -IncludeSiteCollectionTermGroup

Extracts a provisioning template in Office Open XML from the current web and includes the term group currently
(if set) assigned to the site collection.
------------------EXAMPLE 6------------------

Get-PnPProvisioningTemplate -Out template.pnp -PersistComposedLookFiles

Extracts a provisioning template in Office Open XML from the current web and saves the files that make up the
composed look to the same folder as where the template is saved.
------------------EXAMPLE 7------------------

Get-PnPProvisioningTemplate -Out template.pnp -Handlers Lists, SiteSecurity

Extracts a provisioning template in Office Open XML from the current web, but only processes lists and site
security when generating the template.
------------------EXAMPLE 8------------------

$handler1 = New-PnPExtensibilityHandlerObject -Assembly Contoso.Core.Handlers -Type


Contoso.Core.Handlers.MyExtensibilityHandler1
$handler2 = New-PnPExtensibilityHandlerObject -Assembly Contoso.Core.Handlers -Type
Contoso.Core.Handlers.MyExtensibilityHandler2
Get-PnPProvisioningTemplate -Out NewTemplate.xml -ExtensibilityHandlers $handler1,$handler2

This will create two new ExtensibilityHandler objects that are run during extraction of the template
------------------EXAMPLE 9------------------
Only supported on SP2016, SP2019 and SP Online

Get-PnPProvisioningTemplate -Out template.pnp -PersistMultiLanguageResources

Extracts a provisioning template in Office Open XML from the current web, and for supported artifacts it will create
a resource file for each supported language (based upon the language settings of the current web). The generated
resource files will be named after the value specified in the Out parameter. For instance if the Out parameter is
specified as -Out 'template.xml' the generated resource file will be called 'template.en-US.resx'.
------------------EXAMPLE 10------------------
Only supported on SP2016, SP2019 and SP Online

Get-PnPProvisioningTemplate -Out template.pnp -PersistMultiLanguageResources -ResourceFilePrefix MyResources

Extracts a provisioning template in Office Open XML from the current web, and for supported artifacts it will create
a resource file for each supported language (based upon the language settings of the current web). The generated
resource files will be named 'MyResources.en-US.resx' etc.
------------------EXAMPLE 11------------------

$template = Get-PnPProvisioningTemplate -OutputInstance

Extracts an instance of a provisioning template object from the current web. This syntax cannot be used together
with the -Out parameter, but it can be used together with any other supported parameters.
------------------EXAMPLE 12------------------

Get-PnPProvisioningTemplate -Out template.pnp -ContentTypeGroups "Group A","Group B"

Extracts a provisioning template in Office Open XML from the current web, but only processes content types from
the to given content type groups.
------------------EXAMPLE 13------------------

Get-PnPProvisioningTemplate -Out template.pnp -ExcludeContentTypesFromSyndication

Extracts a provisioning template in Office Open XML from the current web, excluding content types provisioned
through content type syndication (content type hub), in order to prevent provisioning errors if the target also
provision the content type using syndication.
------------------EXAMPLE 14------------------

Get-PnPProvisioningTemplate -Out template.pnp -ListsToExtract "Title of List One","95c4efd6-08f4-4c67-94ae-


49d696ba1298","Title of List Three"

Extracts a provisioning template in Office Open XML from the current web, including only the lists specified by title
or ID.

Parameters
-Configuration
Specify a JSON configuration file to configure the extraction progress.
Type: ExtractConfigurationPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentTypeGroups
Allows you to specify from which content type group(s) the content types should be included into the template.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Encoding
The encoding type of the XML file, Unicode is default

Type: Encoding
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeContentTypesFromSyndication
Specify whether or not content types issued from a content hub should be exported. By default, these content types
are included.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeHandlers
Allows you to run all handlers, excluding the ones specified.
Type: Handlers
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExtensibilityHandlers
Allows you to specify ExtensibilityHandlers to execute while extracting a template.

Type: ExtensibilityHandler[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the output file if it exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Handlers
Allows you to only process a specific type of artifact in the site. Notice that this might result in a non-working
template, as some of the handlers require other artifacts in place if they are not part of what your extracting. For
possible values for this parameter visit
https://docs.microsoft.com/dotnet/api/officedevpnp.core.framework.provisioning.model.handlers

Type: Handlers
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeAllClientSidePages
If specified all client side pages will be included

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeAllTermGroups
If specified, all term groups will be included. Overrides IncludeSiteCollectionTermGroup.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeHiddenLists
If specified hidden lists will be included in the template

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeNativePublishingFiles
If specified, out of the box / native publishing files will be saved.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeSearchConfiguration
If specified the template will contain the current search configuration of the site.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeSiteCollectionTermGroup
If specified, all the site collection term groups will be included. Overridden by IncludeAllTermGroups.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeSiteGroups
If specified all site groups will be included.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-IncludeTermGroupsSecurity
If specified all the managers and contributors of term groups will be included.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ListsToExtract
Specify the lists to extract, either providing their ID or their Title.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Out
Filename to write to, optionally including full path

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-OutputInstance
Returns the template as an in-memory object, which is an instance of the ProvisioningTemplate type of the PnP
Core Component. It cannot be used together with the -Out parameter.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PersistBrandingFiles
If specified the files used for masterpages, sitelogo, alternate CSS and the files that make up the composed look
will be saved.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PersistMultiLanguageResources
If specified, resource values for applicable artifacts will be persisted to a resource file
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PersistPublishingFiles
If specified the files used for the publishing feature will be saved.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ResourceFilePrefix
If specified, resource files will be saved with the specified prefix instead of using the template name specified. If no
template name is specified the files will be called PnP -Resources.<language>.resx. See examples for more info.
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Schema
The schema of the output to use, defaults to the latest schema

Type: XMLPnPSchemaVersion
Required: False
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-SkipVersionCheck
During extraction the version of the server will be checked for certain actions. If you specify this switch, this check
will be skipped.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateDisplayName
It can be used to specify the DisplayName of the template file that will be extracted.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateImagePreviewUrl
It can be used to specify the ImagePreviewUrl of the template file that will be extracted.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProperties
It can be used to specify custom Properties for the template file that will be extracted.

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while extracting a template.

Type: ITemplateProviderExtension[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPProvisioningTemplateFromGallery
In ths Article

Retrieves or searches provisioning templates from the PnP Template Gallery

Syntax
Get-PnPProvisioningTemplateFromGallery [-Identity <Guid>]
[-Path <String>]
[-Force [<SwitchParameter>]]

Get-PnPProvisioningTemplateFromGallery [-Search <String>]


[-TargetPlatform <TargetPlatform>]
[-TargetScope <TargetScope>]

Examples
------------------EXAMPLE 1------------------

Get-PnPProvisioningTemplateFromGallery

Retrieves all templates from the gallery


------------------EXAMPLE 2------------------

Get-PnPProvisioningTemplateFromGallery -Search "Data"

Searches for a templates containing the word 'Data' in the Display Name
------------------EXAMPLE 3------------------

Get-PnPProvisioningTemplateFromGallery -Identity ae925674-8aa6-438b-acd0-d2699a022edd

Retrieves a template with the specified ID


------------------EXAMPLE 4------------------

$template = Get-PnPProvisioningTemplateFromGallery -Identity ae925674-8aa6-438b-acd0-d2699a022edd


Apply-PnPProvisioningTemplate -InputInstance $template

Retrieves a template with the specified ID and applies it to the site.


------------------EXAMPLE 5------------------
$template = Get-PnPProvisioningTemplateFromGallery -Identity ae925674-8aa6-438b-acd0-d2699a022edd -Path c:\temp

Retrieves a template with the specified ID and saves the template to the specified path

Parameters
-Force

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity

Type: Guid
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Search

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TargetPlatform

Type: TargetPlatform
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TargetScope

Type: TargetScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPPublishingImageRendition
In ths Article

Returns all image renditions or if Identity is specified a specific one

Syntax
Get-PnPPublishingImageRendition [-Identity <ImageRenditionPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPPublishingImageRendition

Returns all Image Renditions


------------------EXAMPLE 2------------------

Get-PnPPublishingImageRendition -Identity "Test"

Returns the image rendition named "Test"


------------------EXAMPLE 3------------------

Get-PnPPublishingImageRendition -Identity 2

Returns the image rendition where its id equals 2

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Id or name of an existing image rendition

Type: ImageRenditionPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Publishing.ImageRendition

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPRecycleBinItem
In ths Article

Returns the items in the recycle bin from the context

Syntax
Get-PnPRecycleBinItem [-Identity <GuidPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPRecycleBinItem [-FirstStage [<SwitchParameter>]]


[-RowLimit <Int>]
[-Connection <SPOnlineConnection>]

Get-PnPRecycleBinItem [-SecondStage [<SwitchParameter>]]


[-RowLimit <Int>]
[-Connection <SPOnlineConnection>]

Get-PnPRecycleBinItem [-RowLimit <Int>]


[-Connection <SPOnlineConnection>]

Get-PnPRecycleBinItem [-Includes <String[]>]


[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPRecycleBinItem

Returns all items in both the first and the second stage recycle bins in the current site collection
------------------EXAMPLE 2------------------

Get-PnPRecycleBinItem -Identity f3ef6195-9400-4121-9d1c-c997fb5b86c2

Returns all a specific recycle bin item by id


------------------EXAMPLE 3------------------

Get-PnPRecycleBinItem -FirstStage
Returns all items in only the first stage recycle bin in the current site collection
------------------EXAMPLE 4------------------

Get-PnPRecycleBinItem -SecondStage

Returns all items in only the second stage recycle bin in the current site collection
------------------EXAMPLE 5------------------

Get-PnPRecycleBinItem -RowLimit 10000

Returns items in recycle bin limited by number of results

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FirstStage
Return all items in the first stage recycle bin

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Returns a recycle bin item with a specific identity

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.
Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-RowLimit
Limits return results to specified amount
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SecondStage
Return all items in the second stage recycle bin

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.RecycleBinItem

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPRequestAccessEmails
In ths Article

Returns the request access e-mail addresses

Syntax
Get-PnPRequestAccessEmails [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPRequestAccessEmails

This will return all the request access e-mail addresses for the current web

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
List<System.String>

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPRoleDefinition
In ths Article

Retrieves a Role Definitions of a site

Syntax
Get-PnPRoleDefinition [-Identity <RoleDefinitionPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPRoleDefinition

Retrieves the Role Definitions (Permission Levels) settings of the current site
------------------EXAMPLE 2------------------

Get-PnPRoleDefinition -Identity Read

Retrieves the specified Role Definition (Permission Level) settings of the current site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The name of a role definition to retrieve.
Type: RoleDefinitionPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.RoleDefinition

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSearchConfiguration
In ths Article

Returns the search configuration

Syntax
Get-PnPSearchConfiguration [-Path <String>]
[-Scope <SearchConfigurationScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPSearchConfiguration [-OutputFormat <OutputFormat>]


[-Scope <SearchConfigurationScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSearchConfiguration

Returns the search configuration for the current web


------------------EXAMPLE 2------------------

Get-PnPSearchConfiguration -Scope Site

Returns the search configuration for the current site collection


------------------EXAMPLE 3------------------

Get-PnPSearchConfiguration -Scope Subscription

Returns the search configuration for the current tenant


------------------EXAMPLE 4------------------

Get-PnPSearchConfiguration -Path searchconfig.xml -Scope Subscription

Returns the search configuration for the current tenant and saves it to the specified file
------------------EXAMPLE 5------------------
Get-PnPSearchConfiguration -Scope Site -OutputFormat ManagedPropertyMappings

Returns all custom managed properties and crawled property mapping at the current site collection

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OutputFormat
Output format for of the configuration. Defaults to complete XML

Type: OutputFormat
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Local path where the search configuration will be saved

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Scope to use. Either Web, Site, or Subscription. Defaults to Web

Type: SearchConfigurationScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.String
Does not return a string when the -Path parameter has been specified.

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSearchCrawlLog
In ths Article

Returns entries from the SharePoint search crawl log. Make sure you are granted access to the crawl log via the
SharePoint search admin center at https://<tenant>-
admin.sharepoint.com/_layouts/15/searchadmin/crawllogreadpermission.aspx in order to run this cmdlet.

Syntax
Get-PnPSearchCrawlLog [-LogLevel <LogLevel>]
[-RowLimit <Int>]
[-Filter <String>]
[-ContentSource <ContentSource>]
[-StartDate <DateTime>]
[-EndDate <DateTime>]
[-RawFormat [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSearchCrawlLog

Returns the last 100 crawl log entries for site content.
------------------EXAMPLE 2------------------

Get-PnPSearchCrawlLog -Filter "https://-my.sharepoint.com/personal"

Returns the last 100 crawl log entries for OneDrive content.
------------------EXAMPLE 3------------------

Get-PnPSearchCrawlLog -ContentSource UserProfiles

Returns the last 100 crawl log entries for user profiles.
------------------EXAMPLE 4------------------

Get-PnPSearchCrawlLog -ContentSource UserProfiles -Filter "mikael"

Returns the last 100 crawl log entries for user profiles with the term "mikael" in the user principal name.
------------------EXAMPLE 5------------------
Get-PnPSearchCrawlLog -ContentSource Sites -LogLevel Error -RowLimit 10

Returns the last 10 crawl log entries with a state of Error for site content.
------------------EXAMPLE 6------------------

Get-PnPSearchCrawlLog -EndDate (Get-Date).AddDays(-100)

Returns the last 100 crawl log entries up until 100 days ago.
------------------EXAMPLE 7------------------

Get-PnPSearchCrawlLog -RowFilter 3 -RawFormat

Returns the last 3 crawl log entries showing the raw crawl log data.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentSource
Content to retrieve (Sites, User Profiles). Defaults to Sites.

Type: ContentSource
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
End date to stop getting entries from. Default to current time.

Type: DateTime
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Filter to limit what is being returned. Has to be a URL prefix for SharePoint content, and part of a user principal
name for user profiles. Wildcard characters are not supported.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LogLevel
Filter what log entries to return (All, Success, Warning, Error). Defaults to All

Type: LogLevel
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RawFormat
Show raw crawl log data

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RowLimit
Number of entries to return. Defaults to 100.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
Start date to start getting entries from. Defaults to start of time.

Type: DateTime
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSearchSettings
In ths Article

Retrieves search settings for a site

Syntax
Get-PnPSearchSettings [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSearchSettings

Retrieve search settings for the site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSite
In ths Article

Returns the current site collection from the context.

Syntax
Get-PnPSite [-Includes <String[]>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSite

Gets the current site


------------------EXAMPLE 2------------------

Get-PnPSite -Includes RootWeb,ServerRelativeUrl

Gets the current site specifying to include RootWeb and ServerRelativeUrl properties. For the full list of properties
see https://docs.microsoft.com/previous-versions/office/sharepoint-server/ee538579(v%3doffice.15)

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.
Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Site

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteClassification
In ths Article

Returns the defined Site Classifications for the tenant. Requires a connection to the Microsoft Graph.

Examples
------------------EXAMPLE 1------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Get-PnPSiteClassification

Returns the currently set site classifications for the tenant.

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteClosure
In ths Article

Get the site closure status of the site which has a site policy applied

Syntax
Get-PnPSiteClosure [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSiteClosure

Get the site closure status of the site.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteCollectionAdmin
In ths Article

Returns the current site collection administrators of the site collection in the current context

Syntax
Get-PnPSiteCollectionAdmin [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
This command will return all current site collection administrators of the site collection in the current context

Examples
------------------EXAMPLE 1------------------

Get-PnPSiteCollectionAdmin

This will return all the current site collection administrators of the site collection in the current context

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.User

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteCollectionTermStore
In ths Article

Returns the site collection term store

Syntax
Get-PnPSiteCollectionTermStore [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSiteCollectionTermStore

Returns the site collection term store.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Taxonomy.TermStore

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteDesign
In ths Article

Retrieve Site Designs that have been registered on the current tenant.

Syntax
Get-PnPSiteDesign [-Identity <TenantSiteDesignPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSiteDesign

Returns all registered site designs


------------------EXAMPLE 2------------------

Get-PnPSiteDesign -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd

Returns a specific registered site designs

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
If specified will retrieve the specified site design
Type: TenantSiteDesignPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteDesignRights
In ths Article

Returns the principals with design rights on a specific Site Design

Syntax
Get-PnPSiteDesignRights -Identity <TenantSiteDesignPipeBind>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSiteDesignRights -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd

Returns the principals with rights on a specific site design

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the Site Design to receive the rights for

Type: TenantSiteDesignPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteDesignRun
In ths Article

Retrieves a list of site designs applied to a specified site collection. If the WebUrl parameter is not specified we
show the list of designs applied to the current site. The returned output includes the ID of the scheduled job, the
web and site IDs, and the site design ID, version, and title.

Syntax
Get-PnPSiteDesignRun [-SiteDesignId <GuidPipeBind>]
[-WebUrl <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSiteDesignRun

This example returns a list of the site designs applied to the current site. Providing a specific site design ID will
return the details for just that applied site design.
------------------EXAMPLE 2------------------

Get-PnPSiteDesignRun -WebUrl https://mytenant.sharepoint.com/sites/project

This example returns a list of the site designs applied to the specified site. Providing a specific site design ID will
return the details for just that applied site design.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SiteDesignId
The ID of the site design to apply.
Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebUrl
The URL of the site collection where the site design will be applied. If not specified the design will be applied to the
site you connected to with Connect-PnPOnline.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteDesignRunStatus
In ths Article

Retrieves and displays a list of all site script actions executed for a specified site design applied to a site.

Syntax
Get-PnPSiteDesignRunStatus -Run <TenantSiteDesignRun>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

$myrun = Get-PnPSiteDesignRun -WebUrl "https://contoso.sharepoint.com/sites/project-playbook" -SiteDesignId


cefd782e-sean-4814-a68a-b33b116c302f
Get-PnPSiteDesignRunStatus -Run $myrun

This example gets the run for a specific site design applied to a site and sets it to a variable. This variable is then
passed into the command -Run parameter. The result is a display of all the site script actions applied for that site
design run, including the script action title and outcome.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Run
The site design run for the desired set of script action details.

Type: TenantSiteDesignRun
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteDesignTask
In ths Article

Used to retrieve a scheduled site design script. It takes the ID of the scheduled site design and the URL for the site
where the site design is scheduled to be applied.

Syntax
Get-PnPSiteDesignTask [-Identity <TenantSiteDesignTaskPipeBind>]
[-WebUrl <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSiteDesignTask -Identity 501z8c32-4147-44d4-8607-26c2f67cae82

This example retrieves a site design task given the provided site design task id
------------------EXAMPLE 2------------------

Get-PnPSiteDesignTask

This example retrieves all site design tasks currently scheduled on the current site.
------------------EXAMPLE 3------------------

Get-PnPSiteDesignTask -WebUrl "https://contoso.sharepoint.com/sites/project"

This example retrieves all site design tasks currently scheduled on the provided site.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The ID of the site design to apply.

Type: TenantSiteDesignTaskPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebUrl
The URL of the site collection where the site design will be applied. If not specified the design will be applied to the
site you connected to with Connect-PnPOnline.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSitePolicy
In ths Article

Retrieves all or a specific site policy

Syntax
Get-PnPSitePolicy [-AllAvailable [<SwitchParameter>]]
[-Name <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSitePolicy

Retrieves the current applied site policy.


------------------EXAMPLE 2------------------

Get-PnPSitePolicy -AllAvailable

Retrieves all available site policies.


------------------EXAMPLE 3------------------

Get-PnPSitePolicy -Name "Contoso HBI"

Retrieves an available site policy with the name "Contoso HBI".

Parameters
-AllAvailable
Retrieve all available site policies

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
Retrieves a site policy with a specific name

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
OfficeDevPnP.Core.Entities.SitePolicyEntity

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteScript
In ths Article

Retrieve Site Scripts that have been registered on the current tenant.

Syntax
Get-PnPSiteScript [-Identity <TenantSiteScriptPipeBind>]
[-SiteDesign <TenantSiteDesignPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSiteScript

Returns all registered site scripts


------------------EXAMPLE 2------------------

Get-PnPSiteScript -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd

Returns a specific registered site script

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
If specified will retrieve the specified site script
Type: TenantSiteScriptPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-SiteDesign
If specified will retrieve the site scripts for this design

Type: TenantSiteDesignPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSiteSearchQueryResults
In ths Article

Executes a search query to retrieve indexed site collections

Syntax
Get-PnPSiteSearchQueryResults [-StartRow <Int>]
[-MaxResults <Int>]
[-Query <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPSiteSearchQueryResults [-All [<SwitchParameter>]]


[-Query <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSiteSearchQueryResults

Returns the top 500 site collections indexed by SharePoint Search


------------------EXAMPLE 2------------------

Get-PnPSiteSearchQueryResults -Query "WebTemplate:STS"

Returns the top 500 site collections indexed by SharePoint Search which have are based on the STS (Team Site)
template
------------------EXAMPLE 3------------------

Get-PnPSiteSearchQueryResults -Query "WebTemplate:SPSPERS"

Returns the top 500 site collections indexed by SharePoint Search which have are based on the SPSPERS (MySite)
template, up to the MaxResult limit
------------------EXAMPLE 4------------------

Get-PnPSiteSearchQueryResults -Query "Title:Intranet*"

Returns the top 500 site collections indexed by SharePoint Search of which the title starts with the word Intranet
------------------EXAMPLE 5------------------

Get-PnPSiteSearchQueryResults -MaxResults 10

Returns the top 10 site collections indexed by SharePoint Search


------------------EXAMPLE 6------------------

Get-PnPSiteSearchQueryResults -All

Returns absolutely all site collections indexed by SharePoint Search

Parameters
-All
Automatically page results until the end to get more than 500 sites. Use with caution!

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MaxResults
Maximum amount of search results to return. Default and max is 500 search results.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Query
Search query in Keyword Query Language (KQL ) to execute to refine the returned sites. If omitted, all indexed sites
will be returned.

Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False
-StartRow
Search result item to start returning the results from. Useful for paging. Leave at 0 to return all results.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
List<System.Object>

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPStorageEntity
In ths Article

Retrieve Storage Entities / Farm Properties from either the Tenant App Catalog or from the current site if it has a
site scope app catalog.

Syntax
Get-PnPStorageEntity [-Key <String>]
[-Scope <StorageEntityScope>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPStorageEntity

Returns all site storage entities/farm properties


------------------EXAMPLE 2------------------

Get-PnPStorageEntity -Key MyKey

Returns the storage entity/farm property with the given key.


------------------EXAMPLE 3------------------

Get-PnPStorageEntity -Scope Site

Returns all site collection scoped storage entities


------------------EXAMPLE 4------------------

Get-PnPStorageEntity -Key MyKey -Scope Site

Returns the storage entity from the site collection with the given key

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key
The key of the value to retrieve.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Defines the scope of the storage entity. Defaults to Tenant.

Type: StorageEntityScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPStoredCredential
In ths Article

Get a credential

Syntax
Get-PnPStoredCredential -Name <String>
[-Type <CredentialType>]

Description
Returns a stored credential from the Windows Credential Manager

Examples
------------------EXAMPLE 1------------------

Get-PnPStoredCredential -Name O365

Returns the credential associated with the specified identifier


------------------EXAMPLE 2------------------

Get-PnPStoredCredential -Name testEnvironment -Type OnPrem

Gets the credential associated with the specified identifier from the credential manager and then will return a
credential that can be used for on-premises authentication

Parameters
-Name
The credential to retrieve.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Type
The object type of the credential to return from the Credential Manager. Possible values are 'O365', 'OnPrem' or
'PSCredential'
Type: CredentialType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPSubWebs
In ths Article

Returns the subwebs of the current web

Syntax
Get-PnPSubWebs [-Includes <String[]>]
[-Identity <WebPipeBind>]
[-Recurse [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPSubWebs

Retrieves all subsites of the current context returning the Id, Url, Title and ServerRelativeUrl of each subsite in the
output
------------------EXAMPLE 2------------------

Get-PnPSubWebs -Recurse

Retrieves all subsites of the current context and all of their nested child subsites returning the Id, Url, Title and
ServerRelativeUrl of each subsite in the output
------------------EXAMPLE 3------------------

Get-PnPSubWebs -Recurse -Includes "WebTemplate","Description" | Select ServerRelativeUrl, WebTemplate,


Description

Retrieves all subsites of the current context and shows the ServerRelativeUrl, WebTemplate and Description
properties in the resulting output
------------------EXAMPLE 4------------------

Get-PnPSubWebs -Identity Team1 -Recurse

Retrieves all subsites of the subsite Team1 and all of its nested child subsites returning the Id, Url, Title and
ServerRelativeUrl of each subsite in the output

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
If provided, only the subsite with the provided Id, GUID or the Web instance will be returned

Type: WebPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Recurse
If provided, recursion through all subsites and their children will take place to return them as well

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Web

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTaxonomyItem
In ths Article

Returns a taxonomy item

Syntax
Get-PnPTaxonomyItem -TermPath <String>
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermPath
The path, delimited by | of the taxonomy item to retrieve, alike GROUPLABEL|TERMSETLABEL|TERMLABEL

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Taxonomy.TaxonomyItem

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTaxonomySession
In ths Article

Returns a taxonomy session

Syntax
Get-PnPTaxonomySession [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Taxonomy.TaxonomySession

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenant
In ths Article

Returns organization-level site collection properties

Syntax
Get-PnPTenant [-Connection <SPOnlineConnection>]

Description
Returns organization-level site collection properties such as StorageQuota, StorageQuotaAllocated,
ResourceQuota, ResourceQuotaAllocated, and SiteCreationMode.
Currently, there are no parameters for this cmdlet.
You must be a SharePoint Online global administrator to run the cmdlet.

Examples
------------------EXAMPLE 1------------------

Get-PnPTenant

This example returns all tenant settings

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantAppCatalogUrl
In ths Article

Retrieves the url of the tenant scoped app catalog.

Syntax
Get-PnPTenantAppCatalogUrl [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantAppCatalogUrl

Returns the url of the tenant scoped app catalog site collection

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantCdnEnabled
In ths Article

Retrieves if the Office 365 Content Delivery Network has been enabled.

Syntax
Get-PnPTenantCdnEnabled -CdnType <SPOTenantCdnType>
[-Connection <SPOnlineConnection>]

Description
Enables or disabled the public or private Office 365 Content Delivery Network (CDN ).

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantCdnEnabled -CdnType Public

Returns the enabled status of the specified CDN

Parameters
-CdnType
The type of cdn to retrieve the origins from

Type: SPOTenantCdnType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantCdnOrigin
In ths Article

Returns the current registered origins from the public or private content delivery network (CDN ).

Syntax
Get-PnPTenantCdnOrigin -CdnType <SPOTenantCdnType>
[-Connection <SPOnlineConnection>]

Description
Returns the current registered origins from the public or private content delivery network (CDN ).

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantCdnOrigin -CdnType Public

Returns the configured CDN origins for the specified CDN type

Parameters
-CdnType
The type of cdn to retrieve the origins from

Type: SPOTenantCdnType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantCdnPolicies
In ths Article

Returns the CDN Policies for the specified CDN (Public | Private).

Syntax
Get-PnPTenantCdnPolicies -CdnType <SPOTenantCdnType>
[-Connection <SPOnlineConnection>]

Description
Enables or disabled the public or private Office 365 Content Delivery Network (CDN ).

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantCdnPolicies -CdnType Public

Returns the policies for the specified CDN type

Parameters
-CdnType
The type of cdn to retrieve the policies from

Type: SPOTenantCdnType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantId
In ths Article

Returns the Tenant ID

Syntax
Get-PnPTenantId [-TenantUrl <String>]

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantId

Returns the current Tenant Id. A valid connection with Connect-PnPOnline is required.
------------------EXAMPLE 2------------------

Get-PnPTenantId -TenantUrl https://contoso.sharepoint.com

Returns the Tenant ID for the specified tenant. Can be executed without a connecting first with Connect-PnPOnline

Parameters
-TenantUrl

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantRecycleBinItem
In ths Article

Returns all modern and classic site collections in the tenant scoped recycle bin

Syntax
Get-PnPTenantRecycleBinItem [-Connection <SPOnlineConnection>]

Description
This command will return all the items in the tenant recycle bin for the Office 365 tenant you are connected to. Be
sure to connect to the SharePoint Online Admin endpoint (https://yourtenantname-admin.sharepoint.com) in order
for this command to work.

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantRecycleBinItem

Returns all modern and classic site collections in the tenant scoped recycle bin

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.Online.SharePoint.TenantAdministration.DeletedSiteProperties

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantSequence
In ths Article

Returns one ore more provisioning sequence object(s) from a tenant template

Syntax
Get-PnPTenantSequence -Template <ProvisioningHierarchy>
[-Identity <ProvisioningSequencePipeBind>]

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantSequence -Template $myTemplateObject

Returns all sequences from the specified tenant template


------------------EXAMPLE 2------------------

Get-PnPTenantSequence -Template $myTemplateObject -Identity "mysequence"

Returns the specified sequence from the specified tenant template

Parameters
-Identity
Optional Id of the sequence
Only applicable to: SharePoint Online

Type: ProvisioningSequencePipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Template
The template to retrieve the sequence from
Only applicable to: SharePoint Online
Type: ProvisioningHierarchy
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantSequenceSite
In ths Article

Returns one ore more sites from a tenant template

Syntax
Get-PnPTenantSequenceSite -Sequence <ProvisioningSequence>
[-Identity <ProvisioningSitePipeBind>]

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantSequenceSite -Sequence $mysequence

Returns all sites from the specified sequence


------------------EXAMPLE 2------------------

Get-PnPTenantSequenceSite -Sequence $mysequence -Identity 8058ea99-af7b-4bb7-b12a-78f93398041e

Returns the specified site from the specified sequence

Parameters
-Identity
Optional Id of the site
Only applicable to: SharePoint Online

Type: ProvisioningSitePipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Sequence
The sequence to retrieve the site from
Only applicable to: SharePoint Online
Type: ProvisioningSequence
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantServicePrincipal
In ths Article

Returns the current tenant's "SharePoint Online Client" service principal.

Syntax
Get-PnPTenantServicePrincipal [-Connection <SPOnlineConnection>]

Description
Returns the current tenant's "SharePoint Online Client" service principal.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantServicePrincipalPermissionGrants
In ths Article

Gets the collection of permission grants for the "SharePoint Online Client" service principal

Syntax
Get-PnPTenantServicePrincipalPermissionGrants [-Connection <SPOnlineConnection>]

Description
Gets the collection of permission grants for the "SharePoint Online Client" service principal.
A permission grant contains the following properties:
ClientId: The objectId of the service principal granted consent to impersonate the user when accessing the
resource(represented by the resourceId).
ConsentType: Whether consent was provided by the administrator on behalf of the organization or whether
consent was provided by an individual.The possible values are "AllPrincipals" or "Principal".
ObjectId: The unique identifier for the permission grant.
Resource: The resource to which access has been granted (Coming soon)
ResourceId: The objectId of the resource service principal to which access has been granted.
Scope: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantServicePrincipalPermissionRequests
In ths Article

Gets the collection of permission requests for the "SharePoint Online Client" service principal

Syntax
Get-PnPTenantServicePrincipalPermissionRequests [-Connection <SPOnlineConnection>]

Description
Gets the collection of permission requests for the "SharePoint Online Client" service principal.
Permission request object
A permission request contains the following properties:
Id: The identifier of the request.
Resource: The resource that the application requires access to.
Scope: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantSite
In ths Article

Retrieve site information.

Syntax
Get-PnPTenantSite [-Url <String>]
[-Template <String>]
[-Detailed [<SwitchParameter>]]
[-IncludeOneDriveSites [<SwitchParameter>]]
[-Filter <String>]
[-Connection <SPOnlineConnection>]

Description
Use this cmdlet to retrieve site information from your tenant administration.

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantSite

Returns all site collections


------------------EXAMPLE 2------------------

Get-PnPTenantSite -Url http://tenant.sharepoint.com/sites/projects

Returns information about the project site


------------------EXAMPLE 3------------------

Get-PnPTenantSite -Detailed

Returns all sites with the full details of these sites


------------------EXAMPLE 4------------------

Get-PnPTenantSite -IncludeOneDriveSites

Returns all sites including all OneDrive for Business sites


------------------EXAMPLE 5------------------
Get-PnPTenantSite -IncludeOneDriveSites -Filter "Url -like '-my.sharepoint.com/personal/'"

Returns all OneDrive for Business sites


------------------EXAMPLE 6------------------

Get-PnPTenantSite -Template SITEPAGEPUBLISHING#0

Returns all Communication sites


------------------EXAMPLE 7------------------

Get-PnPTenantSite -Filter "Url -like 'sales'"

Returns all sites including 'sales' in the url

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Detailed
By default, not all returned attributes are populated. This switch populates all attributes. It can take several seconds
to run. Without this, some attributes will show default values that may not be correct.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies the script block of the server-side filter to apply. See https://technet.microsoft.com/en-
us/library/fp161380.aspx

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeOneDriveSites
By default, the OneDrives are not returned. This switch includes all OneDrives.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Template
By default, all sites will be returned. Specify a template value alike "STS#0" here to filter on the template

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The URL of the site

Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Outputs
Microsoft.Online.SharePoint.TenantAdministration.SiteProperties

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantTemplate
In ths Article

Generates a provisioning tenant template from a site. If the site is a hubsite any connected site will be included.

Syntax
Get-PnPTenantTemplate -Out <String>
[-SiteUrl <String>]
[-Force [<SwitchParameter>]]
[-Configuration <ExtractConfigurationPipeBind>]
[-Connection <SPOnlineConnection>]

Get-PnPTenantTemplate -AsInstance [<SwitchParameter>]


[-SiteUrl <String>]
[-Configuration <ExtractConfigurationPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantTemplate -Out tenanttemplate.xml

Extracts a tenant template

Parameters
-AsInstance
Returns the template as an in-memory object, which is an instance of the ProvisioningHierarchy type of the PnP
Core Component. It cannot be used together with the -Out parameter.
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Configuration
Specify a JSON configuration file to configure the extraction progress.
Only applicable to: SharePoint Online
Type: ExtractConfigurationPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the output file if it exists.
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Out
Filename to write to, optionally including full path
Only applicable to: SharePoint Online

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-SiteUrl
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTenantTheme
In ths Article

Returns all or a specific theme

Syntax
Get-PnPTenantTheme [-Name <String>]
[-Connection <SPOnlineConnection>]

Description
Returns all or a specific tenant theme.

Examples
------------------EXAMPLE 1------------------

Get-PnPTenantTheme

Returns all themes


------------------EXAMPLE 2------------------

Get-PnPTenantTheme -Name "MyCompanyTheme"

Returns the specified theme

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the theme to retrieve
Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTerm
In ths Article

Returns a taxonomy term

Syntax
Get-PnPTerm [-Includes <String[]>]
[-IncludeChildTerms [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Get-PnPTerm -Identity <Id, Name or Object>


[-TermStore <Id, Name or Object>]
[-IncludeChildTerms [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Get-PnPTerm -TermSet <Id, Title or TaxonomyItem>


-TermGroup <Id, Title or TermGroup>
[-Identity <Id, Name or Object>]
[-TermStore <Id, Name or Object>]
[-Recursive [<SwitchParameter>]]
[-IncludeChildTerms [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPTerm -TermSet "Departments" -TermGroup "Corporate"

Returns all term in the termset "Departments" which is in the group "Corporate" from the site collection termstore
------------------EXAMPLE 2------------------

Get-PnPTerm -Identity "Finance" -TermSet "Departments" -TermGroup "Corporate"

Returns the term named "Finance" in the termset "Departments" from the termgroup called "Corporate" from the
site collection termstore
------------------EXAMPLE 3------------------

Get-PnPTerm -Identity ab2af486-e097-4b4a-9444-527b251f1f8d -TermSet "Departments" -TermGroup "Corporate"

Returns the term named with the given id, from the "Departments" termset in a term group called "Corporate"
from the site collection termstore
------------------EXAMPLE 4------------------

Get-PnPTerm -Identity "Small Finance" -TermSet "Departments" -TermGroup "Corporate" -Recursive

Returns the term named "Small Finance", from the "Departments" termset in a term group called "Corporate" from
the site collection termstore even if it's a subterm below "Finance"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Id or Name of a Term

Type: Id, Name or Object


Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeChildTerms
Includes the hierarchy of child terms if available

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Recursive
Find the first term recursively matching the label in a term hierarchy.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermGroup
Name of the termgroup to check.

Type: Id, Title or TermGroup


Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-TermSet
Name of the termset to check.

Type: Id, Title or TaxonomyItem


Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-TermStore
Term store to check; if not specified the default term store is used.

Type: Id, Name or Object


Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Taxonomy.Term

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTermGroup
In ths Article

Returns a taxonomy term group

Syntax
Get-PnPTermGroup [-Includes <String[]>]
[-Identity <Id, Title or TaxonomyItem>]
[-TermStore <Id, Name or Object>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPTermGroup

Returns all Term Groups in the site collection termstore


------------------EXAMPLE 2------------------

Get-PnPTermGroup -Identity "Departments"

Returns the termgroup named "Departments" from the site collection termstore
------------------EXAMPLE 3------------------

Get-PnPTermGroup -Identity ab2af486-e097-4b4a-9444-527b251f1f8d

Returns the termgroup with the given ID from the site collection termstore

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Name of the taxonomy term group to retrieve.

Type: Id, Title or TaxonomyItem


Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-TermStore
Term store to check; if not specified the default term store is used.

Type: Id, Name or Object


Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Taxonomy.TermGroup

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTermSet
In ths Article

Returns a taxonomy term set

Syntax
Get-PnPTermSet -TermGroup <Id, Title or TermGroup>
[-Includes <String[]>]
[-Identity <Id, Name or Object>]
[-TermStore <Id, Name or Object>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPTermSet -TermGroup "Corporate"

Returns all termsets in the group "Corporate" from the site collection termstore
------------------EXAMPLE 2------------------

Get-PnPTermSet -Identity "Departments" -TermGroup "Corporate"

Returns the termset named "Departments" from the termgroup called "Corporate" from the site collection
termstore
------------------EXAMPLE 3------------------

Get-PnPTermSet -Identity ab2af486-e097-4b4a-9444-527b251f1f8d -TermGroup "Corporate

Returns the termset with the given id from the termgroup called "Corporate" from the site collection termstore

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Id or Name of a termset

Type: Id, Name or Object


Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-TermGroup
Name of the term group to check.

Type: Id, Title or TermGroup


Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-TermStore
Term store to check; if not specified the default term store is used.

Type: Id, Name or Object


Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Taxonomy.TermSet

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTheme
In ths Article

Returns the current theme/composed look of the current web.

Syntax
Get-PnPTheme [-DetectCurrentComposedLook [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPTheme

Returns the current composed look of the current web.


------------------EXAMPLE 2------------------

Get-PnPTheme -DetectCurrentComposedLook

Returns the current composed look of the current web, and will try to detect the currently applied composed look
based upon the actual site. Without this switch the cmdlet will first check for the presence of a property bag
variable called _PnP_ProvisioningTemplateComposedLookInfo that contains composed look information when
applied through the provisioning engine or the Set-PnPTheme cmdlet.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DetectCurrentComposedLook
Specify this switch to not use the PnP Provisioning engine based composed look information but try to detect the
current composed look as is.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
OfficeDevPnP.Core.Entities.ThemeEntity

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPTimeZoneId
In ths Article

Returns a time zone ID

Syntax
Get-PnPTimeZoneId [-Match <String>]

Description
In order to create a new classic site you need to specify the timezone this site will use. Use the cmdlet to retrieve a
list of possible values.

Examples
------------------EXAMPLE 1------------------

Get-PnPTimeZoneId

This will return all time zone IDs in use by Office 365.
------------------EXAMPLE 2------------------

Get-PnPTimeZoneId -Match Stockholm

This will return the time zone IDs for Stockholm

Parameters
-Match
A string to search for like 'Stockholm'

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

Outputs
List<SharePointPnP.PowerShell.Commands.GetTimeZoneId+Zone>
Returns a list of matching zones. Use the ID property of the object for use in New -SPOTenantSite
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPUnifiedAuditLog
In ths Article

Gets unified audit logs from the Office 365 Management API. Requires the Azure Active Directory application
permission 'ActivityFeed.Read'.

Syntax
Get-PnPUnifiedAuditLog [-ContentType <AuditContentType>]
[-StartTime <DateTime>]
[-EndTime <DateTime>]

Examples
------------------EXAMPLE 1------------------

Get-PnPUnifiedAuditLog -ContentType SharePoint -StartTime (Get-Date).AddDays(-1) -EndTime (Get-Date).AddDays(-


2)

Retrieves the audit logs of SharePoint happening between the current time yesterday and the current time the day
before yesterday

Parameters
-ContentType
Content type of logs to be retrieved, should be one of the following: AzureActiveDirectory, Exchange, SharePoint,
General, DLP.

Type: AuditContentType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
End time of logs to be retrieved. Start time and end time must both be specified (or both omitted) and must be less
than or equal to 24 hours apart.

Type: DateTime
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-StartTime
Start time of logs to be retrieved. Start time and end time must both be specified (or both omitted) and must be
less than or equal to 24 hours apart, with the start time prior to end time and start time no more than 7 days in the
past.

Type: DateTime
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPUnifiedGroup
In ths Article

Gets one Office 365 Group (aka Unified Group) or a list of Office 365 Groups. Requires the Azure Active Directory
application permission 'Group.Read.All'.

Syntax
Get-PnPUnifiedGroup [-Identity <UnifiedGroupPipeBind>]
[-ExcludeSiteUrl [<SwitchParameter>]]
[-IncludeClassification [<SwitchParameter>]]

Examples
------------------EXAMPLE 1------------------

Get-PnPUnifiedGroup

Retrieves all the Office 365 Groups


------------------EXAMPLE 2------------------

Get-PnPUnifiedGroup -Identity $groupId

Retrieves a specific Office 365 Group based on its ID


------------------EXAMPLE 3------------------

Get-PnPUnifiedGroup -Identity $groupDisplayName

Retrieves a specific or list of Office 365 Groups that start with the given DisplayName
------------------EXAMPLE 4------------------

Get-PnPUnifiedGroup -Identity $groupSiteMailNickName

Retrieves a specific or list of Office 365 Groups for which the email starts with the provided mail nickName
------------------EXAMPLE 5------------------

Get-PnPUnifiedGroup -Identity $group

Retrieves a specific Office 365 Group based on its object instance


Parameters
-ExcludeSiteUrl
Exclude fetching the site URL for Office 365 Groups. This speeds up large listings.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Identity of the Office 365 Group.

Type: UnifiedGroupPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeClassification
Include Classification value of Office 365 Groups.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPUnifiedGroupMembers
In ths Article

Gets members of a particular Office 365 Group (aka Unified Group). Requires the Azure Active Directory
application permissions 'Group.Read.All' and 'User.Read.All'.

Syntax
Get-PnPUnifiedGroupMembers -Identity <UnifiedGroupPipeBind>

Examples
------------------EXAMPLE 1------------------

Get-PnPUnifiedGroupMembers -Identity $groupId

Retrieves all the members of a specific Office 365 Group based on its ID
------------------EXAMPLE 2------------------

Get-PnPUnifiedGroupMembers -Identity $group

Retrieves all the members of a specific Office 365 Group based on the group's object instance

Parameters
-Identity
The Identity of the Office 365 Group.

Type: UnifiedGroupPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPUnifiedGroupOwners
In ths Article

Gets owners of a particular Office 365 Group (aka Unified Group). Requires the Azure Active Directory application
permissions 'Group.Read.All' and 'User.Read.All'.

Syntax
Get-PnPUnifiedGroupOwners -Identity <UnifiedGroupPipeBind>

Examples
------------------EXAMPLE 1------------------

Get-PnPUnifiedGroupOwners -Identity $groupId

Retrieves all the owners of a specific Office 365 Group based on its ID
------------------EXAMPLE 2------------------

Get-PnPUnifiedGroupOwners -Identity $group

Retrieves all the owners of a specific Office 365 Group based on the group's object instance

Parameters
-Identity
The Identity of the Office 365 Group.

Type: UnifiedGroupPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPUPABulkImportStatus
In ths Article

Get user profile bulk import status.

Syntax
Get-PnPUPABulkImportStatus [-JobId <GuidPipeBind>]
[-IncludeErrorDetails [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
Retrieve information about the status of submitted user profile bulk upload jobs.

Examples
------------------EXAMPLE 1------------------

Get-PnPUPABulkImportStatus

This will list the status of all submitted user profile bulk import jobs.
------------------EXAMPLE 2------------------

Get-PnPUPABulkImportStatus -IncludeErrorDetails

This will list the status of all submitted user profile bulk import jobs, and if it contains an error it will include the
error log messages if present.
------------------EXAMPLE 3------------------

Get-PnPUPABulkImportStatus -JobId

This will list the status for the specified import job.
------------------EXAMPLE 4------------------

Get-PnPUPABulkImportStatus -JobId -IncludeErrorDetails

This will list the status for the specified import job, and if it contains an error it will include the error log messages if
present.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IncludeErrorDetails
Include error log details

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-JobId
The instance id of the job

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPUser
In ths Article

Returns site users of current web

Syntax
Get-PnPUser [-Identity <UserPipeBind>]
[-WithRightsAssigned [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
This command will return all users that exist in the current site collection's User Information List

Examples
------------------EXAMPLE 1------------------

Get-PnPUser

Returns all users from the User Information List of the current site collection regardless if they currently have
rights to access the current site
------------------EXAMPLE 2------------------

Get-PnPUser -Identity 23

Returns the user with Id 23 from the User Information List of the current site collection
------------------EXAMPLE 3------------------

Get-PnPUser -Identity "i:0#.f|membership|user@tenant.onmicrosoft.com"

Returns the user with LoginName i:0#.f|membership|user@tenant.onmicrosoft.com from the User Information List
of the current site collection
------------------EXAMPLE 4------------------

Get-PnPUser | ? Email -eq "user@tenant.onmicrosoft.com"

Returns the user with e-mail address user@tenant.onmicrosoft.com from the User Information List of the current
site collection
------------------EXAMPLE 5------------------

Get-PnPUser -WithRightsAssigned

Returns only those users from the User Information List of the current site collection who currently have any kind
of access rights given either directly to the user or Active Directory Group or given to the user or Active Directory
Group via membership of a SharePoint Group to the current site
------------------EXAMPLE 6------------------

Get-PnPUser -WithRightsAssigned -Web subsite1

Returns only those users from the User Information List of the current site collection who currently have any kind
of access rights given either directly to the user or Active Directory Group or given to the user or Active Directory
Group via membership of a SharePoint Group to subsite 'subsite1'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
User ID or login name

Type: UserPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WithRightsAssigned
If provided, only users that currently have any kinds of access rights assigned to the current site collection will be
returned. Otherwise all users, even those who previously had rights assigned, but not anymore at the moment, will
be returned as the information is pulled from the User Information List. Only works if you don't provide an -
Identity.

Type: SwitchParameter
Required: False
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.User

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPUserProfileProperty
In ths Article

You must connect to the tenant admin website (https://:<tenant>-admin.sharepoint.com) with Connect-PnPOnline
in order to use this cmdlet.

Syntax
Get-PnPUserProfileProperty -Account <String[]>
[-Connection <SPOnlineConnection>]

Description
Requires a connection to a SharePoint Tenant Admin site.

Examples
------------------EXAMPLE 1------------------

Get-PnPUserProfileProperty -Account 'user@domain.com'

Returns the profile properties for the specified user


------------------EXAMPLE 2------------------

Get-PnPUserProfileProperty -Account 'user@domain.com','user2@domain.com'

Returns the profile properties for the specified users

Parameters
-Account
The account of the user, formatted either as a login name, or as a claims identity, e.g.
i:0#.f|membership|user@domain.com

Type: String[]
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.UserProfiles.PersonProperties

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPView
In ths Article

Returns one or all views from a list

Syntax
Get-PnPView -List <ListPipeBind>
[-Includes <String[]>]
[-Identity <ViewPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPView -List "Demo List"

Returns all views associated from the specified list


------------------EXAMPLE 2------------------

Get-PnPView -List "Demo List" -Identity "Demo View"

Returns the view called "Demo View" from the specified list
------------------EXAMPLE 3------------------

Get-PnPView -List "Demo List" -Identity "5275148a-6c6c-43d8-999a-d2186989a661"

Returns the view with the specified ID from the specified list

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The ID or name of the view

Type: ViewPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.View

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWeb
In ths Article

Returns the current web object

Syntax
Get-PnPWeb [-Includes <String[]>]
[-Identity <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPWeb

This will return the current web

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The guid of the web or web object

Type: WebPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.
Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Web

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWebhookSubscriptions
In ths Article

Gets all the Webhook subscriptions of the resource

Syntax
Get-PnPWebhookSubscriptions [-List <ListPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPWebhookSubscriptions -List MyList

Gets all Webhook subscriptions of the list MyList

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object or name to get the Webhook subscriptions from

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
OfficeDevPnP.Core.Entities.WebhookSubscription

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWebPart
In ths Article

Returns a web part definition object

Syntax
Get-PnPWebPart -ServerRelativePageUrl <String>
[-Identity <WebPartPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPWebPart -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx"

Returns all webparts defined on the given page.


------------------EXAMPLE 2------------------

Get-PnPWebPart -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -Identity a2875399-d6ff-43a0-96da-


be6ae5875f82

Returns a specific web part defined on the given page.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The identity of the web part, this can be the web part guid or a web part object
Type: WebPartPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-ServerRelativePageUrl
Full server relative URL of the web part page, e.g. /sites/mysite/sitepages/home.aspx

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
List<Microsoft.SharePoint.Client.WebParts.WebPartDefinition>

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWebPartProperty
In ths Article

Returns a web part property

Syntax
Get-PnPWebPartProperty -ServerRelativePageUrl <String>
-Identity <GuidPipeBind>
[-Key <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPWebPartProperty -ServerRelativePageUrl /sites/demo/sitepages/home.aspx -Identity ccd2c98a-c9ae-483b-


ae72-19992d583914

Returns all properties of the web part.


------------------EXAMPLE 2------------------

Get-PnPWebPartProperty -ServerRelativePageUrl /sites/demo/sitepages/home.aspx -Identity ccd2c98a-c9ae-483b-


ae72-19992d583914 -Key "Title"

Returns the title property of the web part.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The id of the web part
Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key
Name of a single property to be returned

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl
Full server relative URL of the web part page, e.g. /sites/mysite/sitepages/home.aspx

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWebPartXml
In ths Article

Returns the web part XML of a web part registered on a site

Syntax
Get-PnPWebPartXml -ServerRelativePageUrl <String>
-Identity <WebPartPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPWebPartXml -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -Identity a2875399-d6ff-43a0-96da-


be6ae5875f82

Returns the web part XML for a given web part on a page.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Id or title of the web part. Use Get-PnPWebPart to retrieve all web part Ids

Type: WebPartPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl
Full server relative url of the web part page, e.g. /sites/mysite/sitepages/home.aspx
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.String

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWebTemplates
In ths Article

Returns the available web templates.

Syntax
Get-PnPWebTemplates [-Lcid <UInt32>]
[-CompatibilityLevel <Int>]
[-Connection <SPOnlineConnection>]

Description
Will list all available templates one can use to create a classic site.

Examples
------------------EXAMPLE 1------------------

Get-PnPWebTemplates

------------------EXAMPLE 2------------------

Get-PnPWebTemplates -LCID 1033

Returns all webtemplates for the Locale with ID 1033 (English)


------------------EXAMPLE 3------------------

Get-PnPWebTemplates -CompatibilityLevel 15

Returns all webtemplates for the compatibility level 15

Parameters
-CompatibilityLevel
The version of SharePoint

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Lcid
The language ID. For instance: 1033 for English

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.Online.SharePoint.TenantAdministration.SPOTenantWebTemplateCollection

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWikiPageContent
In ths Article

Gets the contents/source of a wiki page

Syntax
Get-PnPWikiPageContent -ServerRelativePageUrl <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Get-PnPWikiPageContent -PageUrl '/sites/demo1/pages/wikipage.aspx'

Gets the content of the page '/sites/demo1/pages/wikipage.aspx'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl
The server relative URL for the wiki page

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.String

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWorkflowDefinition
In ths Article

Returns a workflow definition

Syntax
Get-PnPWorkflowDefinition [-Name <String>]
[-PublishedOnly [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Returns a workflow definition

Examples
------------------EXAMPLE 1------------------

Get-PnPWorkflowDefinition -Name MyWorkflow

Gets a Workflow with the name "MyWorkflow".


------------------EXAMPLE 2------------------

Get-PnPWorkflowDefinition -Name MyWorkflow -PublishedOnly $false

Gets a Workflow with the name "MyWorkflow" that is published.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the workflow
Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-PublishedOnly
Return only the published workflows

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.WorkflowServices.WorkflowDefinition

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWorkflowInstance
In ths Article

Get workflow instances

Syntax
Get-PnPWorkflowInstance -List <ListPipeBind>
-ListItem <ListItemPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Gets all workflow instances

Examples
------------------EXAMPLE 1------------------

Get-PnPWorkflowInstance -List "My Library" -ListItem $ListItem

Retrieves workflow instances running against the provided item on list "My Library"
------------------EXAMPLE 2------------------

Get-PnPWorkflowInstance -List "My Library" -ListItem 2

Retrieves workflow instances running against the provided item with 2 in the list "My Library"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The List for which workflow instances should be retrieved
Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-ListItem
The List Item for which workflow instances should be retrieved

Type: ListItemPipeBind
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Get-PnPWorkflowSubscription
In ths Article

Return a workflow subscription

Syntax
Get-PnPWorkflowSubscription [-Name <String>]
[-List <ListPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Returns a workflow subscriptions from a list

Examples
------------------EXAMPLE 1------------------

Get-PnPWorkflowSubscription -Name MyWorkflow

Gets an Workflow subscription with the name "MyWorkflow".


------------------EXAMPLE 2------------------

Get-PnPWorkflowSubscription -Name MyWorkflow -list $list

Gets an Workflow subscription with the name "MyWorkflow" from the list $list.
------------------EXAMPLE 3------------------

Get-PnPList -identity "MyList" | Get-PnPWorkflowSubscription -Name MyWorkflow

Gets an Workflow subscription with the name "MyWorkflow" from the list "MyList".

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
A list to search the association for

Type: ListPipeBind
Required: False
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the workflow

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.WorkflowServices.WorkflowSubscription

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Grant-PnPHubSiteRights
In ths Article

Grant additional permissions to the permissions already in place to associate sites to Hub Sites for one or more
specific users

Syntax
Grant-PnPHubSiteRights [-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Grant-PnPHubSiteRights -Identity https://contoso.sharepoint.com/sites/hubsite -Principals


"myuser@mydomain.com","myotheruser@mydomain.com" -Rights Join

This example shows how to grant rights to myuser and myotheruser to associate their sites with the provided Hub
Site
------------------EXAMPLE 2------------------

Grant-PnPHubSiteRights -Identity https://contoso.sharepoint.com/sites/hubsite -Principals "myuser@mydomain.com"


-Rights None

This example shows how to revoke rights from myuser to associate their sites with the provided Hub Site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Grant-PnPSiteDesignRights
In ths Article

Grants the specified principals rights to use the site design.

Syntax
Grant-PnPSiteDesignRights -Identity <TenantSiteDesignPipeBind>
-Principals <String[]>
[-Rights <TenantSiteDesignPrincipalRights>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Grant-PnPSiteDesignRights -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd -Principals


"myuser@mydomain.com","myotheruser@mydomain.com"

Grants the specified principals View rights on the site design specified
------------------EXAMPLE 2------------------

Get-PnPSiteDesign -Title "MySiteDesign" -SiteScriptIds 438548fd-60dd-42cf-b843-2db506c8e259 -WebTemplate


TeamSite | Grant-PnPSiteDesignRights -Principals "myuser@mydomain.com","myotheruser@mydomain.com"

Grants the specified principals View rights on the site design specified

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The site design to use.
Type: TenantSiteDesignPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Principals
One or more principals to grant rights to.

Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Rights
The rights to set. Defaults to 'View'

Type: TenantSiteDesignPrincipalRights
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Grant-PnPTenantServicePrincipalPermission
In ths Article

Explicitly grants a specified permission to the "SharePoint Online Client" service principal

Syntax
Grant-PnPTenantServicePrincipalPermission -Scope <String>
-Resource <String>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Grant-PnPTenantServicePrincipalPermission -Scope "Group.Read.All" -Resource "Microsoft Graph"

This will explicitly grant the Group.Read.All permission on the Microsoft Graph resource

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Resource
The resource to grant the permission for

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
The scope to grant the permission for
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
OfficeDevPnP.Core.ALM.AppMetadata

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Import-PnPAppPackage
In ths Article

Adds a SharePoint Addin to a site

Syntax
Import-PnPAppPackage -Path <String>
[-Force [<SwitchParameter>]]
[-LoadOnly [<SwitchParameter>]]
[-Locale <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
This commands requires that you have an addin package to deploy

Examples
------------------EXAMPLE 1------------------

Import-PnPAppPackage -Path c:\files\demo.app -LoadOnly

This will load the addin in the demo.app package, but will not install it to the site.
------------------EXAMPLE 2------------------

Import-PnPAppPackage -Path c:\files\demo.app -Force

This load first activate the addin sideloading feature, upload and install the addin, and deactivate the addin
sideloading feature.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Force
Will forcibly install the app by activating the addin sideloading feature, installing the addin, and deactivating the
sideloading feature

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LoadOnly
Will only upload the addin, but not install it

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Locale
Will install the addin for the specified locale

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path pointing to the .app file

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.AppInstance

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Import-PnPTaxonomy
In ths Article

Imports a taxonomy from either a string array or a file

Syntax
Import-PnPTaxonomy [-Terms <String[]>]
[-Lcid <Int>]
[-TermStoreName <String>]
[-Delimiter <String>]
[-SynchronizeDeletions [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Import-PnPTaxonomy -Path <String>


[-Lcid <Int>]
[-TermStoreName <String>]
[-Delimiter <String>]
[-SynchronizeDeletions [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Import-PnPTaxonomy -Terms 'Company|Locations|Stockholm'

Creates a new termgroup, 'Company', a termset 'Locations' and a term 'Stockholm'


------------------EXAMPLE 2------------------

Import-PnPTaxonomy -Terms 'Company|Locations|Stockholm|Central','Company|Locations|Stockholm|North'

Creates a new termgroup, 'Company', a termset 'Locations', a term 'Stockholm' and two subterms: 'Central', and
'North'
------------------EXAMPLE 3------------------

Import-PnPTaxonomy -Path ./mytaxonomyterms.txt

Imports the taxonomy from the file specified. Each line has to be in the format TERMGROUP|TERMSET|TERM.
See example 2 for examples of the format.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Delimiter
The path delimiter to be used, by default this is '|'

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Lcid

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies a file containing terms per line, in the format as required by the Terms parameter.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SynchronizeDeletions
If specified, terms that exist in the termset, but are not in the imported data, will be removed.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Terms
An array of strings describing termgroup, termset, term, subterms using a default delimiter of '|'.

Type: String[]
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False
-TermStoreName
Term store to import to; if not specified the default term store is used.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Import-PnPTermGroupFromXml
In ths Article

Imports a taxonomy TermGroup from either the input or from an XML file.

Syntax
Import-PnPTermGroupFromXml [-Xml <String>]
[-Connection <SPOnlineConnection>]

Import-PnPTermGroupFromXml [-Path <String>]


[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Import-PnPTermGroupFromXml -Xml $xml

Imports the XML based termgroup information located in the $xml variable
------------------EXAMPLE 2------------------

Import-PnPTermGroupFromXml -Path input.xml

Imports the XML file specified by the path.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
The XML File to import the data from
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Xml
The XML to process

Type: String
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Import-PnPTermSet
In ths Article

Imports a taxonomy term set from a file in the standard format.

Syntax
Import-PnPTermSet -GroupName <String>
-Path <String>
[-TermSetId <Guid>]
[-SynchronizeDeletions [<SwitchParameter>]]
[-IsOpen <Boolean>]
[-Contact <String>]
[-Owner <String>]
[-TermStoreName <String>]
[-Connection <SPOnlineConnection>]

Description
The format of the file is the same as that used by the import function in the web interface. A sample file can be
obtained from the web interface.
This is a CSV file, with the following headings:
Term Set Name,Term Set Description,LCID,Available for Tagging,Term Description,Level 1 Term,Level 2 Term,Level
3 Term,Level 4 Term,Level 5 Term,Level 6 Term,Level 7 Term
The first data row must contain the Term Set Name, Term Set Description, and LCID, and should also contain the
first term.
It is recommended that a fixed GUID be used as the termSetId, to allow the term set to be easily updated (so do
not pass Guid.Empty).
In contrast to the web interface import, this is not a one-off import but runs synchronization logic allowing
updating of an existing Term Set. When synchronizing, any existing terms are matched (with Term Description and
Available for Tagging updated as necessary), any new terms are added in the correct place in the hierarchy, and (if
synchronizeDeletions is set) any terms not in the imported file are removed.
The import file also supports an expanded syntax for the Term Set Name and term names (Level 1 Term, Level 2
Term, etc). These columns support values with the format 'Name | GUID', with the name and GUID separated by a
pipe character (note that the pipe character is invalid to use within a taxonomy item name). This expanded syntax is
not required, but can be used to ensure all terms have fixed IDs.

Examples
------------------EXAMPLE 1------------------
Import-PnPTermSet -GroupName 'Standard Terms' -Path 'C:\\Temp\\ImportTermSet.csv' -SynchronizeDeletions

Creates (or updates) the term set specified in the import file, in the group specified, removing any existing terms
not in the file.
------------------EXAMPLE 2------------------

Import-PnPTermSet -TermStoreName 'My Term Store' -GroupName 'Standard Terms' -Path


'C:\\Temp\\ImportTermSet.csv' -TermSetId '{15A98DB6-D8E2-43E6-8771-066C1EC2B8D8}'

Creates (or updates) the term set specified in the import file, in the term store and group specified, using the
specified ID.
------------------EXAMPLE 3------------------

Import-PnPTermSet -GroupName 'Standard Terms' -Path 'C:\\Temp\\ImportTermSet.csv' -IsOpen $true -Contact


'user@example.org' -Owner 'user@example.org'

Creates (or updates) the term set specified in the import file, setting the IsOpen, Contact, and Owner properties as
specified.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Contact
Contact for the term set; if not specified, the existing setting is retained.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-GroupName
Group to import the term set to; an error is returned if the group does not exist.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-IsOpen
Whether the term set should be marked open; if not specified, then the existing setting is not changed.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Owner for the term set; if not specified, the existing setting is retained.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Local path to the file containing the term set to import, in the standard format (as the 'sample import file' available
in the Term Store Administration).

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SynchronizeDeletions
If specified, the import will remove any terms (and children) previously in the term set but not in the import file;
default is to leave them.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermSetId
GUID to use for the term set; if not specified, or the empty GUID, a random GUID is generated and used.

Type: Guid
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermStoreName
Term store to import into; if not specified the default term store is used.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Install-PnPApp
In ths Article

Installs an available app from the app catalog

Syntax
Install-PnPApp -Identity <AppMetadataPipeBind>
[-Scope <AppCatalogScope>]
[-Wait [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Install-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will install an app that is available in the tenant scoped app catalog, specified by the id, to the current site.
------------------EXAMPLE 2------------------

Install-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Site

This will install an app that is available in the site collection scoped app catalog, specified by the id, to the current
site.
------------------EXAMPLE 3------------------

Get-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe | Install-PnPApp

This will install the given app from the tenant scoped app catalog into the site.
------------------EXAMPLE 4------------------

Get-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Site | Install-PnPApp

This will install the given app from the site collection scoped app catalog into the site.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Id or an actual app metadata instance
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppMetadataPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Defines which app catalog to use. Defaults to Tenant
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppCatalogScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Wait
If specified the execution will pause until the app has been installed in the site.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Install-PnPSolution
In ths Article

Installs a sandboxed solution to a site collection. WARNING! This method can delete your composed look gallery
due to the method used to activate the solution. We recommend you to only to use this cmdlet if you are okay with
that.

Syntax
Install-PnPSolution -PackageId <GuidPipeBind>
-SourceFilePath <String>
[-MajorVersion <Int>]
[-MinorVersion <Int>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Install-PnPSolution -PackageId c2f5b025-7c42-4d3a-b579-41da3b8e7254 -SourceFilePath mypackage.wsp

Installs the package to the current site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MajorVersion
Optional major version of the solution, defaults to 1

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MinorVersion
Optional minor version of the solution, defaults to 0

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PackageId
ID of the solution, from the solution manifest

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SourceFilePath
Path to the sandbox solution package (.WSP ) file

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Invoke-PnPQuery
In ths Article

Executes the currently queued actions

Syntax
Invoke-PnPQuery [-RetryCount <Int>]
[-RetryWait <Int>]
[-Connection <SPOnlineConnection>]

Description
Executes any queued actions / changes on the SharePoint Client Side Object Model Context

Examples
------------------EXAMPLE 1------------------

Invoke-PnPQuery -RetryCount 5

This will execute any queued actions / changes on the SharePoint Client Side Object Model Context and will retry 5
times in case of throttling.
------------------EXAMPLE 2------------------

Invoke-PnPQuery -RetryWait 10

This will execute any queued actions / changes on the SharePoint Client Side Object Model Context and delay the
execution for 10 seconds before it retries the execution.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RetryCount
Number of times to retry in case of throttling. Defaults to 10.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RetryWait
Delay in seconds. Defaults to 1.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Invoke-PnPSiteDesign
In ths Article

Apply a Site Design to an existing site. Requires Tenant Administration Rights

Syntax
Invoke-PnPSiteDesign -Identity <TenantSiteDesignPipeBind>
[-WebUrl <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Invoke-PnPSiteDesign -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd

Applies the specified site design to the current site.


------------------EXAMPLE 2------------------

Invoke-PnPSiteDesign -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd -WebUrl


https://contoso.sharepoint.com/sites/mydemosite

Applies the specified site design to the specified site.


------------------EXAMPLE 3------------------

Get-PnPSiteDesign | ?{$_.Title -eq "Demo"} | Invoke-PnPSiteDesign

Applies the specified site design to the specified site.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The Site Design Id or an actual Site Design object to apply

Type: TenantSiteDesignPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebUrl
The URL of the web to apply the site design to. If not specified it will default to the current web based upon the
URL specified with Connect-PnPOnline.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Invoke-PnPSPRestMethod
In ths Article

Invokes a REST request towards a SharePoint site

Syntax
Invoke-PnPSPRestMethod -Url <String>
[-Method <HttpRequestMethod>]
[-Content <Object>]
[-ContentType <String>]
[-Connection <SPOnlineConnection>]

Description
Invokes a REST request towards a SharePoint site

Examples
------------------EXAMPLE 1------------------

Invoke-PnPSPRestMethod -Url /_api/web

This example executes a GET request towards the current site collection and returns the properties of the current
web
------------------EXAMPLE 2------------------

$output = Invoke-PnPSPRestMethod -Url '/_api/web/lists?$select=Id,Title'


$output.value

This example executes a GET request towards the current site collection and returns the id and title of all the lists
and outputs them to the console. Notice the use of single quotes. If you want to use double quotes (") then you will
have to escape the $ character with a backtick: `$
------------------EXAMPLE 3------------------

$item = @{Title="Test"}
Invoke-PnPSPRestMethod -Method Post -Url "/_api/web/lists/GetByTitle('Test')/items" -Content $item

This example creates a new item in the list 'Test' and sets the title field to 'Test'
------------------EXAMPLE 4------------------
$item = "{'Title':'Test'}"
Invoke-PnPSPRestMethod -Method Post -Url "/_api/web/lists/GetByTitle('Test')/items" -Content $item

This example creates a new item in the list 'Test' and sets the title field to 'Test'
------------------EXAMPLE 5------------------

$item = "{ '__metadata': { 'type': 'SP.Data.TestListItem' }, 'Title': 'Test'}"


Invoke-PnPSPRestMethod -Method Post -Url "/_api/web/lists/GetByTitle('Test')/items" -Content $item -ContentType
"application/json;odata=verbose"

This example creates a new item in the list 'Test' and sets the title field to 'Test'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Content
A string or object to send

Type: Object
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
The content type of the object to send. Defaults to 'application/json'

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Method
The Http method to execute. Defaults to GET.

Type: HttpRequestMethod
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False
-Url
The url to execute.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Invoke-PnPWebAction
In ths Article

Executes operations on web, lists and list items.

Syntax
Invoke-PnPWebAction [-Webs <Web[]>]
[-WebAction <Web>]
[-ShouldProcessWebAction <Web>]
[-PostWebAction <Web>]
[-ShouldProcessPostWebAction <Web>]
[-WebProperties <String[]>]
[-ListAction <List>]
[-ShouldProcessListAction <List>]
[-PostListAction <List>]
[-ShouldProcessPostListAction <List>]
[-ListProperties <String[]>]
[-ListItemAction <ListItem>]
[-ShouldProcessListItemAction <ListItem>]
[-ListItemProperties <String[]>]
[-SubWebs [<SwitchParameter>]]
[-DisableStatisticsOutput [<SwitchParameter>]]
[-SkipCounting [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Invoke-PnPWebAction -ListAction ${function:ListAction}

This will call the function ListAction on all the lists located on the current web.
------------------EXAMPLE 2------------------

Invoke-PnPWebAction -ShouldProcessListAction ${function:ShouldProcessList} -ListAction ${function:ListAction}

This will call the function ShouldProcessList, if it returns true the function ListAction will then be called. This will
occur on all lists located on the current web

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableStatisticsOutput
Will not output statistics after the operation

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ListAction
Function to be executed on the list. There is one input parameter of type List

Type: List
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ListItemAction
Function to be executed on the list item. There is one input parameter of type ListItem

Type: ListItem
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ListItemProperties
The properties to load for list items.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ListProperties
The properties to load for list.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-PostListAction
Function to be executed on the list, this will trigger after list items have been processed. There is one input
parameter of type List

Type: List
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PostWebAction
Function to be executed on the web, this will trigger after lists and list items have been processed. There is one
input parameter of type Web

Type: Web
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShouldProcessListAction
Function to be executed on the web that would determine if ListAction should be invoked, There is one input
parameter of type List and the function should return a boolean value

Type: List
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShouldProcessListItemAction
Function to be executed on the web that would determine if ListItemAction should be invoked, There is one input
parameter of type ListItem and the function should return a boolean value

Type: ListItem
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShouldProcessPostListAction
Function to be executed on the web that would determine if PostListAction should be invoked, There is one input
parameter of type List and the function should return a boolean value

Type: List
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShouldProcessPostWebAction
Function to be executed on the web that would determine if PostWebAction should be invoked, There is one input
parameter of type Web and the function should return a boolean value

Type: Web
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShouldProcessWebAction
Function to be executed on the web that would determine if WebAction should be invoked, There is one input
parameter of type Web and the function should return a boolean value

Type: Web
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SkipCounting
Will skip the counting process; by doing this you will not get an estimated time remaining

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SubWebs
Specify if sub webs will be processed

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebAction
Function to be executed on the web. There is one input parameter of type Web
Type: Web
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebProperties
The properties to load for web.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Webs
Webs you want to process (for example different site collections), will use Web parameter if not specified

Type: Web[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Measure-PnPList
In ths Article

Returns statistics on the list object

Syntax
Measure-PnPList -Identity <ListPipeBind>
[-Includes <String[]>]
[-ItemLevel [<SwitchParameter>]]
[-BrokenPermissions [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Measure-PnPList "Documents"

Gets statistics on Documents document library


------------------EXAMPLE 2------------------

Measure-PnPList "Documents" -BrokenPermissions -ItemLevel

Displays items and folders with broken permissions inside Documents library

Parameters
-BrokenPermissions
Show items with broken permissions
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-ItemLevel
Show item level statistics
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Measure-PnPResponseTime
In ths Article

Gets statistics on response time for the specified endpoint by sending probe requests

Syntax
Measure-PnPResponseTime [-Url <DiagnosticEndpointPipeBind>]
[-Count <UInt32>]
[-WarmUp <UInt32>]
[-Timeout <UInt32>]
[-Histogram <UInt32>]
[-Mode <MeasureResponseTimeMode>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Measure-PnPResponseTime -Count 100 -Timeout 20

Calculates statistics on sequence of 100 probe requests, sleeps 20ms between probes
------------------EXAMPLE 2------------------

Measure-PnPResponseTime "/Pages/Test.aspx" -Count 1000

Calculates statistics on response time of Test.aspx by sending 1000 requests with default sleep time between
requests
------------------EXAMPLE 3------------------

Measure-PnPResponseTime $web -Count 1000 -WarmUp 10 -Histogram 20 -Timeout 50 | Select -expa Histogram | %
{$_.GetEnumerator() | Export-Csv C:\Temp\responsetime.csv -NoTypeInformation}

Builds histogram of response time for the home page of the web and exports to CSV for later processing in Excel

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Count
Number of probe requests to send

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Histogram
Number of buckets in histogram in output statistics

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Mode
Response time measurement mode. RoundTrip - measures full request round trip. SPRequestDuration - measures
server processing time only, based on SPRequestDuration HTTP header. Latency - difference between RoundTrip
and SPRequestDuration

Type: MeasureResponseTimeMode
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Timeout
Idle timeout between requests to avoid request throttling

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url

Type: DiagnosticEndpointPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False
-WarmUp
Number of warm up requests to send before start calculating statistics

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Measure-PnPWeb
In ths Article

Returns statistics on the web object

Syntax
Measure-PnPWeb [-Identity <WebPipeBind>]
[-Recursive [<SwitchParameter>]]
[-IncludeHiddenList [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Measure-PnPWeb

Gets statistics on the current web


------------------EXAMPLE 2------------------

Measure-PnPWeb $web -Recursive

Gets statistics on the provided web including all its subwebs

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016
Type: WebPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-IncludeHiddenList
Include hidden lists in statistics calculation
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Recursive
Iterate all sub webs recursively
Only applicable to: SharePoint Online, SharePoint Server 2019, SharePoint Server 2016

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Move-PnPClientSideComponent
In ths Article

Moves a Client-Side Component to a different section/column

Syntax
Move-PnPClientSideComponent -Section <Int>
-Page <ClientSidePagePipeBind>
-InstanceId <GuidPipeBind>
[-Position <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Move-PnPClientSideComponent -Column <Int>


-Page <ClientSidePagePipeBind>
-InstanceId <GuidPipeBind>
[-Position <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Move-PnPClientSideComponent -Position <Int>


-Page <ClientSidePagePipeBind>
-InstanceId <GuidPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Move-PnPClientSideComponent -Section <Int>


-Column <Int>
-Page <ClientSidePagePipeBind>
-InstanceId <GuidPipeBind>
[-Position <Int>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Moves a Client-Side Component to a different location on the page. Notice that the sections and or columns need
to be present before moving the component.

Examples
------------------EXAMPLE 1------------------

Move-PnPClientSideComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82 -Section 1


Moves the specified component to the first section of the page.
------------------EXAMPLE 2------------------

Move-PnPClientSideComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82 -Column 2

Moves the specified component to the second column of the current section.
------------------EXAMPLE 3------------------

Move-PnPClientSideComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82 -Section 1 -Column 2

Moves the specified component to the first section of the page into the second column.
------------------EXAMPLE 4------------------

Move-PnPClientSideComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82 -Section 1 -Column 2 -


Position 2

Moves the specified component to the first section of the page into the second column and sets the column to
position 2 in the list of webparts.

Parameters
-Column
The column to move the web part to
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InstanceId
The instance id of the control. Use Get-PnPClientSideControl retrieve the instance ids.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Page
The name of the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Position
Change to order of the web part in the column
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Section
The section to move the web part to
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Move-PnPFile
In ths Article

Moves a file to a different location

Syntax
Move-PnPFile -ServerRelativeUrl <String>
-TargetUrl <String>
[-OverwriteIfAlreadyExists [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Move-PnPFile -SiteRelativeUrl <String>


-TargetUrl <String>
[-OverwriteIfAlreadyExists [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

PS:>Move-PnPFile -ServerRelativeUrl /sites/project/Documents/company.docx -TargetUrl


/sites/otherproject/Documents/company.docx

Moves a file named company.docx located in the document library called Documents located in the projects
sitecollection under the managed path sites to the site collection otherproject located in the managed path sites. If a
file named company.aspx already exists, it won't perform the move.
------------------EXAMPLE 2------------------

PS:>Move-PnPFile -SiteRelativeUrl Documents/company.aspx -TargetUrl /sites/otherproject/Documents/company.docx

Moves a file named company.docx located in the document library called Documents located in the current site to
the Documents library in the site collection otherproject located in the managed path sites. If a file named
company.aspx already exists, it won't perform the move.
------------------EXAMPLE 3------------------

PS:>Move-PnPFile -ServerRelativeUrl /sites/project/Documents/company.docx -TargetUrl


/sites/otherproject/Documents/company.docx -OverwriteIfAlreadyExists

Moves a file named company.docx located in the document library called Documents located in the projects
sitecollection under the managed path sites to the site collection otherproject located in the managed path sites. If a
file named company.aspx already exists, it will still perform the move and replace the original company.aspx file.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If provided, no confirmation will be requested and the action will be performed

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OverwriteIfAlreadyExists
If provided, if a file already exists at the TargetUrl, it will be overwritten. If omitted, the move operation will be
canceled if the file already exists at the TargetUrl location.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativeUrl
Server relative Url specifying the file to move. Must include the file name.

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-SiteRelativeUrl
Site relative Url specifying the file to move. Must include the file name.

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False
-TargetUrl
Server relative Url where to move the file to. Must include the file name.

Type: String
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Move-PnPFolder
In ths Article

Move a folder to another location in the current web

Syntax
Move-PnPFolder -Folder <String>
-TargetFolder <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Move-PnPFolder -Folder Documents/Reports -TargetFolder 'Archived Reports'

This will move the folder Reports in the Documents library to the 'Archived Reports' library
------------------EXAMPLE 2------------------

Move-PnPFolder -Folder 'Shared Documents/Reports/2016/Templates' -TargetFolder 'Shared Documents/Reports'

This will move the folder Templates to the new location in 'Shared Documents/Reports'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
The folder to move
Only applicable to: SharePoint Online
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TargetFolder
The new parent location to which the folder should be moved to
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Folder

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Move-PnPItemProxy
In ths Article

Proxy cmdlet for using Move-Item between SharePoint provider and FileSystem provider

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Move-PnPListItemToRecycleBin
In ths Article

Moves an item from a list to the Recycle Bin

Syntax
Move-PnPListItemToRecycleBin -List <ListPipeBind>
-Identity <ListItemPipeBind>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Move-PnPListItemToRecycleBin -List "Demo List" -Identity "1" -Force

Moves the listitem with id "1" from the "Demo List" list to the Recycle Bin.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the listitem, or actual ListItem object
Type: ListItemPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Title or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Move-PnPRecycleBinItem
In ths Article

Moves all items or a specific item in the first stage recycle bin of the current site collection to the second stage
recycle bin

Syntax
Move-PnPRecycleBinItem [-Identity <RecycleBinItemPipeBind>]
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Move-PnpRecycleBinItem

Moves all the items in the first stage recycle bin of the current site collection to the second stage recycle bin
------------------EXAMPLE 2------------------

Move-PnpRecycleBinItem -Identity 26ffff29-b526-4451-9b6f-7f0e56ba7125

Moves the item with the provided ID in the first stage recycle bin of the current site collection to the second stage
recycle bin without asking for confirmation first
------------------EXAMPLE 3------------------

Move-PnpRecycleBinItem -Force

Moves all the items in the first stage recycle bin of the current context to the second stage recycle bin without
asking for confirmation first

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If provided, no confirmation will be asked to move the first stage recycle bin items to the second stage

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
If provided, moves the item with the specific ID to the second stage recycle bin

Type: RecycleBinItemPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPAzureCertificate
In ths Article

Generate a new 2048bit self-signed certificate and manifest settings for use when using CSOM via an app-only
ADAL application. See https://github.com/SharePoint/PnP -
PowerShell/tree/master/Samples/SharePoint.ConnectUsingAppPermissions for a sample on how to get started.
KeyCredentials contains the ADAL app manifest sections. Certificate contains the PEM encoded certificate.
PrivateKey contains the PEM encoded private key of the certificate.

Syntax
New-PnPAzureCertificate [-CommonName <String>]
[-Country <String>]
[-State <String>]
[-Locality <String>]
[-Organization <String>]
[-OrganizationUnit <String>]
[-OutPfx <String>]
[-OutCert <String>]
[-ValidYears <Int>]
[-CertificatePassword <SecureString>]

Examples
------------------EXAMPLE 1------------------

New-PnPAzureCertificate -OutPfx pnp.pfx -OutCert pnp.cer

This will generate a default self-signed certificate named "pnp.contoso.com" valid for 10 years and output a pfx and
cer file.
------------------EXAMPLE 2------------------

New-PnPAzureCertificate -CommonName "My Certificate" -ValidYears 30

This will output a certificate named "My Certificate" which expires in 30 years from now.

Parameters
-CertificatePassword
Optional certificate password
Type: SecureString
Required: False
Position: 8
Accept pipeline input: False
Accept wildcard characters: False

-CommonName
Common Name (e.g. server FQDN or YOUR name) [pnp.contoso.com]

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Country
Country Name (2 letter code)

Type: String
Required: False
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Locality
Locality Name (eg, city)

Type: String
Required: False
Position: 3
Accept pipeline input: False
Accept wildcard characters: False

-Organization
Organization Name (eg, company)

Type: String
Required: False
Position: 4
Accept pipeline input: False
Accept wildcard characters: False

-OrganizationUnit
Organizational Unit Name (eg, section)

Type: String
Required: False
Position: 5
Accept pipeline input: False
Accept wildcard characters: False
-OutCert
Filename to write to, optionally including full path (.cer)

Type: String
Required: False
Position: 6
Accept pipeline input: False
Accept wildcard characters: False

-OutPfx
Filename to write to, optionally including full path (.pfx)

Type: String
Required: False
Position: 6
Accept pipeline input: False
Accept wildcard characters: False

-State
State or Province Name (full name)

Type: String
Required: False
Position: 2
Accept pipeline input: False
Accept wildcard characters: False

-ValidYears
Number of years until expiration (default is 10, max is 30)

Type: Int
Required: False
Position: 7
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPExtensibilityHandlerObject
In ths Article

Creates an ExtensibilityHandler Object, to be used by the Get-PnPProvisioningTemplate cmdlet

Syntax
New-PnPExtensibilityHandlerObject -Assembly <String>
-Type <String>
[-Configuration <String>]
[-Disabled [<SwitchParameter>]]

Examples
------------------EXAMPLE 1------------------

$handler = New-PnPExtensibilityHandlerObject -Assembly Contoso.Core.Handlers -Type


Contoso.Core.Handlers.MyExtensibilityHandler
Get-PnPProvisioningTemplate -Out NewTemplate.xml -ExtensibilityHandlers $handler

This will create a new ExtensibilityHandler object that is run during extraction of the template

Parameters
-Assembly
The full assembly name of the handler

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Configuration
Any configuration data you want to send to the handler

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Disabled
If set, the handler will be disabled
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Type
The type of the handler

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
OfficeDevPnP.Core.Framework.Provisioning.Model.ExtensibilityHandler

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPGroup
In ths Article

Adds group to the Site Groups List and returns a group object

Syntax
New-PnPGroup -Title <String>
[-Description <String>]
[-Owner <String>]
[-AllowRequestToJoinLeave [<SwitchParameter>]]
[-AutoAcceptRequestToJoinLeave [<SwitchParameter>]]
[-AllowMembersEditMembership [<SwitchParameter>]]
[-DisallowMembersViewMembership [<SwitchParameter>]]
[-RequestToJoinEmail <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

New-PnPGroup -Title "My Site Users"

Parameters
-AllowMembersEditMembership
A switch parameter that specifies whether group members can modify membership in the group

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AllowRequestToJoinLeave
A switch parameter that specifies whether to allow users to request membership in the group and to allow users to
request to leave the group

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-AutoAcceptRequestToJoinLeave
A switch parameter that specifies whether users are automatically added or removed when they make a request

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description for the group

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisallowMembersViewMembership
A switch parameter that disallows group members to view membership.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owner
The owner for the group, which can be a user or another group

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RequestToJoinEmail
The e-mail address to which membership requests are sent
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The Title of the group

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Group

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPList
In ths Article

Creates a new list

Syntax
New-PnPList -Title <String>
-Template <ListTemplateType>
[-Url <String>]
[-Hidden [<SwitchParameter>]]
[-EnableVersioning [<SwitchParameter>]]
[-EnableContentTypes [<SwitchParameter>]]
[-OnQuickLaunch [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

New-PnPList -Title Announcements -Template Announcements

Create a new announcements list


------------------EXAMPLE 2------------------

New-PnPList -Title "Demo List" -Url "DemoList" -Template Announcements

Create a list with a title that is different from the url


------------------EXAMPLE 3------------------

New-PnPList -Title HiddenList -Template GenericList -Hidden

Create a new custom list and hides it from the SharePoint UI.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableContentTypes
Switch parameter if content types should be enabled on this list

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableVersioning
Switch parameter if versioning should be enabled

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Hidden
Switch parameter if list should be hidden from the SharePoint UI

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OnQuickLaunch
Switch parameter if this list should be visible on the QuickLaunch

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Template
The type of list to create.

Type: ListTemplateType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Title
The Title of the list

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
If set, will override the url of the list.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPPersonalSite
In ths Article

Office365 only: Creates a personal / OneDrive For Business site

Syntax
New-PnPPersonalSite -Email <String[]>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

$users = ('katiej@contoso.onmicrosoft.com','garth@contoso.onmicrosoft.com')
New-PnPPersonalSite -Email $users

Creates a personal / OneDrive For Business site for the 2 users in the variable $users

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Email
The UserPrincipalName (UPN ) of the users

Type: String[]
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPProvisioningTemplate
In ths Article

Creates a new provisioning template object

Examples
------------------EXAMPLE 1------------------

$template = New-PnPProvisioningTemplate

Creates a new instance of a site template object.

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPProvisioningTemplateFromFolder
In ths Article

Generates a provisioning template from a given folder, including only files that are present in that folder

Syntax
New-PnPProvisioningTemplateFromFolder [-Out <String>]
[-Folder <String>]
[-Match <String>]
[-ContentType <ContentTypePipeBind>]
[-Properties <Hashtable>]
[-AsIncludeFile [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Encoding <Encoding>]
[-TargetFolder <String>]
[-Schema <XMLPnPSchemaVersion>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

New-PnPProvisioningTemplateFromFolder -Out template.xml

Creates an empty provisioning template, and includes all files in the current folder.
------------------EXAMPLE 2------------------

New-PnPProvisioningTemplateFromFolder -Out template.xml -Folder c:\temp

Creates an empty provisioning template, and includes all files in the c:\temp folder.
------------------EXAMPLE 3------------------

New-PnPProvisioningTemplateFromFolder -Out template.xml -Folder c:\temp -Match *.js

Creates an empty provisioning template, and includes all files with a JS extension in the c:\temp folder.
------------------EXAMPLE 4------------------

New-PnPProvisioningTemplateFromFolder -Out template.xml -Folder c:\temp -Match *.js -TargetFolder "Shared


Documents"

Creates an empty provisioning template, and includes all files with a JS extension in the c:\temp folder and marks
the files in the template to be added to the 'Shared Documents' folder
------------------EXAMPLE 5------------------

New-PnPProvisioningTemplateFromFolder -Out template.xml -Folder c:\temp -Match *.js -TargetFolder "Shared


Documents" -ContentType "Test Content Type"

Creates an empty provisioning template, and includes all files with a JS extension in the c:\temp folder and marks
the files in the template to be added to the 'Shared Documents' folder. It will add a property to the item for the
content type.
------------------EXAMPLE 6------------------

New-PnPProvisioningTemplateFromFolder -Out template.xml -Folder c:\temp -Match *.js -TargetFolder "Shared


Documents" -Properties @{"Title" = "Test Title"; "Category"="Test Category"}

Creates an empty provisioning template, and includes all files with a JS extension in the c:\temp folder and marks
the files in the template to be added to the 'Shared Documents' folder. It will add the specified properties to the file
entries.
------------------EXAMPLE 7------------------

New-PnPProvisioningTemplateFromFolder -Out template.pnp

Creates an empty provisioning template as a pnp package file, and includes all files in the current folder
------------------EXAMPLE 8------------------

New-PnPProvisioningTemplateFromFolder -Out template.pnp -Folder c:\temp

Creates an empty provisioning template as a pnp package file, and includes all files in the c:\temp folder

Parameters
-AsIncludeFile
If specified, the output will only contain the <pnp:Files> element. This allows the output to be included in another
template.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-ContentType
An optional content type to use.

Type: ContentTypePipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Encoding
The encoding type of the XML file, Unicode is default

Type: Encoding
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
Folder to process. If not specified the current folder will be used.

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the output file if it exists.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Match
Optional wildcard pattern to match filenames against. If empty all files will be included.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Out
Filename to write to, optionally including full path.
Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Properties
Additional properties to set for every file entry in the generated template.

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Schema
The schema of the output to use, defaults to the latest schema

Type: XMLPnPSchemaVersion
Required: False
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-TargetFolder
Target folder to provision to files to. If not specified, the current folder name will be used.

Type: String
Required: False
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPSite
In ths Article

Creates either a communication site or an Office 365 group-connected team site

Syntax
New-PnPSite -Title <String>
-Url <String>
-Type <SiteType>
[-Description <String>]
[-Classification <String>]
[-Owner <String>]
[-AllowFileSharingForGuestUsers [<SwitchParameter>]]
[-SiteDesign <CommunicationSiteDesign>]
[-Lcid <UInt32>]
[-HubSiteId <GuidPipeBind>]
[-Wait [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

New-PnPSite -Title <String>


-Alias <String>
-Type <SiteType>
[-Lcid <UInt32>]
[-Description <String>]
[-Classification <String>]
[-IsPublic <String>]
[-Owners <String[]>]
[-HubSiteId <GuidPipeBind>]
[-Wait [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

New-PnPSite -Title <String>


-Url <String>
-SiteDesignId <GuidPipeBind>
-Type <SiteType>
[-Description <String>]
[-Classification <String>]
[-Owner <String>]
[-AllowFileSharingForGuestUsers [<SwitchParameter>]]
[-Lcid <UInt32>]
[-HubSiteId <GuidPipeBind>]
[-Wait [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
The New -PnPSite cmdlet creates a new site collection for the current tenant. Currently only 'modern' sites like
Communication Site and the Modern Office 365 group-connected team sites are supported. If you want to create a
classic site, use New -PnPTenantSite.
Examples
------------------EXAMPLE 1------------------

New-PnPSite -Type CommunicationSite -Title Contoso -Url https://tenant.sharepoint.com/sites/contoso

This will create a new Communications Site collection with the title 'Contoso' and the url
'https://tenant.sharepoint.com/sites/contoso'
------------------EXAMPLE 2------------------

New-PnPSite -Type CommunicationSite -Title Contoso -Url https://tenant.sharepoint.com/sites/contoso -SiteDesign


Showcase

This will create a new Communications Site collection with the title 'Contoso' and the url
'https://tenant.sharepoint.com/sites/contoso'. It will use the 'Showcase' design for the site.
------------------EXAMPLE 3------------------

New-PnPSite -Type CommunicationSite -Title Contoso -Url https://tenant.sharepoint.com/sites/contoso -


SiteDesignId ae2349d5-97d6-4440-94d1-6516b72449ac

This will create a new Communications Site collection with the title 'Contoso' and the url
'https://tenant.sharepoint.com/sites/contoso'. It will use the specified custom site design for the site.
------------------EXAMPLE 4------------------

New-PnPSite -Type CommunicationSite -Title Contoso -Url https://tenant.sharepoint.com/sites/contoso -


Classification "HBI"

This will create a new Communications Site collection with the title 'Contoso' and the url
'https://tenant.sharepoint.com/sites/contoso'. The classification for the site will be set to "HBI"
------------------EXAMPLE 5------------------

New-PnPSite -Type CommunicationSite -Title Contoso -Url https://tenant.sharepoint.com/sites/contoso -


ShareByEmailEnabled

This will create a new Communications Site collection with the title 'Contoso' and the url
'https://tenant.sharepoint.com/sites/contoso'. Allows owners to invite users outside of the organization.
------------------EXAMPLE 6------------------

New-PnPSite -Type CommunicationSite -Title Contoso -Url https://tenant.sharepoint.com/sites/contoso -Lcid 1040

This will create a new Communications Site collection with the title 'Contoso' and the url
'https://tenant.sharepoint.com/sites/contoso' and sets the default language to Italian.
------------------EXAMPLE 7------------------

New-PnPSite -Type TeamSite -Title 'Team Contoso' -Alias contoso

This will create a new Modern Team Site collection with the title 'Team Contoso' and the url
'https://tenant.sharepoint.com/sites/contoso' or 'https://tenant.sharepoint.com/teams/contoso' based on the
managed path configuration in the SharePoint Online Admin portal.
------------------EXAMPLE 8------------------

New-PnPSite -Type TeamSite -Title 'Team Contoso' -Alias contoso -IsPublic

This will create a new Modern Team Site collection with the title 'Team Contoso' and the url
'https://tenant.sharepoint.com/sites/contoso' or 'https://tenant.sharepoint.com/teams/contoso' based on the
managed path configuration in the SharePoint Online Admin portal and sets the site to public.
------------------EXAMPLE 9------------------

New-PnPSite -Type TeamSite -Title 'Team Contoso' -Alias contoso -Lcid 1040

This will create a new Modern Team Site collection with the title 'Team Contoso' and the url
'https://tenant.sharepoint.com/sites/contoso' or 'https://tenant.sharepoint.com/teams/contoso' based on the
managed path configuration in the SharePoint Online Admin portal and sets the default language of the site to
Italian.

Parameters
-Alias
Specifies the alias of the new site collection which represents the part of the URL that will be assigned to the site
behind 'https://tenant.sharepoint.com/sites/' or 'https://tenant.sharepoint.com/teams/' based on the managed path
configuration in the SharePoint Online Admin portal, this parameter only applies to Modern Team Sites

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-AllowFileSharingForGuestUsers
Specifies if guest users can share files in the new site collection

Type: SwitchParameter
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Classification
Specifies the classification of the new site collection

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the new site collection

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-HubSiteId
If specified the site will be associated to the hubsite as identified by this id

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IsPublic
Specifies if new site collection is public. Defaults to false.

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Lcid
Specifies the language of the new site collection. Defaults to the current language of the web connected to.

Type: UInt32
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the owner of the site. Specify the value as a string array: "user@domain.com"
Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Owners
Specifies the owners of the site. Specify the value as a string array:
"user@domain.com","anotheruser@domain.com"

Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-SiteDesign
Specifies the site design of the new site collection. Defaults to 'Topic'

Type: CommunicationSiteDesign
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-SiteDesignId
Specifies the site design id to use for the new site collection. If specified will override SiteDesign

Type: GuidPipeBind
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Title
Specifies the title of the new site collection

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies with type of site to create.

Type: SiteType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Url
Specifies the full url of the new site collection, this parameter only applies to Communications Sites

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Wait
If specified the cmdlet will wait until the site has been fully created and all site artifacts have been provisioned by
SharePoint. Notice that this can take a while.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
System.String
Returns the url of the newly created site collection

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTenantSequence
In ths Article

Creates a new tenant sequence object

Syntax
New-PnPTenantSequence [-Id <String>]

Examples
------------------EXAMPLE 1------------------

$sequence = New-PnPTenantSequence

Creates a new instance of a tenant sequence object.


------------------EXAMPLE 2------------------

$sequence = New-PnPTenantSequence -Id "MySequence"

Creates a new instance of a tenant sequence object and sets the Id to the value specified.

Parameters
-Id
Optional Id of the sequence

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTenantSequenceCommunicationSite
In ths Article

Creates a communication site object

Syntax
New-PnPTenantSequenceCommunicationSite -Url <String>
-Title <String>
[-Language <UInt32>]
[-Owner <String>]
[-Description <String>]
[-Classification <String>]
[-SiteDesignId <String>]
[-HubSite [<SwitchParameter>]]
[-AllowFileSharingForGuestUsers [<SwitchParameter>]]
[-TemplateIds <String[]>]

Examples
------------------EXAMPLE 1------------------

$site = New-PnPTenantSequenceCommunicationSite -Url "/sites/mycommunicationsite" -Title "My Team Site"

Creates a new communication site object with the specified variables

Parameters
-AllowFileSharingForGuestUsers

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Classification

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HubSite

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Language

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owner

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SiteDesignId

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateIds

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTenantSequenceTeamNoGroupSite
In ths Article

Creates a new team site without an Office 365 group in-memory object

Syntax
New-PnPTenantSequenceTeamNoGroupSite -Url <String>
-Title <String>
-TimeZoneId <UInt32>
[-Language <UInt32>]
[-Owner <String>]
[-Description <String>]
[-HubSite [<SwitchParameter>]]
[-TemplateIds <String[]>]

Examples
------------------EXAMPLE 1------------------

$site = New-PnPTenantSequenceTeamNoGroupSite -Url "/sites/MyTeamSite" -Title "My Team Site"

Creates a new team site object with the specified variables

Parameters
-Description

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HubSite

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Language
Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owner

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateIds

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TimeZoneId

Type: UInt32
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTenantSequenceTeamNoGroupSubSite
In ths Article

Creates a team site subsite with no Office 365 group object

Syntax
New-PnPTenantSequenceTeamNoGroupSubSite -Url <String>
-Title <String>
-TimeZoneId <UInt32>
[-Language <UInt32>]
[-Description <String>]
[-TemplateIds <String[]>]
[-QuickLaunchDisabled [<SwitchParameter>]]
[-UseDifferentPermissionsFromParentSite [<SwitchParameter>]]

Examples
------------------EXAMPLE 1------------------

$site = New-PnPTenantSequenceTeamNoGroupSubSite -Url "MyTeamSubsite" -Title "My Team Site" -TimeZoneId 4

Creates a new team site subsite object with the specified variables

Parameters
-Description

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Language

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-QuickLaunchDisabled
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateIds

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TimeZoneId

Type: UInt32
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UseDifferentPermissionsFromParentSite

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTenantSequenceTeamSite
In ths Article

Creates a team site object

Syntax
New-PnPTenantSequenceTeamSite -Alias <String>
-Title <String>
[-Description <String>]
[-DisplayName <String>]
[-Classification <String>]
[-Public [<SwitchParameter>]]
[-HubSite [<SwitchParameter>]]
[-TemplateIds <String[]>]

Examples
------------------EXAMPLE 1------------------

$site = New-PnPTenantSequenceTeamSite -Alias "MyTeamSite" -Title "My Team Site"

Creates a new team site object with the specified variables

Parameters
-Alias

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Classification

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HubSite

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Public

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateIds

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTenantSite
In ths Article

Creates a new (classic) site collection for the current tenant

Syntax
New-PnPTenantSite -Title <String>
-Url <String>
-Owner <String>
-TimeZone <Int>
[-Lcid <UInt32>]
[-Template <String>]
[-ResourceQuota <Double>]
[-ResourceQuotaWarningLevel <Double>]
[-StorageQuota <Int>]
[-StorageQuotaWarningLevel <Int>]
[-RemoveDeletedSite [<SwitchParameter>]]
[-Wait [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
The New -PnPTenantSite cmdlet creates a new site collection for the current company. However, creating a new
SharePoint Online site collection fails if a deleted site with the same URL exists in the Recycle Bin. If you want to
use this command for an on-premises farm, please refer to
http://blogs.msdn.com/b/vesku/archive/2014/06/09/provisioning-site-collections-using-sp-app-model-in-on-
premises-with-just-csom.aspx

Examples
------------------EXAMPLE 1------------------

New-PnPTenantSite -Title Contoso -Url https://tenant.sharepoint.com/sites/contoso -Owner user@example.org -


TimeZone 4 -Template STS#0

This will add a site collection with the title 'Contoso', the url 'https://tenant.sharepoint.com/sites/contoso', the
timezone 'UTC+01:00',the owner 'user@example.org' and the template used will be STS#0, a TeamSite
------------------EXAMPLE 2------------------

New-PnPTenantSite -Title Contoso -Url /sites/contososite -Owner user@example.org -TimeZone 4 -Template STS#0

This will add a site collection with the title 'Contoso', the url 'https://tenant.sharepoint.com/sites/contososite' of
which the base part will be picked up from your current connection, the timezone 'UTC+01:00', the owner
'user@example.org' and the template used will be STS#0, a TeamSite
Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Lcid
Specifies the language of this site collection. For more information, see Locale IDs Assigned by Microsoft:
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splanguage.lcid.aspx. To get the list of supported
languages use: (Get-PnPWeb -Includes RegionalSettings.InstalledLanguages).RegionalSettings.InstalledLanguages

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the user name of the site collection's primary owner. The owner must be a user instead of a security group
or an email-enabled security group.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RemoveDeletedSite
Specifies if any existing site with the same URL should be removed from the recycle bin
Only applicable to: SharePoint Online
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ResourceQuota
Specifies the quota for this site collection in Sandboxed Solutions units. This value must not exceed the company's
aggregate available Sandboxed Solutions quota. The default value is 0. For more information, see Resource Usage
Limits on Sandboxed Solutions in SharePoint 2010 : http://msdn.microsoft.com/en-us/library/gg615462.aspx.

Type: Double
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ResourceQuotaWarningLevel
Specifies the warning level for the resource quota. This value must not exceed the value set for the ResourceQuota
parameter

Type: Double
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StorageQuota
Specifies the storage quota for this site collection in megabytes. This value must not exceed the company's
available quota.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StorageQuotaWarningLevel
Specifies the warning level for the storage quota in megabytes. This value must not exceed the values set for the
StorageQuota parameter

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the site collection template type. Use the Get-PnPWebTemplates cmdlet to get the list of valid templates.
If no template is specified, one can be added later. The Template and LocaleId parameters must be a valid
combination as returned from the Get-PnPWebTemplates cmdlet.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TimeZone
Use Get-PnPTimeZoneId to retrieve possible timezone values

Type: Int
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
Specifies the title of the new site collection

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the full URL of the new site collection. It must be in a valid managed path in the company's site. For
example, for company contoso, valid managed paths are https://contoso.sharepoint.com/sites and
https://contoso.sharepoint.com/teams.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Wait

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTenantTemplate
In ths Article

Creates a new tenant template object

Syntax
New-PnPTenantTemplate [-Author <String>]
[-Description <String>]
[-DisplayName <String>]
[-Generator <String>]

Examples
------------------EXAMPLE 1------------------

$template = New-PnPTenantTemplate

Creates a new instance of a tenant template object.

Parameters
-Author

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Generator
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTerm
In ths Article

Creates a taxonomy term

Syntax
New-PnPTerm -Name <String>
-TermSet <Id, Title or TaxonomyItem>
-TermGroup <Id, Title or TermGroup>
[-Id <Guid>]
[-Lcid <Int>]
[-Description <String>]
[-CustomProperties <Hashtable>]
[-LocalCustomProperties <Hashtable>]
[-TermStore <Id, Name or Object>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

New-PnPTerm -TermSet "Departments" -TermGroup "Corporate" -Name "Finance"

Creates a new taxonomy term named "Finance" in the termset Departments which is located in the "Corporate"
termgroup

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CustomProperties
Custom Properties
Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
Descriptive text to help users understand the intended use of this term.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Id
The Id to use for the term; if not specified, or the empty GUID, a random GUID is generated and used.

Type: Guid
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Lcid
The locale id to use for the term. Defaults to the current locale id.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LocalCustomProperties
Custom Properties

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the term.

Type: String
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False
-TermGroup
The termgroup to create the term in.

Type: Id, Title or TermGroup


Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-TermSet
The termset to add the term to.

Type: Id, Title or TaxonomyItem


Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-TermStore
Term store to check; if not specified the default term store is used.

Type: Id, Name or Object


Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Taxonomy.Term

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTermGroup
In ths Article

Creates a taxonomy term group

Syntax
New-PnPTermGroup -Name <String>
[-Id <Guid>]
[-Description <String>]
[-TermStore <Id, Name or Object>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

New-PnPTermGroup -GroupName "Countries"

Creates a new taxonomy term group named "Countries"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
Description to use for the term group.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Id
GUID to use for the term group; if not specified, or the empty GUID, a random GUID is generated and used.
Type: Guid
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the taxonomy term group to create.

Type: String
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-TermStore
Term store to add the group to; if not specified the default term store is used.

Type: Id, Name or Object


Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Taxonomy.TermGroup

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPTermSet
In ths Article

Creates a taxonomy term set

Syntax
New-PnPTermSet -Name <String>
-TermGroup <Id, Title or TermGroup>
[-Id <Guid>]
[-Lcid <Int>]
[-Contact <String>]
[-Description <String>]
[-IsOpenForTermCreation [<SwitchParameter>]]
[-IsNotAvailableForTagging [<SwitchParameter>]]
[-Owner <String>]
[-StakeHolders <String[]>]
[-CustomProperties <Hashtable>]
[-TermStore <Id, Name or Object>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

New-PnPTermSet -Name "Department" -TermGroup "Corporate"

Creates a new termset named "Department" in the group named "Corporate"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Contact
An e-mail address for term suggestion and feedback. If left blank the suggestion feature will be disabled.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CustomProperties

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
Descriptive text to help users understand the intended use of this term set.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Id
The Id to use for the term set; if not specified, or the empty GUID, a random GUID is generated and used.

Type: Guid
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IsNotAvailableForTagging
By default a term set is available to be used by end users and content editors of sites consuming this term set.
Specify this switch to turn this off

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IsOpenForTermCreation
When a term set is closed, only metadata managers can add terms to this term set. When it is open, users can add
terms from a tagging application. Not specifying this switch will make the term set closed.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Lcid
The locale id to use for the term set. Defaults to the current locale id.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the termset.

Type: String
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Owner
The primary user or group of this term set.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StakeHolders
People and groups in the organization that should be notified before major changes are made to the term set. You
can enter multiple users or groups.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermGroup
Name, id or actually termgroup to create the termset in.

Type: Id, Title or TermGroup


Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-TermStore
Term store to check; if not specified the default term store is used.
Type: Id, Name or Object
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Taxonomy.TermSet

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPUnifiedGroup
In ths Article

Creates a new Office 365 Group (aka Unified Group). Requires the Azure Active Directory application permission
'Group.ReadWrite.All'.

Syntax
New-PnPUnifiedGroup -DisplayName <String>
-Description <String>
-MailNickname <String>
[-Owners <String[]>]
[-Members <String[]>]
[-IsPrivate [<SwitchParameter>]]
[-GroupLogoPath <String>]
[-CreateTeam [<SwitchParameter>]]
[-Force [<SwitchParameter>]]

Examples
------------------EXAMPLE 1------------------

New-PnPUnifiedGroup -DisplayName $displayName -Description $description -MailNickname $nickname

Creates a public Office 365 Group with all the required properties
------------------EXAMPLE 2------------------

New-PnPUnifiedGroup -DisplayName $displayName -Description $description -MailNickname $nickname -Owners


$arrayOfOwners -Members $arrayOfMembers

Creates a public Office 365 Group with all the required properties, and with a custom list of Owners and a custom
list of Members
------------------EXAMPLE 3------------------

New-PnPUnifiedGroup -DisplayName $displayName -Description $description -MailNickname $nickname -IsPrivate

Creates a private Office 365 Group with all the required properties
------------------EXAMPLE 4------------------

New-PnPUnifiedGroup -DisplayName $displayName -Description $description -MailNickname $nickname -Owners


$arrayOfOwners -Members $arrayOfMembers -IsPrivate

Creates a private Office 365 Group with all the required properties, and with a custom list of Owners and a custom
list of Members

Parameters
-CreateTeam
Creates a MS Teams team associated with created group.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The Description of the Office 365 Group.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The Display Name of the Office 365 Group.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-GroupLogoPath
The path to the logo file of to set.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IsPrivate
Makes the group private when selected.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MailNickname
The Mail Nickname of the Office 365 Group. Cannot contain spaces.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Members
The array UPN values of the group's members.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owners
The array UPN values of the group's owners.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPUPABulkImportJob
In ths Article

Submit up a new user profile bulk import job.

Syntax
New-PnPUPABulkImportJob -Folder <String>
-Path <String>
-UserProfilePropertyMapping <Hashtable>
-IdProperty <String>
[-IdType <ImportProfilePropertiesUserIdType>]
[-Connection <SPOnlineConnection>]

Description
See https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/bulk-user-profile-update-api-for-
sharepoint-online for information on the API and how the bulk import process works.

Examples
------------------EXAMPLE 1------------------

@"
{
"value": [
{
"IdName": "mikaels@contoso.com",
"Department": "PnP",
},
{
"IdName": "vesaj@contoso.com",
"Department": "PnP",
}
]
}
"@ > profiles.json

New-PnPUPABulkImportJob -Folder "Shared Documents" -Path profiles.json -IdProperty "IdName" -


UserProfilePropertyMapping @{"Department"="Department"}

This will submit a new user profile bulk import job to SharePoint Online.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
Site or server relative URL of the folder to where you want to store the import job file.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-IdProperty
The name of the identifying property in your file.

Type: String
Required: True
Position: 3
Accept pipeline input: False
Accept wildcard characters: False

-IdType
The type of profile identifier (Email/CloudId/PrincipalName). Defaults to Email.

Type: ImportProfilePropertiesUserIdType
Required: False
Position: 4
Accept pipeline input: False
Accept wildcard characters: False

-Path
The local file path.

Type: String
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-UserProfilePropertyMapping
Specify user profile property mapping between the import file and UPA property names.

Type: Hashtable
Required: True
Position: 2
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPUser
In ths Article

Adds a user to the built-in Site User Info List and returns a user object

Syntax
New-PnPUser -LoginName <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

New-PnPUser -LoginName user@company.com

Adds a new user with the login user@company.com to the current site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LoginName
The users login name (user@company.com)

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.User

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

New-PnPWeb
In ths Article

Creates a new subweb under the current web

Syntax
New-PnPWeb -Title <String>
-Url <String>
-Template <String>
[-Description <String>]
[-Locale <Int>]
[-BreakInheritance [<SwitchParameter>]]
[-InheritNavigation [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

New-PnPWeb -Title "Project A Web" -Url projectA -Description "Information about Project A" -Locale 1033 -
Template "STS#0"

Creates a new subweb under the current web with URL projectA

Parameters
-BreakInheritance
By default the subweb will inherit its security from its parent, specify this switch to break this inheritance

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description of the new web

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InheritNavigation
Specifies whether the site inherits navigation.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Locale
The language id of the new web. default = 1033 for English

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Template
The site definition template to use for the new web, e.g. STS#0. Use Get-PnPWebTemplates to fetch a list of
available templates

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the new web

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Url
The URL of the new web

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Web

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Publish-PnPApp
In ths Article

Publishes/Deploys/Trusts an available app in the app catalog

Syntax
Publish-PnPApp -Identity <AppMetadataPipeBind>
[-SkipFeatureDeployment [<SwitchParameter>]]
[-Scope <AppCatalogScope>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Publish-PnPApp -Identity 2646ccc3-6a2b-46ef-9273-81411cbbb60f

This will deploy/trust an app into the app catalog. Notice that the app needs to be available in the tenant scoped
app catalog
------------------EXAMPLE 2------------------

Publish-PnPApp -Identity 2646ccc3-6a2b-46ef-9273-81411cbbb60f -Scope Site

This will deploy/trust an app into the app catalog. Notice that the app needs to be available in the site collection
scoped app catalog

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Id of the app
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppMetadataPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Defines which app catalog to use. Defaults to Tenant
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppCatalogScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SkipFeatureDeployment
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Read-PnPProvisioningTemplate
In ths Article

Loads/Reads a PnP file from the file system or a string

Syntax
Read-PnPProvisioningTemplate -Path <String>
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]

Read-PnPProvisioningTemplate -Xml <String>


[-TemplateProviderExtensions <ITemplateProviderExtension[]>]

Examples
------------------EXAMPLE 1------------------

Read-PnPProvisioningTemplate -Path template.pnp

Loads a PnP file from the file system


------------------EXAMPLE 2------------------

Read-PnPProvisioningTemplate -Path template.pnp -TemplateProviderExtensions $extensions

Loads a PnP file from the file system using some custom template provider extensions while loading the file.
------------------EXAMPLE 3------------------

Read-PnPProvisioningTemplate -Xml $xml

Reads a PnP Provisioning template from a string containing the XML of a provisioning template

Parameters
-Path
Filename to read from, optionally including full path.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False
-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while loading the template.

Type: ITemplateProviderExtension[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Xml
Variable to read from, containing the valid XML of a provisioning template.

Type: String
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Read-PnPTenantTemplate
In ths Article

Loads/Reads a PnP tenant template from the file system and returns an in-memory instance of this template.

Syntax
Read-PnPTenantTemplate -Path <String>
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]

Examples
------------------EXAMPLE 1------------------

Read-PnPTenantTemplate -Path template.pnp

Reads a PnP tenant template file from the file system and returns an in-memory instance

Parameters
-Path
Filename to read from, optionally including full path.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while loading the template.

Type: ITemplateProviderExtension[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Register-PnPHubSite
In ths Article

Registers a site as a hubsite

Syntax
Register-PnPHubSite -Site <SitePipeBind>
[-Connection <SPOnlineConnection>]

Description
Registers a site as a hubsite

Examples
------------------EXAMPLE 1------------------

Register-PnPHubSite -Site https://tenant.sharepoint.com/sites/myhubsite

This example registers the specified site as a hubsite

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Site
The site to register as a hubsite

Type: SitePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPAlert
In ths Article

Removes an alert for a user

Syntax
Remove-PnPAlert -Identity <AlertPipeBind>
[-User <UserPipeBind>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPAlert -Identity 641ac67f-0ce0-4837-874a-743c8f8572a7

Removes the alert with the specified ID for the current user
------------------EXAMPLE 2------------------

Remove-PnPAlert -Identity 641ac67f-0ce0-4837-874a-743c8f8572a7 -User


"i:0#.f|membership|Alice@contoso.onmicrosoft.com"

Removes the alert with the specified ID for the user specified

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The alert id, or the actual alert object to remove.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AlertPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-User
User to remove the alert for (User ID, login name or actual User object). Skip this parameter to use the current
user. Note: Only site owners can remove alerts for other users.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: UserPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPApp
In ths Article

Removes an app from the app catalog

Syntax
Remove-PnPApp -Identity <AppMetadataPipeBind>
[-Scope <AppCatalogScope>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will remove the specified app from the tenant scoped app catalog
------------------EXAMPLE 2------------------

Remove-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Site

This will remove the specified app from the site collection scoped app catalog

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Id of the Addin Instance
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: AppMetadataPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Defines which app catalog to use. Defaults to Tenant
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppCatalogScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPApplicationCustomizer
In ths Article

Removes a SharePoint Framework client side extension application customizer

Syntax
Remove-PnPApplicationCustomizer [-Identity <UserCustomActionPipeBind>]
[-Scope <CustomActionScope>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Remove-PnPApplicationCustomizer -ClientSideComponentId <GuidPipeBind>


[-Scope <CustomActionScope>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Removes a SharePoint Framework client side extension application customizer by removing a user custom action
from a web or sitecollection

Examples
------------------EXAMPLE 1------------------

Remove-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2

Removes the custom action representing the client side extension registration with the id 'aa66f67e-46c0-4474-
8a82-42bf467d07f2'.
------------------EXAMPLE 2------------------

Remove-PnPCustomAction -ClientSideComponentId aa66f67e-46c0-4474-8a82-42bf467d07f2 -Scope web

Removes the custom action(s) being registered for a SharePoint Framework solution having the id 'aa66f67e-
46c0-4474-8a82-42bf467d07f2' in its manifest from the current web.

Parameters
-ClientSideComponentId
The Client Side Component Id of the SharePoint Framework client side extension application customizer found in
the manifest for which existing custom action(s) should be removed
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Use the -Force flag to bypass the confirmation question
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The id or name of the CustomAction representing the client side extension registration that needs to be removed
or a CustomAction instance itself
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: UserCustomActionPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Define if the CustomAction representing the client side extension registration is to be found at the web or site
collection scope. Specify All to allow deletion from either web or site collection (default).
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPClientSideComponent
In ths Article

Removes a Client-Side component from a page

Syntax
Remove-PnPClientSideComponent -Page <ClientSidePagePipeBind>
-InstanceId <GuidPipeBind>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPClientSideComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82

Removes the control specified from the page.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If specified you will not receive the confirmation question
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-InstanceId
The instance id of the component
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Page
The name of the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPClientSidePage
In ths Article

Removes a Client-Side Page

Syntax
Remove-PnPClientSidePage -Identity <ClientSidePagePipeBind>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPClientSidePage -Identity "MyPage"

Removes the Client-Side page named 'MyPage.aspx'


------------------EXAMPLE 2------------------

Remove-PnPClientSidePage -Identity "Templates/MyPageTemplate"

Removes the specified Client-Side page which is located in the Templates folder of the Site Pages library.
------------------EXAMPLE 3------------------

Remove-PnPClientSidePage $page

Removes the specified Client-Side page which is contained in the $page variable.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Force
Specifying the Force parameter will skip the confirmation question.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The name of the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPContentType
In ths Article

Removes a content type from a web

Syntax
Remove-PnPContentType -Identity <ContentTypePipeBind>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPContentType -Identity "Project Document"

This will remove a content type called "Project Document" from the current web
------------------EXAMPLE 2------------------

Remove-PnPContentType -Identity "Project Document" -Force

This will remove a content type called "Project Document" from the current web with force

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The name or ID of the content type to remove

Type: ContentTypePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPContentTypeFromDocumentSet
In ths Article

Removes a content type from a document set

Syntax
Remove-PnPContentTypeFromDocumentSet -ContentType <ContentTypePipeBind>
-DocumentSet <DocumentSetPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPContentTypeFromDocumentSet -ContentType "Test CT" -DocumentSet "Test Document Set"

This will remove the content type called 'Test CT' from the document set called ''Test Document Set'
------------------EXAMPLE 2------------------

Remove-PnPContentTypeFromDocumentSet -ContentType 0x0101001F1CEFF1D4126E4CAD10F00B6137E969 -DocumentSet


0x0120D520005DB65D094035A241BAC9AF083F825F3B

This will remove the content type with ID '0x0101001F1CEFF1D4126E4CAD10F00B6137E969' from the
document set with ID '0x0120D520005DB65D094035A241BAC9AF083F825F3B'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
The content type to remove. Either specify name, an id, or a content type object.
Type: ContentTypePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DocumentSet
The document set to remove the content type from. Either specify a name, a document set template object, an id, or
a content type object

Type: DocumentSetPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPContentTypeFromList
In ths Article

Removes a content type from a list

Syntax
Remove-PnPContentTypeFromList -List <ListPipeBind>
-ContentType <ContentTypePipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPContentTypeFromList -List "Documents" -ContentType "Project Document"

This will remove a content type called "Project Document" from the "Documents" list

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
The name of a content type, its ID or an actual content type object that needs to be removed from the specified list.

Type: ContentTypePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The name of the list, its ID or an actual list object from where the content type needs to be removed from
Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPCustomAction
In ths Article

Removes a custom action

Syntax
Remove-PnPCustomAction [-Identity <UserCustomActionPipeBind>]
[-Scope <CustomActionScope>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2

Removes the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2'.


------------------EXAMPLE 2------------------

Remove-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2 -Scope web

Removes the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2' from the current web.
------------------EXAMPLE 3------------------

Remove-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2 -Force

Removes the custom action with the id 'aa66f67e-46c0-4474-8a82-42bf467d07f2' without asking for
confirmation.
------------------EXAMPLE 4------------------

Get-PnPCustomAction -Scope All | ? Location -eq ScriptLink | Remove-PnPCustomAction

Removes all custom actions that are ScriptLinks

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Use the -Force flag to bypass the confirmation question

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The id or name of the CustomAction that needs to be removed or a CustomAction instance itself

Type: UserCustomActionPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Define if the CustomAction is to be found at the web or site collection scope. Specify All to allow deletion from
either web or site collection.

Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPDeletedUnifiedGroup
In ths Article

Permanently removes one deleted Office 365 Group (aka Unified Group)

Syntax
Remove-PnPDeletedUnifiedGroup -Identity <UnifiedGroupPipeBind>

Examples
------------------EXAMPLE 1------------------

Remove-PnPDeletedUnifiedGroup -Identity 38b32e13-e900-4d95-b860-fb52bc07ca7f

Permanently removes a deleted Office 365 Group based on its ID


------------------EXAMPLE 2------------------

$group = Get-PnPDeletedUnifiedGroup -Identity 38b32e13-e900-4d95-b860-fb52bc07ca7f


Remove-PnPDeletedUnifiedGroup -Identity $group

Permanently removes the provided deleted Office 365 Group

Parameters
-Identity
The Identity of the deleted Office 365 Group

Type: UnifiedGroupPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPEventReceiver
In ths Article

Remove an eventreceiver

Syntax
Remove-PnPEventReceiver -Identity <EventReceiverPipeBind>
[-List <ListPipeBind>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Removes/unregisters a specific eventreceiver

Examples
------------------EXAMPLE 1------------------

Remove-PnPEventReceiver -Identity fb689d0e-eb99-4f13-beb3-86692fd39f22

This will remove the event receiver with ReceiverId "fb689d0e-eb99-4f13-beb3-86692fd39f22" from the current
web
------------------EXAMPLE 2------------------

Remove-PnPEventReceiver -List ProjectList -Identity fb689d0e-eb99-4f13-beb3-86692fd39f22

This will remove the event receiver with ReceiverId "fb689d0e-eb99-4f13-beb3-86692fd39f22" from the
"ProjectList" list
------------------EXAMPLE 3------------------

Remove-PnPEventReceiver -List ProjectList -Identity MyReceiver

This will remove the event receiver with ReceiverName "MyReceiver" from the "ProjectList" list
------------------EXAMPLE 4------------------

Remove-PnPEventReceiver -List ProjectList

This will remove all event receivers from the "ProjectList" list
------------------EXAMPLE 5------------------

Remove-PnPEventReceiver

This will remove all event receivers from the current site
------------------EXAMPLE 6------------------

Get-PnPEventReceiver | ? ReceiverUrl -Like "*azurewebsites.net*" | Remove-PnPEventReceiver

This will remove all event receivers from the current site which are pointing to a service hosted on Azure Websites

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Guid of the event receiver on the list

Type: EventReceiverPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-List
The list object from where to remove the event receiver object

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPField
In ths Article

Removes a field from a list or a site

Syntax
Remove-PnPField -Identity <FieldPipeBind>
[-Force [<SwitchParameter>]]
[-List <ListPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPField -Identity "Speakers"

Removes the speakers field from the site columns


------------------EXAMPLE 2------------------

Remove-PnPField -List "Demo list" -Identity "Speakers"

Removes the speakers field from the list Demo list

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The field object or name to remove

Type: FieldPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-List
The list object or name where to remove the field from

Type: ListPipeBind
Required: False
Position: 1
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPFieldFromContentType
In ths Article

Removes a site column from a content type

Syntax
Remove-PnPFieldFromContentType -Field <FieldPipeBind>
-ContentType <ContentTypePipeBind>
[-DoNotUpdateChildren [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPFieldFromContentType -Field "Project_Name" -ContentType "Project Document"

This will remove the site column with an internal name of "Project_Name" from a content type called "Project
Document"
------------------EXAMPLE 2------------------

Remove-PnPFieldFromContentType -Field "Project_Name" -ContentType "Project Document" -DoNotUpdateChildren

This will remove the site column with an internal name of "Project_Name" from a content type called "Project
Document". It will not update content types that inherit from the "Project Document" content type.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
The content type where the field is to be removed from
Type: ContentTypePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DoNotUpdateChildren
If specified, inherited content types will not be updated

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Field
The field to remove

Type: FieldPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPFile
In ths Article

Removes a file.

Syntax
Remove-PnPFile -ServerRelativeUrl <String>
[-Recycle [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Remove-PnPFile -SiteRelativeUrl <String>


[-Recycle [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

PS:>Remove-PnPFile -ServerRelativeUrl /sites/project/_catalogs/themes/15/company.spcolor

Removes the file company.spcolor


------------------EXAMPLE 2------------------

PS:>Remove-PnPFile -SiteRelativeUrl _catalogs/themes/15/company.spcolor

Removes the file company.spcolor


------------------EXAMPLE 3------------------

PS:>Remove-PnPFile -SiteRelativeUrl _catalogs/themes/15/company.spcolor -Recycle

Removes the file company.spcolor and saves it to the Recycle Bin

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Recycle

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativeUrl
Server relative URL to the file

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-SiteRelativeUrl
Site relative URL to the file

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPFileFromProvisioningTemplate
In ths Article

Removes a file from a PnP Provisioning Template

Syntax
Remove-PnPFileFromProvisioningTemplate -Path <String>
-FilePath <String>
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPFileFromProvisioningTemplate -Path template.pnp -FilePath filePath

Removes a file from an in-memory PnP Provisioning Template

Parameters
-FilePath
The relative File Path of the file to remove from the in-memory template

Type: String
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Path
Filename to read the template from, optionally including full path.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while saving the template.
Type: ITemplateProviderExtension[]
Required: False
Position: 2
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPFolder
In ths Article

Deletes a folder within a parent folder

Syntax
Remove-PnPFolder -Name <String>
-Folder <String>
[-Recycle [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPFolder -Name NewFolder -Folder _catalogs/masterpage

Removes the folder 'NewFolder' from '_catalogsmasterpage'


------------------EXAMPLE 2------------------

Remove-PnPFolder -Name NewFolder -Folder _catalogs/masterpage -Recycle

Removes the folder 'NewFolder' from '_catalogsmasterpage' and is saved in the Recycle Bin

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
The parent folder in the site
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The folder name

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Recycle

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPGroup
In ths Article

Removes a group from a web.

Syntax
Remove-PnPGroup [-Identity <GroupPipeBind>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPGroup -Identity "My Users"

Removes the group "My Users"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
A group object, an ID or a name of a group to remove
Type: GroupPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPHomeSite
In ths Article

Removes the currently set site as the home site

Syntax
Remove-PnPHomeSite [-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPHomeSite

Removes the currently set site as the home site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPHubSiteAssociation
In ths Article

Disconnects a site from a hubsite.

Syntax
Remove-PnPHubSiteAssociation -Site <SitePipeBind>
[-Connection <SPOnlineConnection>]

Description
Disconnects an site from a hubsite

Examples
------------------EXAMPLE 1------------------

Remove-PnPHubSiteAssociation -Site https://tenant.sharepoint.com/sites/mysite

This example adds the specified site to the hubsite.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Site
The site to disconnect from its hubsite

Type: SitePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPIndexedProperty
In ths Article

Removes a key from propertybag to be indexed by search. The key and it's value remain in the propertybag,
however it will not be indexed anymore.

Syntax
Remove-PnPIndexedProperty -Key <String>
[-List <ListPipeBind>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPIndexedProperty -key "MyIndexProperty"

Removes the Indexed property "MyIndexProperty" from the current web

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key
Key of the property bag value to be removed from indexing

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object or name from where to remove the indexed properties
Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPJavaScriptLink
In ths Article

Removes a JavaScript link or block from a web or sitecollection

Syntax
Remove-PnPJavaScriptLink [-Identity <UserCustomActionPipeBind>]
[-Force [<SwitchParameter>]]
[-Scope <CustomActionScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPJavaScriptLink -Identity jQuery

Removes the injected JavaScript file with the name jQuery from the current web after confirmation
------------------EXAMPLE 2------------------

Remove-PnPJavaScriptLink -Identity jQuery -Scope Site

Removes the injected JavaScript file with the name jQuery from the current site collection after confirmation
------------------EXAMPLE 3------------------

Remove-PnPJavaScriptLink -Identity jQuery -Scope Site -Confirm:$false

Removes the injected JavaScript file with the name jQuery from the current site collection and will not ask for
confirmation
------------------EXAMPLE 4------------------

Remove-PnPJavaScriptLink -Scope Site

Removes all the injected JavaScript files from the current site collection after confirmation for each of them
------------------EXAMPLE 5------------------

Remove-PnPJavaScriptLink -Identity faea0ce2-f0c2-4d45-a4dc-73898f3c2f2e -Scope All

Removes the injected JavaScript file with id faea0ce2-f0c2-4d45-a4dc-73898f3c2f2e from both the Web and Site
scopes
------------------EXAMPLE 6------------------

Get-PnPJavaScriptLink -Scope All | ? Sequence -gt 1000 | Remove-PnPJavaScriptLink

Removes all the injected JavaScript files from both the Web and Site scope that have a sequence number higher
than 1000

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Use the -Force flag to bypass the confirmation question

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Name or id of the JavaScriptLink to remove. Omit if you want to remove all JavaScript Links.

Type: UserCustomActionPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Define if the JavaScriptLink is to be found at the web or site collection scope. Specify All to allow deletion from
either web or site collection.

Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPList
In ths Article

Deletes a list

Syntax
Remove-PnPList -Identity <ListPipeBind>
[-Recycle [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPList -Identity Announcements

Removes the list named 'Announcements'. Asks for confirmation.


------------------EXAMPLE 2------------------

Remove-PnPList -Identity Announcements -Force

Removes the list named 'Announcements' without asking for confirmation.


------------------EXAMPLE 3------------------

Remove-PnPList -Title Announcements -Recycle

Removes the list named 'Announcements' and saves to the Recycle Bin

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID or Title of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Recycle
Defines if the list should be moved to recycle bin or directly deleted.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPListItem
In ths Article

Deletes an item from a list

Syntax
Remove-PnPListItem -List <ListPipeBind>
-Identity <ListItemPipeBind>
[-Recycle [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPListItem -List "Demo List" -Identity "1" -Force

Removes the listitem with id "1" from the "Demo List" list.
------------------EXAMPLE 2------------------

Remove-PnPListItem -List "Demo List" -Identity "1" -Force -Recycle

Removes the listitem with id "1" from the "Demo List" list and saves it in the Recycle Bin.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the listitem, or actual ListItem object

Type: ListItemPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Title or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Recycle

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPNavigationNode
In ths Article

Removes a menu item from either the quicklaunch or top navigation

Syntax
Remove-PnPNavigationNode -Identity <NavigationNodePipeBind>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Remove-PnPNavigationNode -All [<SwitchParameter>]


[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPNavigationNode -Identity 1032

Removes the navigation node with the specified id


------------------EXAMPLE 2------------------

$nodes = Get-PnPNavigationNode -QuickLaunch


PS:>$nodes | Select-Object -First 1 | Remove-PnPNavigationNode -Force

Retrieves all navigation nodes from the Quick Launch navigation, then removes the first node in the list and it will
not ask for a confirmation
------------------EXAMPLE 3------------------

Remove-PnPNavigationNode -Title Recent -Location QuickLaunch

Will remove the recent navigation node from the quick launch in the current web.
------------------EXAMPLE 4------------------

Remove-PnPNavigationNode -Title Home -Location TopNavigationBar -Force

Will remove the home navigation node from the top navigation bar without prompting for a confirmation in the
current web.
------------------EXAMPLE 5------------------

Get-PnPNavigationNode -Location QuickLaunch | Remove-PnPNavigationNode -Force

Will remove all the navigation nodes from the quick launch bar without prompting for a confirmation in the current
web.

Parameters
-All
Specifying the All parameter will remove all the nodes from specified Location.

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Id or node object to delete

Type: NavigationNodePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPOrgAssetsLibrary
In ths Article

Removes a given document library as a organizational asset source

Syntax
Remove-PnPOrgAssetsLibrary -LibraryUrl <String>
[-ShouldRemoveFromCdn <Boolean>]
[-CdnType <SPOTenantCdnType>]
[-Connection <SPOnlineConnection>]

Description
Removes a given document library as a organizational asset source based on its server relative URL in your
Sharepoint Online Tenant. It will not remove the document library itself. It may take some time before this change
will be reflected in the webinterface.

Examples
------------------EXAMPLE 1------------------

Remove-PnPOrgAssetsLibrary -LibraryUrl "sites/branding/logos"

This example removes the document library with the url "logos" residing in the sitecollection with the url
"sites/branding/logos" from the list with organizational assets keeping it as an Office 365 CDN source
------------------EXAMPLE 2------------------

Remove-PnPOrgAssetsLibrary -LibraryUrl "sites/branding/logos" -ShouldRemoveFromCdn $true

This example removes the document library with the url "logos" residing in the sitecollection with the url
"sites/branding/logos" from the list with organizational assets also removing it as a Public Office 365 CDN source
------------------EXAMPLE 3------------------

Remove-PnPOrgAssetsLibrary -LibraryUrl "sites/branding/logos" -ShouldRemoveFromCdn $true -CdnType Private

This example removes the document library with the url "logos" residing in the sitecollection with the url
"sites/branding/logos" from the list with organizational assets also removing it as a Private Office 365 CDN source

Parameters
-CdnType
Indicates what type of Office 365 CDN source the document library that will no longer be flagged as an
organizational asset was of

Type: SPOTenantCdnType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LibraryUrl
The server relative url of the document library flagged as organizational asset which you want to remove, i.e.
"sites/branding/logos"

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShouldRemoveFromCdn
Boolean indicating if the document library that will no longer be flagged as an organizational asset also needs to be
removed as an Office 365 CDN source

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPOrgNewsSite
In ths Article

Removes a given site from the list of organizational news sites.

Syntax
Remove-PnPOrgNewsSite -OrgNewsSiteUrl <SitePipeBind>
[-Connection <SPOnlineConnection>]

Description
Removes a given site from the list of organizational news sites based on its URL in your Sharepoint Online Tenant.

Examples
------------------EXAMPLE 1------------------

Remove-PnPOrgNewsSite -OrgNewsSiteUrl https://tenant.sharepoint.com/sites/mysite

This example removes the specified site from list of organization's news sites.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OrgNewsSiteUrl
The site to be removed from list of organization's news sites

Type: SitePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPPropertyBagValue
In ths Article

Removes a value from the property bag

Syntax
Remove-PnPPropertyBagValue -Key <String>
[-Folder <String>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPPropertyBagValue -Key MyKey

This will remove the value with key MyKey from the current web property bag
------------------EXAMPLE 2------------------

Remove-PnPPropertyBagValue -Key MyKey -Folder /MyFolder

This will remove the value with key MyKey from the folder MyFolder which is located in the root folder of the
current web
------------------EXAMPLE 3------------------

Remove-PnPPropertyBagValue -Key MyKey -Folder /

This will remove the value with key MyKey from the root folder of the current web

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
Site relative url of the folder. See examples for use.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key
Key of the property bag value to be removed

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPPublishingImageRendition
In ths Article

Removes an existing image rendition

Syntax
Remove-PnPPublishingImageRendition -Identity <ImageRenditionPipeBind>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPPublishingImageRendition -Name "MyImageRendition" -Width 800 -Height 600

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If provided, no confirmation will be asked to remove the Image Rendition.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The display name or id of the Image Rendition.
Type: ImageRenditionPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPRoleDefinition
In ths Article

Remove a Role Definition from a site

Syntax
Remove-PnPRoleDefinition -Identity <RoleDefinitionPipeBind>
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPRoleDefinition -Identity MyRoleDefinition

Removes the specified Role Definition (Permission Level) from the current site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation to delete the role definition

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The identity of the role definition, either a RoleDefinition object or a the name of roledefinition
Type: RoleDefinitionPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPSearchConfiguration
In ths Article

Remove the search configuration

Syntax
Remove-PnPSearchConfiguration -Configuration <String>
[-Scope <SearchConfigurationScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Remove-PnPSearchConfiguration -Path <String>


[-Scope <SearchConfigurationScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPSearchConfiguration -Configuration $config

Remove the search configuration for the current web (does not remove managed property mappings)
------------------EXAMPLE 2------------------

Remove-PnPSearchConfiguration -Configuration $config -Scope Site

Remove the search configuration for the current site collection (does not remove managed property mappings)
------------------EXAMPLE 3------------------

Remove-PnPSearchConfiguration -Configuration $config -Scope Subscription

Remove the search configuration for the current tenant (does not remove managed property mappings)
------------------EXAMPLE 4------------------

Remove-PnPSearchConfiguration -Path searchconfig.xml -Scope Subscription

Reads the search configuration from the specified XML file and remove it for the current tenant (does not remove
managed property mappings)
Parameters
-Configuration
Search configuration string

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path to a search configuration

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope

Type: SearchConfigurationScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPSiteClassification
In ths Article

Removes one or more existing site classification values from the list of available values. Requires a connection to
the Microsoft Graph

Syntax
Remove-PnPSiteClassification -Classifications <String>
[-Confirm [<SwitchParameter>]]

Examples
------------------EXAMPLE 1------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Remove-PnPSiteClassification -Classifications "HBI"

Removes the "HBI" site classification from the list of available values.
------------------EXAMPLE 2------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Remove-PnPSiteClassification -Classifications "HBI", "Top Secret"

Removes the "HBI" site classification from the list of available values.

Parameters
-Classifications

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Specifying the Confirm parameter will allow the confirmation question to be skipped

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPSiteCollectionAdmin
In ths Article

Removes one or more users as site collection administrators from the site collection in the current context

Syntax
Remove-PnPSiteCollectionAdmin -Owners <UserPipeBind>
[-Connection <SPOnlineConnection>]

Description
This command allows removing one to many users as site collection administrators from the site collection in the
current context. All existing site collection administrators not included in this command will remain site collection
administrator.

Examples
------------------EXAMPLE 1------------------

Remove-PnPSiteCollectionAdmin -Owners "user@contoso.onmicrosoft.com"

This will remove user@contoso.onmicrosoft.com as a site collection owner from the site collection in the current
context
------------------EXAMPLE 2------------------

Remove-PnPSiteCollectionAdmin -Owners @("user1@contoso.onmicrosoft.com", "user2@contoso.onmicrosoft.com")

This will remove user1@contoso.onmicrosoft.com and user2@contoso.onmicrosoft.com as site collection owners


from the site collection in the current context
------------------EXAMPLE 3------------------

Get-PnPUser | ? Title -Like "*Doe" | Remove-PnPSiteCollectionAdmin

This will remove all users with their title ending with "Doe" as site collection owners from the site collection in the
current context
------------------EXAMPLE 4------------------

Get-PnPSiteCollectionAdmin | Remove-PnPSiteCollectionAdmin

This will remove all existing site collection administrators from the site collection in the current context
Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owners
Specifies owner(s) to remove as site collection administrators. Can be both users and groups.

Type: UserPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPSiteCollectionAppCatalog
In ths Article

Removes a Site Collection scoped App Catalog from a site

Syntax
Remove-PnPSiteCollectionAppCatalog -Site <SitePipeBind>
[-Connection <SPOnlineConnection>]

Description
Notice that this will not remove the App Catalog list and its contents from the site.

Examples
------------------EXAMPLE 1------------------

Remove-PnPSiteCollectionAppCatalog -Site "https://contoso.sharepoint.com/sites/FinanceTeamsite"

This will remove a SiteCollection app catalog from the specified site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Site
Url of the site to remove the app catalog from.

Type: SitePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPSiteDesign
In ths Article

Removes a Site Design

Syntax
Remove-PnPSiteDesign -Identity <TenantSiteDesignPipeBind>
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPSiteDesign -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd

Removes the specified site design

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If specified you will not be asked to confirm removing the specified Site Design

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the site design to remove
Type: TenantSiteDesignPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPSiteDesignTask
In ths Article

Removes a Site Design Task. If the execution of the associated site script has already started the execution will not
be terminated.

Syntax
Remove-PnPSiteDesignTask -Identity <TenantSiteDesignTaskPipeBind>
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPSiteDesignTask -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd

Removes the specified site design task

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If specified you will not be asked to confirm removing the specified Site Design

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the site design to remove
Type: TenantSiteDesignTaskPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPSiteScript
In ths Article

Removes a Site Script

Syntax
Remove-PnPSiteScript -Identity <TenantSiteScriptPipeBind>
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPSiteScript -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd

Removes the specified site script

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If specified you will not be asked to confirm removing the specified Site Script

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the Site Script to remove
Type: TenantSiteScriptPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPStorageEntity
In ths Article

Remove Storage Entities / Farm Properties from either the tenant scoped app catalog or the current site collection
if the site has a site collection scoped app catalog

Syntax
Remove-PnPStorageEntity -Key <String>
[-Scope <StorageEntityScope>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPStorageEntity -Key MyKey

Removes an existing storage entity / farm property


------------------EXAMPLE 2------------------

Remove-PnPStorageEntity -Key MyKey -Scope Site

Removes an existing storage entity from the current site collection

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key
The key of the value to remove.
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Defines the scope of the storage entity. Defaults to Tenant.

Type: StorageEntityScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPStoredCredential
In ths Article

Removes a credential

Syntax
Remove-PnPStoredCredential -Name <String>
[-Force [<SwitchParameter>]]

Description
Removes a stored credential from the Windows Credential Manager

Examples
------------------EXAMPLE 1------------------

Remove-PnPStoredCredential -Name https://tenant.sharepoint.com

Removes the specified credential from the Windows Credential Manager

Parameters
-Force
If specified you will not be asked for confirmation

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The credential to remove

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPTaxonomyItem
In ths Article

Removes a taxonomy item

Syntax
Remove-PnPTaxonomyItem -TermPath <String>
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermPath
The path, delimited by | of the taxonomy item to remove, alike GROUPLABEL|TERMSETLABEL|TERMLABEL

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPTenantCdnOrigin
In ths Article

Removes an origin from the Public or Private content delivery network (CDN ).

Syntax
Remove-PnPTenantCdnOrigin -OriginUrl <String>
-CdnType <SPOTenantCdnType>
[-Connection <SPOnlineConnection>]

Description
Removes an origin from the Public or Private content delivery network (CDN ).
You must be a SharePoint Online global administrator to run the cmdlet.

Examples
------------------EXAMPLE 1------------------

Remove-PnPTenantCdnOrigin -OriginUrl /sites/site/subfolder -CdnType Public

This example removes the specified origin from the public CDN

Parameters
-CdnType
The cdn type to remove the origin from.

Type: SPOTenantCdnType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OriginUrl
The origin to remove.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPTenantSite
In ths Article

Removes a site collection

Syntax
Remove-PnPTenantSite -Url <String>
[-SkipRecycleBin [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
Removes a site collection which is listed in your tenant administration site.

Examples
------------------EXAMPLE 1------------------

Remove-PnPTenantSite -Url https://tenant.sharepoint.com/sites/contoso

This will remove the site collection with the url 'https://tenant.sharepoint.com/sites/contoso' and put it in the
recycle bin.
------------------EXAMPLE 2------------------

Remove-PnPTenantSite -Url https://tenant.sharepoint.com/sites/contoso -Force -SkipRecycleBin

This will remove the site collection with the url 'https://tenant.sharepoint.com/sites/contoso' with force and it will
skip the recycle bin.
------------------EXAMPLE 3------------------

Remove-PnPTenantSite -Url https://tenant.sharepoint.com/sites/contoso -FromRecycleBin

This will remove the site collection with the url 'https://tenant.sharepoint.com/sites/contoso' from the recycle bin.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SkipRecycleBin
Do not add to the tenant scoped recycle bin when selected.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the full URL of the site collection that needs to be deleted

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPTenantTheme
In ths Article

Removes a theme

Syntax
Remove-PnPTenantTheme -Identity <ThemePipeBind>
[-Connection <SPOnlineConnection>]

Description
Removes the specified theme from the tenant configuration

Examples
------------------EXAMPLE 1------------------

Remove-PnPTenantTheme -Name "MyCompanyTheme"

Removes the specified theme.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The name of the theme to retrieve

Type: ThemePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPTermGroup
In ths Article

Removes a taxonomy term group and all its containing termsets

Syntax
Remove-PnPTermGroup -GroupName <String>
[-TermStoreName <String>]
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-GroupName
Name of the taxonomy term group to delete.

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-TermStoreName
Term store to use; if not specified the default term store is used.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPUnifiedGroup
In ths Article

Removes one Office 365 Group (aka Unified Group). Requires the Azure Active Directory application permission
'Group.ReadWrite.All'.

Syntax
Remove-PnPUnifiedGroup -Identity <UnifiedGroupPipeBind>

Examples
------------------EXAMPLE 1------------------

Remove-PnPUnifiedGroup -Identity $groupId

Removes an Office 365 Group based on its ID


------------------EXAMPLE 2------------------

Remove-PnPUnifiedGroup -Identity $group

Removes the provided Office 365 Group


------------------EXAMPLE 3------------------

Get-PnPUnifiedGroup | ? Visibility -eq "Public" | Remove-PnPUnifiedGroup

Removes all the public Office 365 Groups

Parameters
-Identity
The Identity of the Office 365 Group

Type: UnifiedGroupPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPUser
In ths Article

Removes a specific user from the site collection User Information List

Syntax
Remove-PnPUser -Identity <UserPipeBind>
[-Force [<SwitchParameter>]]
[-Confirm [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
This command will allow the removal of a specific user from the User Information List

Examples
------------------EXAMPLE 1------------------

Remove-PnPUser -Identity 23

Remove the user with Id 23 from the User Information List of the current site collection
------------------EXAMPLE 2------------------

Remove-PnPUser -Identity i:0#.f|membership|user@tenant.onmicrosoft.com

Remove the user with LoginName i:0#.f|membership|user@tenant.onmicrosoft.com from the User Information List
of the current site collection
------------------EXAMPLE 3------------------

Get-PnPUser | ? Email -eq "user@tenant.onmicrosoft.com" | Remove-PnPUser

Remove the user with e-mail address user@tenant.onmicrosoft.com from the User Information List of the current
site collection
------------------EXAMPLE 4------------------

Remove-PnPUser -Identity i:0#.f|membership|user@tenant.onmicrosoft.com -Confirm:$false

Remove the user with LoginName i:0#.f|membership|user@tenant.onmicrosoft.com from the User Information List
of the current site collection without asking to confirm the removal first
Parameters
-Confirm
Specifying the Confirm parameter will allow the confirmation question to be skipped

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
User ID or login name

Type: UserPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Outputs
Microsoft.SharePoint.Client.User

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPUserFromGroup
In ths Article

Removes a user from a group

Syntax
Remove-PnPUserFromGroup -LoginName <String>
-Identity <GroupPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPUserFromGroup -LoginName user@company.com -GroupName 'Marketing Site Members'

Removes the user user@company.com from the Group 'Marketing Site Members'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
A group object, an ID or a name of a group

Type: GroupPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LoginName
A valid login name of a user (user@company.com)
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPView
In ths Article

Deletes a view from a list

Syntax
Remove-PnPView -Identity <ViewPipeBind>
-List <ListPipeBind>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPView -List "Demo List" -Identity "All Items"

Removes the view with title "All Items" from the "Demo List" list.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID or Title of the view.
Type: ViewPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-List
The ID or Url of the list.

Type: ListPipeBind
Required: True
Position: 1
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPWeb
In ths Article

Removes a subweb in the current web

Syntax
Remove-PnPWeb -Url <String>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Remove-PnPWeb -Identity <WebPipeBind>


[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPWeb -Url projectA

Remove a web
------------------EXAMPLE 2------------------

Remove-PnPWeb -Identity 5fecaf67-6b9e-4691-a0ff-518fc9839aa0

Remove a web specified by its ID


------------------EXAMPLE 3------------------

Get-PnPSubWebs | Remove-PnPWeb -Force

Remove all subwebs and do not ask for confirmation

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation to delete the subweb

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Identity/Id/Web object to delete

Type: WebPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Url
The site relative url of the web, e.g. 'Subweb1'

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPWebhookSubscription
In ths Article

Removes a Webhook subscription from the resource

Syntax
Remove-PnPWebhookSubscription -Identity <WebhookSubscriptionPipeBind>
[-List <ListPipeBind>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPWebhookSubscription -List MyList -Identity ea1533a8-ff03-415b-a7b6-517ee50db8b6

Removes the Webhook subscription with the specified id from the list MyList
------------------EXAMPLE 2------------------

$subscriptions = Get-PnPWebhookSubscriptions -List MyList


Remove-PnPWebhookSubscription -Identity $subscriptions[0] -List MyList

Removes the first Webhook subscription from the list MyList


------------------EXAMPLE 3------------------

$subscriptions = Get-PnPWebhookSubscriptions -List MyList


$subscriptions[0] | Remove-PnPWebhookSubscription -List MyList

Removes the first Webhook subscription from the list MyList

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The identity of the Webhook subscription to remove

Type: WebhookSubscriptionPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-List
The list object or name which the Webhook subscription will be removed from

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
OfficeDevPnP.Core.Entities.WebhookSubscription

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPWebPart
In ths Article

Removes a web part from a page

Syntax
Remove-PnPWebPart -Identity <GuidPipeBind>
-ServerRelativePageUrl <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Remove-PnPWebPart -Title <String>


-ServerRelativePageUrl <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPWebPart -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -Identity a2875399-d6ff-43a0-96da-


be6ae5875f82

This will remove the web part specified by ID to the specified page in the first row and the first column of the
HTML table present on the page
------------------EXAMPLE 2------------------

Remove-PnPWebPart -ServerRelativePageUrl "/sites/demo/sitepages/home.aspx" -Title MyWebpart

This will remove the web part specified by title to the specified page in the first row and the first column of the
HTML table present on the page

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Guid of the web part

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl
Server relative url of the web part page, e.g. /sites/demo/sitepages/home.aspx

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The name of the web part

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPWikiPage
In ths Article

Removes a wiki page

Syntax
Remove-PnPWikiPage -ServerRelativePageUrl <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Remove-PnPWikiPage -SiteRelativePageUrl <String>


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPWikiPage -PageUrl '/pages/wikipage.aspx'

Removes the page '/pages/wikipage.aspx'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-SiteRelativePageUrl
Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPWorkflowDefinition
In ths Article

Removes a workflow definition

Syntax
Remove-PnPWorkflowDefinition -Identity <WorkflowDefinitionPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Remove-PnPWorkflowDefinition -Identity $wfDef

Removes the workflow, retrieved by Get-PnPWorkflowDefinition, from the site.


------------------EXAMPLE 2------------------

Get-PnPWorkflowDefinition -Name MyWorkflow | Remove-PnPWorkflowDefinition

Get the workflow MyWorkFlow and remove from the site.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The definition to remove
Type: WorkflowDefinitionPipeBind
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Remove-PnPWorkflowSubscription
In ths Article

Remove workflow subscription

Syntax
Remove-PnPWorkflowSubscription -Identity <WorkflowSubscriptionPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Removes a previously registered workflow subscription

Examples
------------------EXAMPLE 1------------------

Remove-PnPWorkflowSubscription -identity $wfSub

Removes the workflowsubscription, retrieved by Get-PnPWorkflowSubscription.


------------------EXAMPLE 2------------------

Get-PnPWorkflowSubscription -Name MyWorkflow | Remove-PnPWorkflowSubscription

Get the workflowSubscription MyWorkFlow and remove it.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The subscription to remove
Type: WorkflowSubscriptionPipeBind
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Rename-PnPFile
In ths Article

Renames a file in its current location

Syntax
Rename-PnPFile -ServerRelativeUrl <String>
-TargetFileName <String>
[-OverwriteIfAlreadyExists [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Rename-PnPFile -SiteRelativeUrl <String>


-TargetFileName <String>
[-OverwriteIfAlreadyExists [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

PS:>Rename-PnPFile -ServerRelativeUrl /sites/project/Documents/company.docx -TargetFileName mycompany.docx

Renames a file named company.docx located in the document library called Documents located in the projects
sitecollection under the managed path sites to mycompany.docx. If a file named mycompany.aspx already exists, it
won't perform the rename.
------------------EXAMPLE 2------------------

PS:>Rename-PnPFile -SiteRelativeUrl Documents/company.aspx -TargetFileName mycompany.docx

Renames a file named company.docx located in the document library called Documents located in the current site
to mycompany.aspx. If a file named mycompany.aspx already exists, it won't perform the rename.
------------------EXAMPLE 3------------------

PS:>Rename-PnPFile -ServerRelativeUrl /sites/project/Documents/company.docx -TargetFileName mycompany.docx -


OverwriteIfAlreadyExists

Renames a file named company.docx located in the document library called Documents located in the projects
sitecollection under the managed path sites to mycompany.aspx. If a file named mycompany.aspx already exists, it
will still perform the rename and replace the original mycompany.aspx file.
Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If provided, no confirmation will be requested and the action will be performed

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OverwriteIfAlreadyExists
If provided, if a file already exist with the provided TargetFileName, it will be overwritten. If omitted, the rename
operation will be canceled if a file already exists with the TargetFileName file name.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativeUrl
Server relative Url specifying the file to rename. Must include the file name.

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-SiteRelativeUrl
Site relative Url specifying the file to rename. Must include the file name.

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-TargetFileName
File name to rename the file to. Should only be the file name and not include the path to its location. Use Move-
PnPFile to move the file to another location.

Type: String
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Rename-PnPFolder
In ths Article

Renames a folder

Syntax
Rename-PnPFolder -Folder <String>
-TargetFolderName <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Rename-PnPFolder -Folder Documents/Reports -TargetFolderName 'Archived Reports'

This will rename the folder Reports in the Documents library to 'Archived Reports'

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
The folder to rename
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-TargetFolderName
The new folder name
Only applicable to: SharePoint Online

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Request-PnPAccessToken
In ths Article

Requests an OAuth Access token

Syntax
Request-PnPAccessToken [-ClientId <String>]
[-Resource <String>]
[-Scopes <String>]
[-Decoded [<SwitchParameter>]]
[-SetAsCurrent [<SwitchParameter>]]
[-Credentials <PSCredential>]
[-TenantUrl <String>]

Description
Returns an access token using the password grant, using the PnP O365 Management Shell client id by default and
the AllSites.FullControl scope by default.

Examples
------------------EXAMPLE 1------------------

Request-PnPAccessToken

Returns the access token using the default client id and scope
------------------EXAMPLE 2------------------

Request-PnPAccessToken -ClientId 26e29fec-aa10-4f99-8381-d96cddc650c2

Returns the access token using the specified client id and the default scope of AllSites.FullControl
------------------EXAMPLE 3------------------

Request-PnPAccessToken -ClientId 26e29fec-aa10-4f99-8381-d96cddc650c2 -Scopes Group.ReadWrite.All

Returns the access token using the specified client id and the specified scope
------------------EXAMPLE 4------------------

Request-PnPAccessToken -ClientId 26e29fec-aa10-4f99-8381-d96cddc650c2 -Scopes Group.ReadWrite.All,


AllSites.FullControl

Returns the access token using the specified client id and the specified scopes
------------------EXAMPLE 5------------------

$token = Request-PnPAccessToken -ClientId 26e29fec-aa10-4f99-8381-d96cddc650c2 -Resource


https://contoso.sharepoint.com -Credentials (Get-Credential) -TenantUrl https://contoso.sharepoint.com
Connect-PnPOnline -AccessToken $token

Returns the access token using the specified client id and the specified scopes while using the credentials and
tenanturl specified to authentication against Azure AD

Parameters
-ClientId
The Azure Application Client Id to use to retrieve the token. Defaults to the PnP Office 365 Management Shell
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Credentials
Optional credentials to use when retrieving the access token. If not present you need to connect first with Connect-
PnPOnline.
Only applicable to: SharePoint Online

Type: PSCredential
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Decoded
Returns the token in a decoded / human readible manner
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Resource
The scopes to retrieve the token for. Defaults to AllSites.FullControl
Only applicable to: SharePoint Online
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scopes
The scopes to retrieve the token for. Defaults to AllSites.FullControl
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SetAsCurrent
Set this token as the current token to use when performing Azure AD based authentication requests with PnP
PowerShell
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TenantUrl
Optional tenant URL to use when retrieving the access token. The Url should be in the shape of
https://yourtenant.sharepoint.com. See examples for more info.
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Request-PnPReIndexList
In ths Article

Marks the list for full indexing during the next incremental crawl

Syntax
Request-PnPReIndexList -Identity <ListPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Request-PnPReIndexList -Identity "Demo List"

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID, Title or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Request-PnPReIndexWeb
In ths Article

Marks the web for full indexing during the next incremental crawl

Syntax
Request-PnPReIndexWeb [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Reset-PnPFileVersion
In ths Article

Resets a file to its previous version

Syntax
Reset-PnPFileVersion -ServerRelativeUrl <String>
[-CheckinType <CheckinType>]
[-CheckInComment <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Reset-PnPFileVersion -ServerRelativeUrl "/sites/test/office365.png"

------------------EXAMPLE 2------------------

Reset-PnPFileVersion -ServerRelativeUrl "/sites/test/office365.png" -CheckinType MajorCheckin -Comment


"Restored to previous version"

Parameters
-CheckInComment
The comment added to the checkin. Defaults to 'Restored to previous version'.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CheckinType
The check in type to use. Defaults to Major.

Type: CheckinType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativeUrl
The server relative URL of the file.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Reset-PnPLabel
In ths Article

Resets a label/tag on the specified list or library to None

Syntax
Reset-PnPLabel -List <ListPipeBind>
[-SyncToItems <Boolean>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Reset-PnPLabel -List "Demo List"

This resets an O365 label on the specified list or library to None


------------------EXAMPLE 2------------------

Reset-PnPLabel -List "Demo List" -SyncToItems $true

This resets an O365 label on the specified list or library to None and resets the label on all the items in the list and
library except Folders and where the label has been manually or previously automatically assigned

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID or Url of the list
Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-SyncToItems
Reset label on existing items in the library

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Resolve-PnPFolder
In ths Article

Returns a folder from a given site relative path, and will create it if it does not exist.

Syntax
Resolve-PnPFolder -SiteRelativePath <String>
[-Includes <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Returns a folder from a given site relative path, and will create it if it does not exist. If you do not want the folder to
be created, for instance just to test if a folder exists, use Get-PnPFolder

Examples
------------------EXAMPLE 1------------------

Resolve-PnPFolder -SiteRelativePath "demofolder/subfolder"

Creates a folder called subfolder in a folder called demofolder located in the root folder of the site. If the folder
hierarchy does not exist, it will be created.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Includes
Specify properties to include when retrieving objects from the server.
Type: String[]
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-SiteRelativePath
Site Relative Folder Path

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Folder

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Restore-PnPDeletedUnifiedGroup
In ths Article

Restores one deleted Office 365 Group (aka Unified Group)

Syntax
Restore-PnPDeletedUnifiedGroup -Identity <UnifiedGroupPipeBind>

Examples
------------------EXAMPLE 1------------------

Restore-PnPDeletedUnifiedGroup -Identity 38b32e13-e900-4d95-b860-fb52bc07ca7f

Restores a deleted Office 365 Group based on its ID


------------------EXAMPLE 2------------------

$group = Get-PnPDeletedUnifiedGroup -Identity 38b32e13-e900-4d95-b860-fb52bc07ca7f


Restore-PnPDeletedUnifiedGroup -Identity $group

Restores the provided deleted Office 365 Group

Parameters
-Identity
The Identity of the deleted Office 365 Group

Type: UnifiedGroupPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Restore-PnPRecycleBinItem
In ths Article

Restores the provided recycle bin item to its original location

Syntax
Restore-PnPRecycleBinItem -Identity <RecycleBinItemPipeBind>
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Restore-PnPRecycleBinItem -All [<SwitchParameter>]


[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Restore-PnpRecycleBinItem -Identity 72e4d749-d750-4989-b727-523d6726e442

Restores the recycle bin item with Id 72e4d749-d750-4989-b727-523d6726e442 to its original location
------------------EXAMPLE 2------------------

Get-PnPRecycleBinItem | ? -Property LeafName -like "*.docx" | Restore-PnpRecycleBinItem

Restores all the items in the first and second stage recycle bins to their original location of which the filename ends
with the .docx extension

Parameters
-All
If provided all items will be stored

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
If provided, no confirmation will be asked to restore the recycle bin item

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Id of the recycle bin item or the recycle bin item object itself to restore

Type: RecycleBinItemPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Restore-PnPTenantRecycleBinItem
In ths Article

Restores a site collection from the tenant scoped recycle bin

Syntax
Restore-PnPTenantRecycleBinItem -Url <String>
[-Wait [<SwitchParameter>]]
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
The Restore-PnPTenantRecycleBinItem cmdlet allows a site collection that has been deleted and still exists in the
tenant recycle bin to be restored to its original location.

Examples
------------------EXAMPLE 1------------------

Restore-PnPTenantRecycleBinItem -Url https://tenant.sharepoint.com/sites/contoso

This will restore the deleted site collection with the url 'https://tenant.sharepoint.com/sites/contoso' to its original
location
------------------EXAMPLE 2------------------

Restore-PnPTenantRecycleBinItem -Url https://tenant.sharepoint.com/sites/contoso -Wait

This will restore the deleted site collection with the url 'https://tenant.sharepoint.com/sites/contoso' to its original
location and will wait with executing further PowerShell commands until the site collection restore has completed

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Force
If provided, no confirmation will be asked to restore the site collection from the tenant recycle bin

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
Url of the site collection to restore from the tenant recycle bin

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Wait
If provided, the PowerShell execution will halt until the site restore process has completed

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Resume-PnPWorkflowInstance
In ths Article

Resume a workflow

Syntax
Resume-PnPWorkflowInstance -Identity <WorkflowInstancePipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Resumes a previously stopped workflow instance

Examples
------------------EXAMPLE 1------------------

Resume-PnPWorkflowInstance -identity $wfInstance

Resumes the workflow instance, this can be the Guid of the instance or the instance itself.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The instance to resume

Type: WorkflowInstancePipeBind
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Revoke-PnPSiteDesignRights
In ths Article

Revokes the specified principals rights to use the site design.

Syntax
Revoke-PnPSiteDesignRights -Identity <TenantSiteDesignPipeBind>
-Principals <String[]>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Revoke-PnPSiteDesignRights -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd -Principals


"myuser@mydomain.com","myotheruser@mydomain.com"

Revokes rights to the specified principals on the site design specified


------------------EXAMPLE 2------------------

Get-PnPSiteDesign -Identity 5c73382d-9643-4aa0-9160-d0cba35e40fd | Revoke-PnPSiteDesignRights -Principals


"myuser@mydomain.com","myotheruser@mydomain.com"

Revokes rights to the specified principals on the site design specified

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The site design to use.
Type: TenantSiteDesignPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Principals
One or more principals to revoke.

Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Revoke-PnPTenantServicePrincipalPermission
In ths Article

Revokes a permission that was previously granted to the "SharePoint Online Client" service principal.

Syntax
Revoke-PnPTenantServicePrincipalPermission -ObjectId <String>
[-Force [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
Revokes a permission that was previously granted to the "SharePoint Online Client" service principal.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ObjectId

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Save-PnPClientSidePageConversionLog
In ths Article

Persists the current client side page conversion log data to the loggers linked to the last used page transformation
run. Needs to be used in conjunction with the -LogSkipFlush flag on the ConvertTo-PnPClientSidePage cmdlet

Syntax
Save-PnPClientSidePageConversionLog [-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Save-PnPClientSidePageConversionLog

Persists the current client side page conversion log data to the loggers linked to the last used page transformation
run. Needs to be used in conjunction with the -LogSkipFlush flag on the ConvertTo-PnPClientSidePage cmdlet

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Save-PnPProvisioningTemplate
In ths Article

Saves a PnP site template to the file system

Syntax
Save-PnPProvisioningTemplate -Template <ProvisioningTemplate>
-Out <String>
[-Force [<SwitchParameter>]]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]

Examples
------------------EXAMPLE 1------------------

Save-PnPSiteTemplate -InputInstance $template -Out .\template.pnp

Saves a PnP site template to the file system as a PnP file.

Parameters
-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Out
Filename to write to, optionally including full path.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Template
Allows you to provide an in-memory instance of the ProvisioningTemplate type of the PnP Core Component.
When using this parameter, the -Out parameter refers to the path for saving the template and storing any
supporting file for the template.
Type: ProvisioningTemplate
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify the ITemplateProviderExtension to execute while saving a template.

Type: ITemplateProviderExtension[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Save-PnPTenantTemplate
In ths Article

Saves a PnP provisioning hierarchy to the file system

Syntax
Save-PnPTenantTemplate -Template <ProvisioningHierarchy>
-Out <String>
[-Force [<SwitchParameter>]]

Examples
------------------EXAMPLE 1------------------

Save-PnPTenantTemplate -Template $template -Out .\tenanttemplate.pnp

Saves a PnP tenant template to the file system

Parameters
-Force
Specifying the Force parameter will skip the confirmation question.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Out
Filename to write to, optionally including full path.

Type: String
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Template
Allows you to provide an in-memory instance of a Tenant Template. When using this parameter, the -Out
parameter refers to the path for saving the template and storing any supporting file for the template.
Type: ProvisioningHierarchy
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Send-PnPMail
In ths Article

Sends an email using the Office 365 SMTP Service or SharePoint, depending on the parameters specified. See
detailed help for more information.

Syntax
Send-PnPMail -To <String[]>
-Subject <String>
-Body <String>
[-Server <String>]
[-From <String>]
[-Password <String>]
[-Cc <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Send-PnPMail -To address@tenant.sharepointonline.com -Subject test -Body test

Sends an e-mail using the SharePoint SendEmail method using the current context. E -mail is sent from the system
account and can only be sent to accounts in the same tenant
------------------EXAMPLE 2------------------

Send-PnPMail -To address@contoso.com -Subject test -Body test -From me@tenant.onmicrosoft.com -Password xyz

Sends an e-mail via Office 365 SMTP and requires a from address and password. E -mail is sent from the from user
and can be sent to both internal and external addresses.
------------------EXAMPLE 3------------------

Send-PnPMail -To address@contoso.com -Subject test -Body test -From me@server.net -Password xyz -Server
yoursmtp.server.net

Sends an e-mail via a custom SMTP server and requires a from address and password. E -mail is sent from the
from user.

Parameters
-Body
Body of the email
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Cc
List of recipients on CC

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-From
If using from address, you also have to provide a password

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Password
If using a password, you also have to provide the associated from address

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Server

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Subject
Subject of the email

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-To
List of recipients

Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPApplicationCustomizer
In ths Article

Updates a SharePoint Framework client side extension application customizer

Syntax
Set-PnPApplicationCustomizer [-Identity <UserCustomActionPipeBind>]
[-Scope <CustomActionScope>]
[-Title <String>]
[-Description <String>]
[-Sequence <Int>]
[-ClientSideComponentProperties <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPApplicationCustomizer [-ClientSideComponentId <GuidPipeBind>]


[-Scope <CustomActionScope>]
[-Title <String>]
[-Description <String>]
[-Sequence <Int>]
[-ClientSideComponentProperties <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Updates a SharePoint Framework client side extension application customizer by updating its custom action. Only
the properties that will be provided will be updated. Others will remain as they are.

Examples
------------------EXAMPLE 1------------------

Set-PnPCustomAction -Identity aa66f67e-46c0-4474-8a82-42bf467d07f2

Updates the custom action representing the client side extension registration with the id 'aa66f67e-46c0-4474-
8a82-42bf467d07f2'.
------------------EXAMPLE 2------------------

Set-PnPCustomAction -ClientSideComponentId aa66f67e-46c0-4474-8a82-42bf467d07f2 -Scope web -


ClientSideComponentProperties "{`"sourceTermSet`":`"PnP-CollabFooter-
SharedLinks`",`"personalItemsStorageProperty`":`"PnP-CollabFooter-MyLinks`"}

Updates the custom action(s) properties being registered for a SharePoint Framework solution having the id
'aa66f67e-46c0-4474-8a82-42bf467d07f2' in its manifest from the current web.
Parameters
-ClientSideComponentId
The Client Side Component Id of the SharePoint Framework client side extension application customizer found in
the manifest for which existing custom action(s) should be updated
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClientSideComponentProperties
The Client Side Component Properties of the application customizer to update. Specify values as a json string : "
{Property1 : 'Value1', Property2: 'Value2'}". Omit to not update this property.

Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description of the application customizer. Omit to not update this property.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The id or name of the CustomAction representing the client side extension registration that needs to be updated or
a CustomAction instance itself
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: UserCustomActionPipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Define if the CustomAction representing the client side extension registration is to be found at the web or site
collection scope. Specify All to update the component on both web and site collection level.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: CustomActionScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Sequence
Sequence of this application customizer being injected. Use when you have a specific sequence with which to have
multiple application customizers being added to the page. Omit to not update this property.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the application customizer. Omit to not update this property.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPAppSideLoading
In ths Article

Enables the App SideLoading Feature on a site

Syntax
Set-PnPAppSideLoading -On [<SwitchParameter>]
[-Connection <SPOnlineConnection>]

Set-PnPAppSideLoading -Off [<SwitchParameter>]


[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPAppSideLoading -On

This will turn on App side loading


------------------EXAMPLE 2------------------

Set-PnPAppSideLoading -Off

This will turn off App side loading

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Off
Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-On

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPAuditing
In ths Article

Set Auditing setting for a site

Syntax
Set-PnPAuditing [-RetentionTime <Int>]
[-TrimAuditLog [<SwitchParameter>]]
[-EditItems [<SwitchParameter>]]
[-CheckOutCheckInItems [<SwitchParameter>]]
[-MoveCopyItems [<SwitchParameter>]]
[-DeleteRestoreItems [<SwitchParameter>]]
[-EditContentTypesColumns [<SwitchParameter>]]
[-SearchContent [<SwitchParameter>]]
[-EditUsersPermissions [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Set-PnPAuditing -EnableAll [<SwitchParameter>]


[-RetentionTime <Int>]
[-TrimAuditLog [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Set-PnPAuditing -DisableAll [<SwitchParameter>]


[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPAuditing -EnableAll

Enables all auditing settings for the current site


------------------EXAMPLE 2------------------

Set-PnPAuditing -DisableAll

Disables all auditing settings for the current site


------------------EXAMPLE 3------------------

Set-PnPAuditing -RetentionTime 7

Sets the audit log trimming to 7 days, this also enables the automatic trimming of the audit log
------------------EXAMPLE 4------------------

Set-PnPAuditing -TrimAuditLog

Enables the automatic trimming of the audit log


------------------EXAMPLE 5------------------

Set-PnPAuditing -RetentionTime 7 -CheckOutCheckInItems -MoveCopyItems -SearchContent

Sets the audit log trimming to 7 days, this also enables the automatic trimming of the audit log.
Do auditing for:
Checking out or checking in items
Moving or copying items to another location in the site
Searching site content

Parameters
-CheckOutCheckInItems
Audit checking out or checking in items

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DeleteRestoreItems
Audit deleting or restoring items

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableAll
Disable all audit flags
Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EditContentTypesColumns
Audit editing content types and columns

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EditItems
Audit editing items

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EditUsersPermissions
Audit editing users and permissions

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableAll
Enable all audit flags

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MoveCopyItems
Audit moving or copying items to another location in the site.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-RetentionTime
Set the retention time

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SearchContent
Audit searching site content

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TrimAuditLog
Trim the audit log

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPAvailablePageLayouts
In ths Article

Sets the available page layouts for the current site

Syntax
Set-PnPAvailablePageLayouts -PageLayouts <String[]>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPAvailablePageLayouts -AllowAllPageLayouts [<SwitchParameter>]


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPAvailablePageLayouts -InheritPageLayouts [<SwitchParameter>]


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Parameters
-AllowAllPageLayouts
An array of page layout files to set as available page layouts for the site.

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InheritPageLayouts
Set the available page layouts to inherit from the parent site.
Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PageLayouts
An array of page layout files to set as available page layouts for the site.

Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPClientSidePage
In ths Article

Sets parameters of a Client-Side Page

Syntax
Set-PnPClientSidePage -Identity <ClientSidePagePipeBind>
[-ServerRelativeImageUrl <String>]
[-TranslateX <Double>]
[-TranslateY <Double>]
[-Name <String>]
[-Title <String>]
[-LayoutType <ClientSidePageLayoutType>]
[-PromoteAs <ClientSidePagePromoteType>]
[-CommentsEnabled [<SwitchParameter>]]
[-Publish [<SwitchParameter>]]
[-HeaderType <ClientSidePageHeaderType>]
[-ContentType <ContentTypePipeBind>]
[-ThumbnailUrl <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPClientSidePage -Identity "MyPage" -LayoutType Home -Title "My Page"

Updates the properties of the Client-Side page named 'MyPage'


------------------EXAMPLE 2------------------

Set-PnPClientSidePage -Identity "MyPage" -CommentsEnabled

Enables the comments on the Client-Side page named 'MyPage'


------------------EXAMPLE 3------------------

Set-PnPClientSidePage -Identity "MyPage" -CommentsEnabled:$false

Disables the comments on the Client-Side page named 'MyPage'


------------------EXAMPLE 4------------------

Set-PnPClientSidePage -Identity "MyPage" -HeaderType Default


Sets the header of the page to the default header
------------------EXAMPLE 5------------------

Set-PnPClientSidePage -Identity "MyPage" -HeaderType None

Removes the header of the page


------------------EXAMPLE 6------------------

Set-PnPClientSidePage -Identity "MyPage" -HeaderType Custom -ServerRelativeImageUrl


"/sites/demo1/assets/myimage.png" -TranslateX 10.5 -TranslateY 11.0

Sets the header of the page to custom header, using the specified image and translates the location of the image in
the header given the values specified

Parameters
-CommentsEnabled
Enables or Disables the comments on the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specify either the name, ID or an actual content type.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ContentTypePipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HeaderType
Sets the page header type
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePageHeaderType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The name/identity of the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-LayoutType
Sets the layout type of the page. (Default = Article)
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePageLayoutType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
Sets the name of the page.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PromoteAs
Allows to promote the page for a specific purpose (HomePage | NewsPage)
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePromoteType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Publish
Publishes the page once it is saved.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativeImageUrl
The URL of the image to show in the header
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-ThumbnailUrl
Thumbnail Url
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
Sets the title of the page.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TranslateX
A value defining how to translate the image on the x-axis
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: Double
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-TranslateY
A value defining how to translate the image on the y-axis
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: Double
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPClientSideText
In ths Article

Set Client-Side Text Component properties

Syntax
Set-PnPClientSideText -Page <ClientSidePagePipeBind>
-InstanceId <GuidPipeBind>
-Text <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Sets the rendered text in existing client side text component

Examples
------------------EXAMPLE 1------------------

Set-PnPSetClientSideText -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82 -Text "MyText"

Sets the text of the client side text component.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InstanceId
The instance id of the text component
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Page
The name of the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Text
Text to set
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPClientSideWebPart
In ths Article

Set Client-Side Web Part properties

Syntax
Set-PnPClientSideWebPart -Page <ClientSidePagePipeBind>
-Identity <ClientSideWebPartPipeBind>
[-Title <String>]
[-PropertiesJson <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Sets specific client side web part properties. Notice that the title parameter will only set the -internal- title of web
part. The title which is shown in the UI will, if possible, have to be set using the PropertiesJson parameter. Use Get-
PnPClientSideComponent to retrieve the instance id and properties of a web part.

Examples
------------------EXAMPLE 1------------------

Set-PnPClientSideWebPart -Page Home -Identity a2875399-d6ff-43a0-96da-be6ae5875f82 -PropertiesJson


$myproperties

Sets the properties of the client side web part given in the $myproperties variable.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The identity of the web part. This can be the web part instance id or the title of a web part
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSideWebPartPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Page
The name of the page
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: ClientSidePagePipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-PropertiesJson
Sets the properties as a JSON string.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Title
Sets the internal title of the web part. Notice that this will NOT set a visible title.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: String
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPContext
In ths Article

Set the ClientContext

Syntax
Set-PnPContext -Context <ClientContext>

Description
Sets the Client Context to use by the cmdlets, which allows easy context switching. See examples for details.

Examples
------------------EXAMPLE 1------------------

Connect-PnPOnline -Url $siteAurl -Credentials $credentials


$ctx = Get-PnPContext
Get-PnPList # returns the lists from site specified with $siteAurl
Connect-PnPOnline -Url $siteBurl -Credentials $credentials
Get-PnPList # returns the lists from the site specified with $siteBurl
Set-PnPContext -Context $ctx # switch back to site A
Get-PnPList # returns the lists from site A

Parameters
-Context
The ClientContext to set

Type: ClientContext
Required: True
Position: 1
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPDefaultColumnValues
In ths Article

Sets default column values for a document library

Syntax
Set-PnPDefaultColumnValues -List <ListPipeBind>
-Field <FieldPipeBind>
-Value <String[]>
[-Folder <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Sets default column values for a document library, per folder, or for the root folder if the folder parameter has not
been specified. Supports both text and taxonomy fields.

Examples
------------------EXAMPLE 1------------------

Set-PnPDefaultColumnValues -List Documents -Field TaxKeyword -Value "Company|Locations|Stockholm"

Sets a default value for the enterprise keywords field on a library to a term called "Stockholm", located in the
"Locations" term set, which is part of the "Company" term group
------------------EXAMPLE 2------------------

Set-PnPDefaultColumnValues -List Documents -Field TaxKeyword -Value "15c4c4e4-4b67-4894-a1d8-de5ff811c791"

Sets a default value for the enterprise keywords field on a library to a term with the id "15c4c4e4-4b67-4894-
a1d8-de5ff811c791". You need to ensure the term is valid for the field.
------------------EXAMPLE 3------------------

Set-PnPDefaultColumnValues -List Documents -Field MyTextField -Value "DefaultValue" -Folder "My folder"

Sets a default value for the MyTextField text field on the folder "My folder" in a library to a value of "DefaultValue"
------------------EXAMPLE 4------------------

Set-PnPDefaultColumnValues -List Documents -Field MyPeopleField -Value "1;#Foo Bar"


Sets a default value for the MyPeopleField people field on a library to a value of "Foo Bar" using the id from the
user information list.
------------------EXAMPLE 5------------------

$user = New-PnPUser -LoginName foobar@contoso.com


Set-PnPDefaultColumnValues -List Documents -Field MyPeopleField -Value "$($user.Id);#$($user.LoginName)"

Sets a default value for the MyPeopleField people field on a library to a value of "Foo Bar" using the id from the
user information list.
------------------EXAMPLE 6------------------

$user1 = New-PnPUser -LoginName user1@contoso.com


$user2 = New-PnPUser -LoginName user2@contoso.com
Set-PnPDefaultColumnValues -List Documents -Field MyMultiPeopleField -Value
"$($user1.Id);#$($user1.LoginName)","$($user2.Id);#$($user2.LoginName)"

Sets a default value for the MyMultiPeopleField people field on a library to a value of "User 1" and "User 2" using
the id from the user information list.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Field
The internal name, id or a reference to a field

Type: FieldPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
A library relative folder path, if not specified it will set the default column values on the root folder of the library
('/')

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Name or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Value
A list of values. In case of a text field the values will be concatenated, separated by a semi-colon. In case of a
taxonomy field multiple values will added. In case of people field multiple values will be added.

Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPDefaultContentTypeToList
In ths Article

Sets the default content type for a list

Syntax
Set-PnPDefaultContentTypeToList -List <ListPipeBind>
-ContentType <ContentTypePipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPDefaultContentTypeToList -List "Project Documents" -ContentType "Project"

This will set the Project content type (which has already been added to a list) as the default content type

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
The content type object that needs to be set as the default content type on the list. Content Type needs to be
present on the list.

Type: ContentTypePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The name of a list, an ID or the actual list object to update
Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPDefaultPageLayout
In ths Article

Sets a specific page layout to be the default page layout for a publishing site

Syntax
Set-PnPDefaultPageLayout -Title <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPDefaultPageLayout -InheritFromParentSite [<SwitchParameter>]


[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPDefaultPageLayout -Title projectpage.aspx

Sets projectpage.aspx to be the default page layout for the current web
------------------EXAMPLE 2------------------

Set-PnPDefaultPageLayout -Title test/testpage.aspx

Sets a page layout in a folder in the Master Page & Page Layout gallery, such as
_catalog/masterpage/test/testpage.aspx, to be the default page layout for the current web
------------------EXAMPLE 3------------------

Set-PnPDefaultPageLayout -InheritFromParentSite

Sets the default page layout to be inherited from the parent site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InheritFromParentSite
Set the default page layout to be inherited from the parent site.

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
Title of the page layout

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPDocumentSetField
In ths Article

Sets a site column from the available content types to a document set

Syntax
Set-PnPDocumentSetField -DocumentSet <DocumentSetPipeBind>
-Field <FieldPipeBind>
[-SetSharedField [<SwitchParameter>]]
[-SetWelcomePageField [<SwitchParameter>]]
[-RemoveSharedField [<SwitchParameter>]]
[-RemoveWelcomePageField [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPDocumentSetField -Field "Test Field" -DocumentSet "Test Document Set" -SetSharedField -


SetWelcomePageField

This will set the field, available in one of the available content types, as a Shared Field and as a Welcome Page Field.
------------------EXAMPLE 2------------------

Set-PnPDocumentSetField -Field "Test Field" -DocumentSet "Test Document Set" -RemoveSharedField -


RemoveWelcomePageField

This will remove the field, available in one of the available content types, as a Shared Field and as a Welcome Page
Field.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DocumentSet
The document set in which to set the field. Either specify a name, a document set template object, an id, or a
content type object

Type: DocumentSetPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Field
The field to set. The field needs to be available in one of the available content types. Either specify a name, an id or
a field object

Type: FieldPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RemoveSharedField
Removes the field as a Shared Field

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RemoveWelcomePageField
Removes the field as a Welcome Page Field

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SetSharedField
Set the field as a Shared Field

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SetWelcomePageField
Set the field as a Welcome Page field
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPField
In ths Article

Changes one or more properties of a field in a specific list or for the whole web

Syntax
Set-PnPField -Identity <FieldPipeBind>
-Values <Hashtable>
[-List <ListPipeBind>]
[-UpdateExistingLists [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPField -Identity AssignedTo -Values @{JSLink="customrendering.js";Group="My fields"}

Updates the AssignedTo field on the current web to use customrendering.js for the JSLink and sets the group name
the field is categorized in to "My Fields". Lists that are already using the AssignedTo field will not be updated.
------------------EXAMPLE 2------------------

Set-PnPField -Identity AssignedTo -Values @{JSLink="customrendering.js";Group="My fields"} -UpdateExistingLists

Updates the AssignedTo field on the current web to use customrendering.js for the JSLink and sets the group name
the field is categorized in to "My Fields". Lists that are already using the AssignedTo field will also be updated.
------------------EXAMPLE 3------------------

Set-PnPField -List "Tasks" -Identity "AssignedTo" -Values @{JSLink="customrendering.js"}

Updates the AssignedTo field on the Tasks list to use customrendering.js for the JSLink

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The field object, internal field name (case sensitive) or field id to update

Type: FieldPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-List
The list object, name or id where to update the field. If omitted the field will be updated on the web.

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-UpdateExistingLists
If provided, the field will be updated on existing lists that use it as well. If not provided or set to $false, existing lists
using the field will remain unchanged but new lists will get the updated field.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Values
Hashtable of properties to update on the field. Use the syntax @{property1="value";property2="value"}.

Type: Hashtable
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Field

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPFileCheckedIn
In ths Article

Checks in a file

Syntax
Set-PnPFileCheckedIn -Url <String>
[-CheckinType <CheckinType>]
[-Comment <String>]
[-Approve [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

PS:>Set-PnPFileCheckedIn -Url "/Documents/Contract.docx"

Checks in the file "Contract.docx" in the "Documents" library


------------------EXAMPLE 2------------------

PS:>Set-PnPFileCheckedIn -Url "/Documents/Contract.docx" -CheckinType MinorCheckin -Comment "Smaller changes"

Checks in the file "Contract.docx" in the "Documents" library as a minor version and adds the check in comment
"Smaller changes"

Parameters
-Approve
Approve file

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CheckinType
The check in type to use. Defaults to Major
Type: CheckinType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Comment
The check in comment

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The server relative url of the file to check in

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPFileCheckedOut
In ths Article

Checks out a file

Syntax
Set-PnPFileCheckedOut -Url <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

PS:>Set-PnPFileCheckedOut -Url "/sites/testsite/subsite/Documents/Contract.docx"

Checks out the file "Contract.docx" in the "Documents" library.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The server relative url of the file to check out

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPFolderPermission
In ths Article

Sets folder permissions. Use Get-PnPRoleDefinition to retrieve all available roles you can add or remove using this
cmdlet.

Syntax
Set-PnPFolderPermission -List <ListPipeBind>
-Identity <FolderPipeBind>
[-InheritPermissions [<SwitchParameter>]]
[-SystemUpdate [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPFolderPermission -Group <GroupPipeBind>


-List <ListPipeBind>
-Identity <FolderPipeBind>
[-AddRole <String>]
[-RemoveRole <String>]
[-ClearExisting [<SwitchParameter>]]
[-SystemUpdate [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPFolderPermission -User <String>


-List <ListPipeBind>
-Identity <FolderPipeBind>
[-AddRole <String>]
[-RemoveRole <String>]
[-ClearExisting [<SwitchParameter>]]
[-SystemUpdate [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPFolderPermission -List 'Shared Documents' -Identity 'Shared Documents\Folder' -User 'user@contoso.com' -


AddRole 'Contribute'

Adds the 'Contribute' permission to the user 'user@contoso.com' for the folder named 'Folder' located in the root
of the library 'Shared Documents'
------------------EXAMPLE 2------------------
Set-PnPFolderPermission -List 'Documents' -Identity 'Shared Documents\Folder\Subfolder' -User
'user@contoso.com' -RemoveRole 'Contribute'

Removes the 'Contribute' permission to the user 'user@contoso.com' for the folder named 'Subfolder' located in
the folder 'Folder' which is located in the root of the library 'Shared Documents'
------------------EXAMPLE 3------------------

Set-PnPFolderPermission -List 'Documents' -Identity 'Shared Documents\Folder' -User 'user@contoso.com' -AddRole


'Contribute' -ClearExisting

Adds the 'Contribute' permission to the user 'user@contoso.com' for the folder named 'Folder' located in the root
of the library 'Shared Documents' and removes all other permissions
------------------EXAMPLE 4------------------

Get-PnPFolder -Url 'Shared Documents\Folder' | Set-PnPFolderPermission -List 'Documents' -InheritPermissions

Resets permissions for the folder named 'Folder' located in the root of the library 'Shared Documents' to inherit
permissions from the library 'Shared Documents'

Parameters
-AddRole
The role that must be assigned to the group or user

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClearExisting
Clear all existing permissions

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Group

Type: GroupPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the folder, the server relative URL to the folder or actual Folder object

Type: FolderPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-InheritPermissions
Inherit permissions from the parent, removing unique permissions

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Title or Url of the list the folder is part of

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-RemoveRole
The role that must be removed from the group or user

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SystemUpdate
Update the folder permissions without creating a new version or triggering MS Flow.
Only applicable to: SharePoint Online
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-User

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPGroup
In ths Article

Updates a group

Syntax
Set-PnPGroup -Identity <GroupPipeBind>
[-SetAssociatedGroup <AssociatedGroupType>]
[-AddRole <String>]
[-RemoveRole <String>]
[-Title <String>]
[-Owner <String>]
[-Description <String>]
[-AllowRequestToJoinLeave <Boolean>]
[-AutoAcceptRequestToJoinLeave <Boolean>]
[-AllowMembersEditMembership <Boolean>]
[-OnlyAllowMembersViewMembership <Boolean>]
[-RequestToJoinEmail <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPGroup -Identity 'My Site Members' -SetAssociatedGroup Members

Sets the SharePoint group with the name 'My Site Members' as the associated members group
------------------EXAMPLE 2------------------

Set-PnPGroup -Identity 'My Site Members' -Owner 'site owners'

Sets the SharePoint group with the name 'site owners' as the owner of the SharePoint group with the name 'My
Site Members'

Parameters
-AddRole
Name of the permission set to add to this SharePoint group
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AllowMembersEditMembership
A switch parameter that specifies whether group members can modify membership in the group

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AllowRequestToJoinLeave
A switch parameter that specifies whether to allow users to request membership in the group and to allow users to
request to leave the group

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AutoAcceptRequestToJoinLeave
A switch parameter that specifies whether users are automatically added or removed when they make a request

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description for the group
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
A group object, an ID or a name of a group

Type: GroupPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OnlyAllowMembersViewMembership
A switch parameter that specifies whether only group members are allowed to view the list of members in the
group

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owner
The owner for the group, which can be a user or another group

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RemoveRole
Name of the permission set to remove from this SharePoint group

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RequestToJoinEmail
The e-mail address to which membership requests are sent

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-SetAssociatedGroup
One of the associated group types (Visitors, Members, Owners

Type: AssociatedGroupType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title for the group

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPGroupPermissions
In ths Article

Adds and/or removes permissions of a specific SharePoint group

Syntax
Set-PnPGroupPermissions -Identity <GroupPipeBind>
[-List <ListPipeBind>]
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPGroupPermissions -Identity 'My Site Members' -AddRole Contribute

Adds the 'Contribute' permission to the SharePoint group with the name 'My Site Members'
------------------EXAMPLE 2------------------

Set-PnPGroupPermissions -Identity 'My Site Members' -RemoveRole 'Full Control' -AddRole 'Read'

Removes the 'Full Control' from and adds the 'Contribute' permissions to the SharePoint group with the name 'My
Site Members'
------------------EXAMPLE 3------------------

Set-PnPGroupPermissions -Identity 'My Site Members' -AddRole @('Contribute', 'Design')

Adds the 'Contribute' and 'Design' permissions to the SharePoint group with the name 'My Site Members'
------------------EXAMPLE 4------------------

Set-PnPGroupPermissions -Identity 'My Site Members' -RemoveRole @('Contribute', 'Design')

Removes the 'Contribute' and 'Design' permissions from the SharePoint group with the name 'My Site Members'
------------------EXAMPLE 5------------------

Set-PnPGroupPermissions -Identity 'My Site Members' -List 'MyList' -RemoveRole @('Contribute')


Removes the 'Contribute' permissions from the list 'MyList' for the group with the name 'My Site Members'

Parameters
-AddRole
Name of the permission set to add to this SharePoint group

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Get the permissions of a specific group by name

Type: GroupPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-List
The list to apply the command to.

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RemoveRole
Name of the permission set to remove from this SharePoint group

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPHideDefaultThemes
In ths Article

Defines if the default / OOTB themes should be visible to users or not.

Syntax
Set-PnPHideDefaultThemes -HideDefaultThemes <Boolean>
[-Connection <SPOnlineConnection>]

Description
Use this cmdlet to hide or show the default themes to users
You must be a SharePoint Online global administrator to run the cmdlet.

Examples
------------------EXAMPLE 1------------------

Set-PnPHideDefaultThemes -HideDefaultThemes $true

This example hides the default themes


------------------EXAMPLE 2------------------

Set-PnPHideDefaultThemes -HideDefaultThemes $false

This example shows the default themes

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HideDefaultThemes
Defines if the default themes should be visible or hidden
Type: Boolean
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPHomePage
In ths Article

Sets the home page of the current web.

Syntax
Set-PnPHomePage -RootFolderRelativeUrl <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPHomePage -RootFolderRelativeUrl SitePages/Home.aspx

Sets the home page to the home.aspx file which resides in the SitePages library

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RootFolderRelativeUrl
The root folder relative url of the homepage, e.g. 'sitepages/home.aspx'

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPHomeSite
In ths Article

Sets the home site for your tenant

Syntax
Set-PnPHomeSite -Url <String>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPHomeSite -Url https://yourtenant.sharepoint.com/sites/myhome

Sets the home site to the provided site collection url

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The url of the site to set as the home site

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPHubSite
In ths Article

Sets hub site properties

Syntax
Set-PnPHubSite [-SiteDesignId <GuidPipeBind>]
[-HideNameInNavigation [<SwitchParameter>]]
[-RequiresJoinApproval [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
Allows configuring a hub site

Examples
------------------EXAMPLE 1------------------

Set-PnPHubSite -Identity https://tenant.sharepoint.com/sites/myhubsite -Title "My New Title"

Sets the title of the hub site


------------------EXAMPLE 2------------------

Set-PnPHubSite -Identity https://tenant.sharepoint.com/sites/myhubsite -Description "My updated description"

Sets the description of the hub site


------------------EXAMPLE 3------------------

Set-PnPHubSite -Identity https://tenant.sharepoint.com/sites/myhubsite -SiteDesignId df8a3ef1-9603-44c4-abd9-


541aea2fa745

Sets the site design which should be applied to sites joining the the hub site
------------------EXAMPLE 4------------------

Set-PnPHubSite -Identity https://tenant.sharepoint.com/sites/myhubsite -LogoUrl


"https://tenant.sharepoint.com/SiteAssets/Logo.png"

Sets the logo of the hub site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HideNameInNavigation

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RequiresJoinApproval

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SiteDesignId
GUID of the SharePoint Site Design which should be applied when a site joins the hub site

Type: GuidPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPIndexedProperties
In ths Article

Marks values of the propertybag to be indexed by search. Notice that this will overwrite the existing flags, i.e. only
the properties you define with the cmdlet will be indexed.

Syntax
Set-PnPIndexedProperties -Keys <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Keys

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPInPlaceRecordsManagement
In ths Article

Activates or deactivates in the place records management feature.

Syntax
Set-PnPInPlaceRecordsManagement -Enabled <Boolean>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPInPlaceRecordsManagement -Enabled $true

Activates In Place Records Management


------------------EXAMPLE 2------------------

Set-PnPInPlaceRecordsManagement -Enabled $false

Deactivates In Place Records Management

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Enabled

Type: Boolean
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPLabel
In ths Article

Sets a label/tag on the specified list or library. Use Reset-PnPLabel to remove the label again.

Syntax
Set-PnPLabel -List <ListPipeBind>
-Label <String>
[-SyncToItems <Boolean>]
[-BlockDeletion <Boolean>]
[-BlockEdit <Boolean>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPLabel -List "Demo List" -Label "Project Documentation"

This sets an O365 label on the specified list or library.


------------------EXAMPLE 2------------------

Set-PnPLabel -List "Demo List" -Label "Project Documentation" -SyncToItems $true

This sets an O365 label on the specified list or library and sets the label to all the items in the list and library as
well.
------------------EXAMPLE 3------------------

Set-PnPLabel -List "Demo List" -Label "Project Documentation" -BlockDelete $true -BlockEdit $true

This sets an O365 label on the specified list or library. Next, it also blocks the ability to either edit or delete the item.

Parameters
-BlockDeletion
Block deletion of items in the library.
Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-BlockEdit
Block editing of items in the library.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Label
The name of the label.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-SyncToItems
Apply label to existing items in the library.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPList
In ths Article

Updates list settings

Syntax
Set-PnPList -Identity <ListPipeBind>
[-EnableContentTypes <Boolean>]
[-BreakRoleInheritance [<SwitchParameter>]]
[-ResetRoleInheritance [<SwitchParameter>]]
[-CopyRoleAssignments [<SwitchParameter>]]
[-ClearSubscopes [<SwitchParameter>]]
[-Title <String>]
[-Description <String>]
[-Hidden <Boolean>]
[-ForceCheckout <Boolean>]
[-ListExperience <ListExperience>]
[-EnableAttachments <Boolean>]
[-EnableFolderCreation <Boolean>]
[-EnableVersioning <Boolean>]
[-EnableMinorVersions <Boolean>]
[-MajorVersions <UInt32>]
[-MinorVersions <UInt32>]
[-EnableModeration <Boolean>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPList -Identity "Demo List" -EnableContentTypes $true

Switches the Enable Content Type switch on the list


------------------EXAMPLE 2------------------

Set-PnPList -Identity "Demo List" -Hidden $true

Hides the list from the SharePoint UI.


------------------EXAMPLE 3------------------

Set-PnPList -Identity "Demo List" -EnableVersioning $true

Turns on major versions on a list


------------------EXAMPLE 4------------------
Set-PnPList -Identity "Demo List" -EnableVersioning $true -MajorVersions 20

Turns on major versions on a list and sets the maximum number of Major Versions to keep to 20.
------------------EXAMPLE 5------------------

Set-PnPList -Identity "Demo Library" -EnableVersioning $true -EnableMinorVersions $true -MajorVersions 20 -


MinorVersions 5

Turns on major versions on a document library and sets the maximum number of Major versions to keep to 20
and sets the maximum of Minor versions to 5.
------------------EXAMPLE 6------------------

Set-PnPList -Identity "Demo List" -EnableAttachments $true

Turns on attachments on a list

Parameters
-BreakRoleInheritance
If used the security inheritance is broken for this list

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClearSubscopes
If used the unique permissions are cleared from child objects and they can inherit role assignments from this object

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CopyRoleAssignments
If used the roles are copied from the parent web
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description of the list

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableAttachments
Enable or disable attachments. Set to $true to enable, $false to disable.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableContentTypes
Set to $true to enable content types, set to $false to disable content types

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableFolderCreation
Enable or disable folder creation. Set to $true to enable, $false to disable.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableMinorVersions
Enable or disable minor versions versioning. Set to $true to enable, $false to disable.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-EnableModeration
Enable or disable whether content approval is enabled for the list. Set to $true to enable, $false to disable.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableVersioning
Enable or disable versioning. Set to $true to enable, $false to disable.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ForceCheckout
Enable or disable force checkout. Set to $true to enable, $false to disable.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Hidden
Hide the list from the SharePoint UI. Set to $true to hide, $false to show.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID, Title or Url of the list.

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ListExperience
Set the list experience: Auto, NewExperience or ClassicExperience
Only applicable to: SharePoint Online
Type: ListExperience
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MajorVersions
Maximum major versions to keep

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MinorVersions
Maximum minor versions to keep

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ResetRoleInheritance
If used the security inheritance is reset for this list (inherited from parent)

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the list

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPListInformationRightsManagement
In ths Article

Get the site closure status of the site which has a site policy applied

Syntax
Set-PnPListInformationRightsManagement -List <ListPipeBind>
[-Enable <Boolean>]
[-EnableExpiration <Boolean>]
[-EnableRejection <Boolean>]
[-AllowPrint <Boolean>]
[-AllowScript <Boolean>]
[-AllowWriteCopy <Boolean>]
[-DisableDocumentBrowserView <Boolean>]
[-DocumentAccessExpireDays <Int>]
[-DocumentLibraryProtectionExpireDate <DateTime>]
[-EnableDocumentAccessExpire <Boolean>]
[-EnableDocumentBrowserPublishingView <Boolean>]
[-EnableGroupProtection <Boolean>]
[-EnableLicenseCacheExpire <Boolean>]
[-LicenseCacheExpireDays <Int>]
[-GroupName <String>]
[-PolicyDescription <String>]
[-PolicyTitle <String>]
[-TemplateId <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPListInformationRightsManagement -List "Documents" -Enabled $true

Enables Information Rights Management (IRM ) on the list.

Parameters
-AllowPrint
Sets a value indicating whether the viewer can print the downloaded document.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AllowScript
Sets a value indicating whether the viewer can run a script on the downloaded document.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AllowWriteCopy
Sets a value indicating whether the viewer can write on a copy of the downloaded document.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableDocumentBrowserView
Sets a value indicating whether to block Office Web Application Companion applications (WACs) from showing
this document.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DocumentAccessExpireDays
Sets the number of days after which the downloaded document will expire.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DocumentLibraryProtectionExpireDate
Sets the date after which the Information Rights Management (IRM ) protection of this document library will stop.
Type: DateTime
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Specifies whether Information Rights Management (IRM ) is enabled for the list.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableDocumentAccessExpire
Sets a value indicating whether the downloaded document will expire.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableDocumentBrowserPublishingView
Sets a value indicating whether to enable Office Web Application Companion applications (WACs) to publishing
view.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableExpiration
Specifies whether Information Rights Management (IRM ) expiration is enabled for the list.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableGroupProtection
Sets a value indicating whether the permission of the downloaded document is applicable to a group.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-EnableLicenseCacheExpire
Sets whether a user must verify their credentials after some interval.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableRejection
Specifies whether Information Rights Management (IRM ) rejection is enabled for the list.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-GroupName
Sets the group name (email address) that the permission is also applicable to.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LicenseCacheExpireDays
Sets the number of days that the application that opens the document caches the IRM license. When these elapse,
the application will connect to the IRM server to validate the license.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list to set Information Rights Management (IRM ) settings for.

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PolicyDescription
Sets the permission policy description.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PolicyTitle
Sets the permission policy title.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateId

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPListItem
In ths Article

Updates a list item

Syntax
Set-PnPListItem -List <ListPipeBind>
-Identity <ListItemPipeBind>
[-ContentType <ContentTypePipeBind>]
[-Values <Hashtable>]
[-SystemUpdate [<SwitchParameter>]]
[-Label <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPListItem -List "Demo List" -Identity 1 -Values @{"Title" = "Test Title"; "Category"="Test Category"}

Sets fields value in the list item with ID 1 in the "Demo List". It sets both the Title and Category fields with the
specified values. Notice, use the internal names of fields.
------------------EXAMPLE 2------------------

Set-PnPListItem -List "Demo List" -Identity 1 -ContentType "Company" -Values @{"Title" = "Test Title";
"Category"="Test Category"}

Sets fields value in the list item with ID 1 in the "Demo List". It sets the content type of the item to "Company" and
it sets both the Title and Category fields with the specified values. Notice, use the internal names of fields.
------------------EXAMPLE 3------------------

Set-PnPListItem -List "Demo List" -Identity $item -Values @{"Title" = "Test Title"; "Category"="Test Category"}

Sets fields value in the list item which has been retrieved by for instance Get-PnPListItem. It sets the content type
of the item to "Company" and it sets both the Title and Category fields with the specified values. Notice, use the
internal names of fields.
------------------EXAMPLE 4------------------

Set-PnPListItem -List "Demo List" -Identity 1 -Label "Public"

Sets the retention label in the list item with ID 1 in the "Demo List".
Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ContentType
Specify either the name, ID or an actual content type

Type: ContentTypePipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the listitem, or actual ListItem object

Type: ListItemPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Label
The name of the retention label.
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Title or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-SystemUpdate
Update the item without creating a new version.
Only applicable to: SharePoint Online

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Values
Use the internal names of the fields when specifying field names.
Single line of text: -Values @{"TextField" = "Title New"}
Multiple lines of text: -Values @{"MultiTextField" = "New text\n\nMore text"}
Rich text: -Values @{"MultiTextField" = "<strong>New</strong> text"}
Choice: -Values @{"ChoiceField" = "Value 1"}
Number: -Values @{"NumberField" = "10"}
Currency: -Values @{"NumberField" = "10"}
Currency: -Values @{"CurrencyField" = "10"}
Date and Time: -Values @{"DateAndTimeField" = "03/13/2015 14:16"}
Lookup (id of lookup value): -Values @{"LookupField" = "2"}
Multi value lookup (id of lookup values as array 1): -Values @{"MultiLookupField" = "1","2"}
Multi value lookup (id of lookup values as array 2): -Values @{"MultiLookupField" = 1,2}
Multi value lookup (id of lookup values as string): -Values @{"MultiLookupField" = "1,2"}
Yes/No: -Values @{"YesNoField" = $false}
Person/Group (id of user/group in Site User Info List or email of the user, separate multiple values with a comma):
-Values @{"PersonField" = "user1@domain.com","21"}
Managed Metadata (single value with path to term): -Values @{"MetadataField" =
"CORPORATE|DEPARTMENTS|FINANCE"}
Managed Metadata (single value with id of term): -Values @{"MetadataField" = "fe40a95b-2144-4fa2-b82a-
0b3d0299d818"} with Id of term
Managed Metadata (multiple values with paths to terms): -Values @{"MetadataField" =
("CORPORATE|DEPARTMENTS|FINANCE","CORPORATE|DEPARTMENTS|HR")}

Managed Metadata (multiple values with ids of terms): -Values @{"MetadataField" = ("fe40a95b-2144-4fa2-b82a-
0b3d0299d818","52d88107-c2a8-4bf0-adfa-04bc2305b593")}
Hyperlink or Picture: -Values @{"HyperlinkField" = "https://github.com/OfficeDev/, OfficePnp"}
Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.ListItem

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPListItemAsRecord
In ths Article

Declares a list item as a record, for more information, see


https://docs.microsoft.com/sharepoint/governance/records-management-in-sharepoint-server

Syntax
Set-PnPListItemAsRecord -List <ListPipeBind>
-Identity <ListItemPipeBind>
[-DeclarationDate <DateTime>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPListItemAsRecord -List "Documents" -Identity 4

Declares the document in the documents library with id 4 as a record


------------------EXAMPLE 2------------------

Set-PnPListItemAsRecord -List "Documents" -Identity 4 -DeclarationDate $date

Declares the document in the documents library with id as a record

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DeclarationDate
The declaration date
Type: DateTime
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the listitem, or actual ListItem object

Type: ListItemPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-List
The ID, Title or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPListItemPermission
In ths Article

Sets list item permissions. Use Get-PnPRoleDefinition to retrieve all available roles you can add or remove using
this cmdlet.

Syntax
Set-PnPListItemPermission -List <ListPipeBind>
-Identity <ListItemPipeBind>
[-InheritPermissions [<SwitchParameter>]]
[-SystemUpdate [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPListItemPermission -Group <GroupPipeBind>


-List <ListPipeBind>
-Identity <ListItemPipeBind>
[-AddRole <String>]
[-RemoveRole <String>]
[-ClearExisting [<SwitchParameter>]]
[-SystemUpdate [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPListItemPermission -User <String>


-List <ListPipeBind>
-Identity <ListItemPipeBind>
[-AddRole <String>]
[-RemoveRole <String>]
[-ClearExisting [<SwitchParameter>]]
[-SystemUpdate [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPListItemPermission -List 'Documents' -Identity 1 -User 'user@contoso.com' -AddRole 'Contribute'

Adds the 'Contribute' permission to the user 'user@contoso.com' for listitem with id 1 in the list 'Documents'
------------------EXAMPLE 2------------------

Set-PnPListItemPermission -List 'Documents' -Identity 1 -User 'user@contoso.com' -RemoveRole 'Contribute'


Removes the 'Contribute' permission to the user 'user@contoso.com' for listitem with id 1 in the list 'Documents'
------------------EXAMPLE 3------------------

Set-PnPListItemPermission -List 'Documents' -Identity 1 -User 'user@contoso.com' -AddRole 'Contribute' -


ClearExisting

Adds the 'Contribute' permission to the user 'user@contoso.com' for listitem with id 1 in the list 'Documents' and
removes all other permissions
------------------EXAMPLE 4------------------

Set-PnPListItemPermission -List 'Documents' -Identity 1 -InheritPermissions

Resets permissions for listitem with id 1 to inherit permissions from the list 'Documents'

Parameters
-AddRole
The role that must be assigned to the group or user

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClearExisting
Clear all existing permissions

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Group
Type: GroupPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the listitem, or actual ListItem object

Type: ListItemPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-InheritPermissions
Inherit permissions from the list, removing unique permissions

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The ID, Title or Url of the list.

Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-RemoveRole
The role that must be removed from the group or user

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SystemUpdate
Update the item permissions without creating a new version or triggering MS Flow.
Only applicable to: SharePoint Online
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-User

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPListPermission
In ths Article

Sets list permissions

Syntax
Set-PnPListPermission -Group <GroupPipeBind>
-Identity <ListPipeBind>
[-AddRole <String>]
[-RemoveRole <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPListPermission -User <String>


-Identity <ListPipeBind>
[-AddRole <String>]
[-RemoveRole <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPListPermission -Identity 'Documents' -User 'user@contoso.com' -AddRole 'Contribute'

Adds the 'Contribute' permission to the user 'user@contoso.com' for the list 'Documents'
------------------EXAMPLE 2------------------

Set-PnPListPermission -Identity 'Documents' -User 'user@contoso.com' -RemoveRole 'Contribute'

Removes the 'Contribute' permission to the user 'user@contoso.com' for the list 'Documents'

Parameters
-AddRole
The role that must be assigned to the group or user

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Group

Type: GroupPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID or Title of the list.

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RemoveRole
The role that must be removed from the group or user

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-User

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPListRecordDeclaration
In ths Article

The RecordDeclaration parameter supports 4 values: AlwaysAllowManualDeclaration


NeverAllowManualDeclaration UseSiteCollectionDefaults

Syntax
Set-PnPListRecordDeclaration -List <ListPipeBind>
[-ManualRecordDeclaration <EcmListManualRecordDeclaration>]
[-AutoRecordDeclaration <Boolean>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPListRecordDeclaration -List "Documents" -ManualRecordDeclaration NeverAllowManualDeclaration

Sets the manual record declaration to never allow


------------------EXAMPLE 2------------------

Set-PnPListRecordDeclaration -List "Documents" -AutoRecordDeclaration $true

Turns on auto record declaration for the list

Parameters
-AutoRecordDeclaration
Defines if you want to set auto record declaration on the list

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The List to set the manual record declaration settings for

Type: ListPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ManualRecordDeclaration
Defines the manual record declaration setting for the lists

Type: EcmListManualRecordDeclaration
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPMasterPage
In ths Article

Set the masterpage

Syntax
Set-PnPMasterPage [-MasterPageServerRelativeUrl <String>]
[-CustomMasterPageServerRelativeUrl <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPMasterPage [-MasterPageSiteRelativeUrl <String>]


[-CustomMasterPageSiteRelativeUrl <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Sets the default master page of the current web.

Examples
------------------EXAMPLE 1------------------

Set-PnPMasterPage -MasterPageServerRelativeUrl /sites/projects/_catalogs/masterpage/oslo.master

Sets the master page based on a server relative URL


------------------EXAMPLE 2------------------

Set-PnPMasterPage -MasterPageServerRelativeUrl /sites/projects/_catalogs/masterpage/oslo.master -


CustomMasterPageServerRelativeUrl /sites/projects/_catalogs/masterpage/oslo.master

Sets the master page and custom master page based on a server relative URL
------------------EXAMPLE 3------------------

Set-PnPMasterPage -MasterPageSiteRelativeUrl _catalogs/masterpage/oslo.master

Sets the master page based on a site relative URL


------------------EXAMPLE 4------------------
Set-PnPMasterPage -MasterPageSiteRelativeUrl _catalogs/masterpage/oslo.master -CustomMasterPageSiteRelativeUrl
_catalogs/masterpage/oslo.master

Sets the master page and custom master page based on a site relative URL

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CustomMasterPageServerRelativeUrl
Specifies the custom Master page URL based on the server relative URL

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CustomMasterPageSiteRelativeUrl
Specifies the custom Master page URL based on the site relative URL

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MasterPageServerRelativeUrl
Specifies the Master page URL based on the server relative URL

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MasterPageSiteRelativeUrl
Specifies the Master page URL based on the site relative URL
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPMinimalDownloadStrategy
In ths Article

Activates or deactivates the minimal downloading strategy.

Syntax
Set-PnPMinimalDownloadStrategy -On [<SwitchParameter>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPMinimalDownloadStrategy -Off [<SwitchParameter>]


[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Activates or deactivates the minimal download strategy feature of a site

Examples
------------------EXAMPLE 1------------------

Set-PnPMinimalDownloadStrategy -Off

Will deactivate minimal download strategy (MDS ) for the current web.
------------------EXAMPLE 2------------------

Set-PnPMinimalDownloadStrategy -On

Will activate minimal download strategy (MDS ) for the current web.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifies whether to overwrite (when activating) or continue (when deactivating) an existing feature with the same
feature identifier. This parameter is ignored if there are no errors.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Off
Turn minimal download strategy off

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-On
Turn minimal download strategy on

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPPropertyBagValue
In ths Article

Sets a property bag value

Syntax
Set-PnPPropertyBagValue -Key <String>
-Value <String>
[-Folder <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPPropertyBagValue -Key <String>


-Value <String>
-Indexed [<SwitchParameter>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPPropertyBagValue -Key MyKey -Value MyValue

This sets or adds a value to the current web property bag


------------------EXAMPLE 2------------------

Set-PnPPropertyBagValue -Key MyKey -Value MyValue -Folder /

This sets or adds a value to the root folder of the current web
------------------EXAMPLE 3------------------

Set-PnPPropertyBagValue -Key MyKey -Value MyValue -Folder /MyFolder

This sets or adds a value to the folder MyFolder which is located in the root folder of the current web

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Folder
Site relative url of the folder. See examples for use.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Indexed

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Value

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPProvisioningTemplateMetadata
In ths Article

Sets metadata of a provisioning template

Syntax
Set-PnPProvisioningTemplateMetadata -Path <String>
[-TemplateDisplayName <String>]
[-TemplateImagePreviewUrl <String>]
[-TemplateProperties <Hashtable>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPProvisioningTemplateMetadata -Path template.xml -TemplateDisplayName "DisplayNameValue"

Sets the DisplayName property of a site template in XML format.


------------------EXAMPLE 2------------------

Set-PnPProvisioningTemplateMetadata -Path template.pnp -TemplateDisplayName "DisplayNameValue"

Sets the DisplayName property of a site template in Office Open XML format.
------------------EXAMPLE 3------------------

Set-PnPProvisioningTemplateMetadata -Path template.xml -TemplateImagePreviewUrl "Full URL of the Image Preview"

Sets the Url to the preview image of a site template in XML format.
------------------EXAMPLE 4------------------

Set-PnPProvisioningTemplateMetadata -Path template.pnp -TemplateImagePreviewUrl "Full URL of the Image Preview"

Sets the to the preview image of a site template in Office Open XML format.
------------------EXAMPLE 5------------------

Set-PnPProvisioningTemplateMetadata -Path template.xml -TemplateProperties @{"Property1" = "Test Value 1";


"Property2"="Test Value 2"}
Sets the property 'Property1' to the value 'Test Value 1' of a site template in XML format.
------------------EXAMPLE 6------------------

Set-PnPProvisioningTemplateMetadata -Path template.pnp -TemplateProperties @{"Property1" = "Test Value 1";


"Property2"="Test Value 2"}

Sets the property 'Property1' to the value 'Test Value 1' of a site template in Office Open XML format.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path to the xml or pnp file containing the site template.

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-TemplateDisplayName
It can be used to specify the DisplayName of the template file that will be updated.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateImagePreviewUrl
It can be used to specify the ImagePreviewUrl of the template file that will be updated.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProperties
It can be used to specify custom Properties for the template file that will be updated.
Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TemplateProviderExtensions
Allows you to specify ITemplateProviderExtension to execute while extracting a template.

Type: ITemplateProviderExtension[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPRequestAccessEmails
In ths Article

Sets Request Access Emails on a web

Syntax
Set-PnPRequestAccessEmails -Emails <String[]>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPRequestAccessEmails -Emails someone@example.com

This will update the request access e-mail address


------------------EXAMPLE 2------------------

Set-PnPRequestAccessEmails -Emails @( someone@example.com; someoneelse@example.com )

This will update multiple request access e-mail addresses

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Emails
Email address(es) to set the RequestAccessEmails to
Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPSearchConfiguration
In ths Article

Sets the search configuration

Syntax
Set-PnPSearchConfiguration -Configuration <String>
[-Scope <SearchConfigurationScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPSearchConfiguration -Path <String>


[-Scope <SearchConfigurationScope>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPSearchConfiguration -Configuration $config

Sets the search configuration for the current web


------------------EXAMPLE 2------------------

Set-PnPSearchConfiguration -Configuration $config -Scope Site

Sets the search configuration for the current site collection


------------------EXAMPLE 3------------------

Set-PnPSearchConfiguration -Configuration $config -Scope Subscription

Sets the search configuration for the current tenant


------------------EXAMPLE 4------------------

Set-PnPSearchConfiguration -Path searchconfig.xml -Scope Subscription

Reads the search configuration from the specified XML file and sets it for the current tenant

Parameters
-Configuration
Search configuration string

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path
Path to a search configuration

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope

Type: SearchConfigurationScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPSearchSettings
In ths Article

Sets search settings for a site

Syntax
Set-PnPSearchSettings [-SearchBoxInNavBar <SearchBoxInNavBarType>]
[-SearchPageUrl <String>]
[-SearchScope <SearchScopeType>]
[-Scope <SearchSettingsScope>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPSearchSettings -SearchBoxInNavBar Hidden -Scope Site

Hide the suite bar search box on all pages and sites in the site collection
------------------EXAMPLE 2------------------

Set-PnPSearchSettings -SearchBoxInNavBar Hidden -Scope Web

Hide the suite bar search box on all pages in the current site
------------------EXAMPLE 3------------------

Set-PnPSearchSettings -SearchPageUrl "https://contoso.sharepoint.com/sites/mysearch/SitePages/search.aspx"

Redirect the suite bar search box in the site to a custom URL
------------------EXAMPLE 4------------------

Set-PnPSearchSettings -SearchPageUrl ""

Clear the suite bar search box URL and revert to the default behavior
------------------EXAMPLE 5------------------

Set-PnPSearchSettings -SearchPageUrl "https://contoso.sharepoint.com/sites/mysearch/SitePages/search.aspx" -


Scope Site
Redirect classic search to a custom URL
------------------EXAMPLE 6------------------

Set-PnPSearchSettings -SearchScope Tenant

Set default behavior of the suite bar search box to show tenant wide results instead of site or hub scoped results
------------------EXAMPLE 7------------------

Set-PnPSearchSettings -SearchScope Hub

Set default behavior of the suite bar search box to show hub results instead of site results on an associated hub site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Scope to apply the setting to. Possible values: Web (default), Site\r\n\r\nFor a root site, the scope does not matter.

Type: SearchSettingsScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SearchBoxInNavBar
Set the scope of which the suite bar search box shows. Possible values: Inherit, AllPages, ModernOnly, Hidden
Type: SearchBoxInNavBarType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SearchPageUrl
Set the URL where the search box should redirect to.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SearchScope
Set the search scope of the suite bar search box. Possible values: DefaultScope, Tenant, Hub, Site

Type: SearchScopeType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPSite
In ths Article

Sets Site Collection properties.

Syntax
Set-PnPSite [-Classification <String>]
[-DisableFlows [<SwitchParameter>]]
[-LogoFilePath <String>]
[-Sharing <SharingCapabilities>]
[-StorageMaximumLevel <Int>]
[-StorageWarningLevel <Int>]
[-AllowSelfServiceUpgrade [<SwitchParameter>]]
[-NoScriptSite [<SwitchParameter>]]
[-Owners <String>]
[-CommentsOnSitePagesDisabled [<SwitchParameter>]]
[-DefaultLinkPermission <SharingPermissionType>]
[-DefaultSharingLinkType <SharingLinkType>]
[-DisableAppViews <AppViewsPolicy>]
[-DisableCompanyWideSharingLinks <CompanyWideSharingLinksPolicy>]
[-DisableSharingForNonOwners [<SwitchParameter>]]
[-LocaleId <UInt32>]
[-RestrictedToGeo <RestrictedToRegion>]
[-SocialBarOnSitePagesDisabled [<SwitchParameter>]]
[-Identity <String>]
[-Connection <SPOnlineConnection>]

Set-PnPSite [-LockState <SiteLockState>]


[-Wait [<SwitchParameter>]]
[-Identity <String>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPSite -Classification "HBI"

Sets the current site classification to HBI


------------------EXAMPLE 2------------------

Set-PnPSite -Classification $null

Unsets the current site classification


------------------EXAMPLE 3------------------
Set-PnPSite -DisableFlows

Disables Microsoft Flow for this site, and also hides the Flow button from the ribbon
------------------EXAMPLE 4------------------

Set-PnPSite -DisableFlows:$false

Enables Microsoft Flow for this site


------------------EXAMPLE 5------------------

Set-PnPSite -LogoFilePath c:\images\mylogo.png

Sets the logo if the site is a modern team site

Parameters
-AllowSelfServiceUpgrade
Specifies if the site administrator can upgrade the site collection

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Classification
The classification to set

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CommentsOnSitePagesDisabled
Specifies if comments on site pages are enabled or disabled

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultLinkPermission
Specifies the default link permission for the site collection. None - Respect the organization default link permission.
View - Sets the default link permission for the site to "view" permissions. Edit - Sets the default link permission for
the site to "edit" permissions

Type: SharingPermissionType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultSharingLinkType
Specifies the default link type for the site collection. None - Respect the organization default sharing link type.
AnonymousAccess - Sets the default sharing link for this site to an Anonymous Access or Anyone link. Internal -
Sets the default sharing link for this site to the "organization" link or company shareable link. Direct - Sets the
default sharing link for this site to the "Specific people" link

Type: SharingLinkType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableAppViews

Type: AppViewsPolicy
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableCompanyWideSharingLinks

Type: CompanyWideSharingLinksPolicy
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableFlows
Disables Microsoft Flow for this site
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableSharingForNonOwners
Specifies to prevent non-owners from inviting new users to the site

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LocaleId
Specifies the language of this site collection.

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LockState
Sets the lockstate of a site

Type: SiteLockState
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LogoFilePath
Sets the logo if the site is modern team site. If you want to set the logo for a classic site, use Set-PnPWeb -
SiteLogoUrl

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NoScriptSite
Specifies if a site allows custom script or not. See https://support.office.com/en-us/article/Turn-scripting-
capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f for more information.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owners
Specifies owner(s) to add as site collection administrators. They will be added as additional site collection
administrators. Existing administrators will stay. Can be both users and groups.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RestrictedToGeo
Specifies the Geo/Region restrictions of this site.

Type: RestrictedToRegion
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Sharing
Specifies what the sharing capabilities are for the site. Possible values: Disabled, ExternalUserSharingOnly,
ExternalUserAndGuestSharing, ExistingExternalUserSharingOnly

Type: SharingCapabilities
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SocialBarOnSitePagesDisabled
Disables or enables the Social Bar for Site Collection.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StorageMaximumLevel
Specifies the storage quota for this site collection in megabytes. This value must not exceed the company's
available quota.
Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StorageWarningLevel
Specifies the warning level for the storage quota in megabytes. This value must not exceed the values set for the
StorageMaximumLevel parameter

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Wait
Wait for the operation to complete

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPSiteClosure
In ths Article

Opens or closes a site which has a site policy applied

Syntax
Set-PnPSiteClosure -State <ClosureState>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPSiteClosure -State Open

This opens a site which has been closed and has a site policy applied.
------------------EXAMPLE 2------------------

Set-PnPSiteClosure -State Closed

This closes a site which is open and has a site policy applied.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-State
The state of the site
Type: ClosureState
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPSiteDesign
In ths Article

Updates a Site Design on the current tenant.

Syntax
Set-PnPSiteDesign -Identity <TenantSiteDesignPipeBind>
[-Title <String>]
[-SiteScriptIds <GuidPipeBind[]>]
[-Description <String>]
[-IsDefault [<SwitchParameter>]]
[-PreviewImageAltText <String>]
[-PreviewImageUrl <String>]
[-WebTemplate <SiteWebTemplate>]
[-Version <Int>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPSiteDesign -Identity 046e2e76-67ba-46ca-a5f6-8eb418a7821e -Title "My Updated Company Design"

Updates an existing Site Design and sets a new title.


------------------EXAMPLE 2------------------

$design = Get-PnPSiteDesign -Identity 046e2e76-67ba-46ca-a5f6-8eb418a7821e


Set-PnPSiteDesign -Identity $design -Title "My Updated Company Design"

Updates an existing Site Design and sets a new title.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description of the site design

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The guid or an object representing the site design

Type: TenantSiteDesignPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IsDefault
Specifies if the site design is a default site design

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PreviewImageAltText
Sets the text for the preview image

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PreviewImageUrl
Sets the url to the preview image

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SiteScriptIds
An array of guids of site scripts
Type: GuidPipeBind[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the site design

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Version
Specifies the version of the design

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebTemplate
Specifies the type of site to which this design applies

Type: SiteWebTemplate
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPSitePolicy
In ths Article

Sets a site policy

Syntax
Set-PnPSitePolicy -Name <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPSitePolicy -Name "Contoso HBI"

This applies a site policy with the name "Contoso HBI" to the current site. The policy needs to be available in the
site.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the site policy to apply

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPSiteScript
In ths Article

Updates an existing Site Script on the current tenant.

Syntax
Set-PnPSiteScript -Identity <TenantSiteScriptPipeBind>
[-Title <String>]
[-Description <String>]
[-Content <String>]
[-Version <Int>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPSiteScript -Identity f1d55d9b-b116-4f54-bc00-164a51e7e47f -Title "My Site Script"

Updates an existing Site Script and changes the title.


------------------EXAMPLE 2------------------

$script = Get-PnPSiteScript -Identity f1d55d9b-b116-4f54-bc00-164a51e7e47f


Set-PnPSiteScript -Identity $script -Title "My Site Script"

Updates an existing Site Script and changes the title.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Content
A JSON string containing the site script
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description of the site script

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The guid or an object representing the site script

Type: TenantSiteScriptPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
The title of the site script

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Version
Specifies the version of the site script

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPStorageEntity
In ths Article

Set Storage Entities / Farm Properties in either the tenant scoped app catalog or the site collection app catalog.

Syntax
Set-PnPStorageEntity -Key <String>
-Value <String>
[-Comment <String>]
[-Description <String>]
[-Scope <StorageEntityScope>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPStorageEntity -Key MyKey -Value "MyValue" -Comment "My Comment" -Description "My Description"

Sets an existing or adds a new storage entity / farm property at tenant level.
------------------EXAMPLE 2------------------

Set-PnPStorageEntity -Scope Site -Key MyKey -Value "MyValue" -Comment "My Comment" -Description "My
Description"

Sets an existing or adds a new storage entity site collection level.

Parameters
-Comment
The comment to set.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The description to set.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key
The key of the value to set.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Defines the scope of the storage entity. Defaults to Tenant.

Type: StorageEntityScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Value
The value to set.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPTaxonomyFieldValue
In ths Article

Sets a taxonomy term value in a listitem field

Syntax
Set-PnPTaxonomyFieldValue -ListItem <ListItem>
-InternalFieldName <String>
[-Terms <Hashtable>]
[-Connection <SPOnlineConnection>]

Set-PnPTaxonomyFieldValue -TermId <GuidPipeBind>


-ListItem <ListItem>
-InternalFieldName <String>
[-Label <String>]
[-Connection <SPOnlineConnection>]

Set-PnPTaxonomyFieldValue -TermPath <String>


-ListItem <ListItem>
-InternalFieldName <String>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPTaxonomyFieldValue -ListItem $item -InternalFieldName 'Department' -TermId 863b832b-6818-4e6a-966d-


2d3ee057931c

Sets the field called 'Department' to the value of the term with the ID specified
------------------EXAMPLE 2------------------

Set-PnPTaxonomyFieldValue -ListItem $item -InternalFieldName 'Department' -TermPath 'CORPORATE|DEPARTMENTS|HR'

Sets the field called 'Department' to the term called HR which is located in the DEPARTMENTS termset, which in
turn is located in the CORPORATE termgroup.
------------------EXAMPLE 3------------------

Set-PnPTaxonomyFieldValue -ListItem $item -InternalFieldName 'Department' -Terms


@{"TermId1"="Label1";"TermId2"="Label2"}

Sets the field called 'Department' with multiple terms by ID and label. You can refer to those terms with the
{ID:label} token.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-InternalFieldName
The internal name of the field

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Label
The Label value of the term

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ListItem
The list item to set the field value to

Type: ListItem
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermId
The Id of the Term

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TermPath
A path in the form of GROUPLABEL|TERMSETLABEL|TERMLABEL

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Terms
Allows you to specify terms with key value pairs that can be referred to in the template by means of the {id:label}
token. See examples on how to use this parameter.

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPTenant
In ths Article

Sets organization-level site collection properties

Syntax
Set-PnPTenant [-MinCompatibilityLevel <Int>]
[-MaxCompatibilityLevel <Int>]
[-ExternalServicesEnabled <Boolean>]
[-NoAccessRedirectUrl <String>]
[-SharingCapability <SharingCapabilities>]
[-DisplayStartASiteOption <Boolean>]
[-StartASiteFormUrl <String>]
[-ShowEveryoneClaim <Boolean>]
[-ShowAllUsersClaim <Boolean>]
[-ShowEveryoneExceptExternalUsersClaim <Boolean>]
[-SearchResolveExactEmailOrUPN <Boolean>]
[-OfficeClientADALDisabled <Boolean>]
[-LegacyAuthProtocolsEnabled <Boolean>]
[-RequireAcceptingAccountMatchInvitedAccount <Boolean>]
[-ProvisionSharedWithEveryoneFolder <Boolean>]
[-SignInAccelerationDomain <String>]
[-EnableGuestSignInAcceleration <Boolean>]
[-UsePersistentCookiesForExplorerView <Boolean>]
[-BccExternalSharingInvitations <Boolean>]
[-BccExternalSharingInvitationsList <String>]
[-UserVoiceForFeedbackEnabled <Boolean>]
[-PublicCdnEnabled <Boolean>]
[-PublicCdnAllowedFileTypes <String>]
[-RequireAnonymousLinksExpireInDays <Int>]
[-SharingAllowedDomainList <String>]
[-SharingBlockedDomainList <String>]
[-SharingDomainRestrictionMode <SharingDomainRestrictionModes>]
[-OneDriveStorageQuota <Int>]
[-OneDriveForGuestsEnabled <Boolean>]
[-IPAddressEnforcement <Boolean>]
[-IPAddressAllowList <String>]
[-IPAddressWACTokenLifetime <Int>]
[-UseFindPeopleInPeoplePicker <Boolean>]
[-DefaultSharingLinkType <SharingLinkType>]
[-ODBMembersCanShare <SharingState>]
[-ODBAccessRequests <SharingState>]
[-PreventExternalUsersFromResharing <Boolean>]
[-ShowPeoplePickerSuggestionsForGuestUsers <Boolean>]
[-FileAnonymousLinkType <AnonymousLinkType>]
[-FolderAnonymousLinkType <AnonymousLinkType>]
[-NotifyOwnersWhenItemsReshared <Boolean>]
[-NotifyOwnersWhenInvitationsAccepted <Boolean>]
[-NotificationsInOneDriveForBusinessEnabled <Boolean>]
[-NotificationsInSharePointEnabled <Boolean>]
[-OwnerAnonymousNotification <Boolean>]
[-CommentsOnSitePagesDisabled <Boolean>]
[-SocialBarOnSitePagesDisabled <Boolean>]
[-OrphanedPersonalSitesRetentionPeriod <Int>]
[-DisallowInfectedFileDownload <Boolean>]
[-DefaultLinkPermission <SharingPermissionType>]
[-ConditionalAccessPolicy <SPOConditionalAccessPolicyType>]
[-AllowDownloadingNonWebViewableFiles <Boolean>]
[-AllowEditing <Boolean>]
[-ApplyAppEnforcedRestrictionsToAdHocRecipients <Boolean>]
[-FilePickerExternalImageSearchEnabled <Boolean>]
[-EmailAttestationRequired <Boolean>]
[-EmailAttestationReAuthDays <Int>]
[-HideDefaultThemes <Boolean>]
[-DisabledWebPartIds <Guid[]>]
[-Connection <SPOnlineConnection>]

Description
Sets organization-level site collection properties such as StorageQuota, StorageQuotaAllocated, ResourceQuota,
ResourceQuotaAllocated, and SiteCreationMode.
You must be a SharePoint Online global administrator to run the cmdlet.

Examples
------------------EXAMPLE 1------------------

Set-PnPTenantSite -Identity https://contoso.sharepoint.com/sites/team1 -LockState NoAccess


Set-PnPTenant -NoAccessRedirectUrl 'http://www.contoso.com'

This example blocks access to https://contoso.sharepoint.com/sites/team1 and redirects traffic to


http://www.contoso.com.
------------------EXAMPLE 2------------------

Set-PnPTenant -ShowEveryoneExceptExternalUsersClaim $false

This example hides the "Everyone Except External Users" claim in People Picker.
------------------EXAMPLE 3------------------

Set-PnPTenant -ShowAllUsersClaim $false

This example hides the "All Users" claim group in People Picker.
------------------EXAMPLE 4------------------

Set-PnPTenant -UsePersistentCookiesForExplorerView $true

This example enables the use of special persisted cookie for Open with Explorer.

Parameters
-AllowDownloadingNonWebViewableFiles

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-AllowEditing

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ApplyAppEnforcedRestrictionsToAdHocRecipients
Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-BccExternalSharingInvitations
When the feature is enabled, all external sharing invitations that are sent will blind copy the e-mail messages listed
in the BccExternalSharingInvitationsList.
The valid values are: False (default) - BCC for external sharing is disabled. True - All external sharing invitations that
are sent will blind copy the e-mail messages listed in the BccExternalSharingInvitationsList.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-BccExternalSharingInvitationsList
Specifies a list of e-mail addresses to be BCC'd when the BCC for External Sharing feature is enabled. Multiple
addresses can be specified by creating a comma separated list with no spaces.
The valid values are: "" (default) - Blank by default, this will also clear any value that has been set. Single or Multiple
e-mail addresses - joe@contoso.com or joe@contoso.com,bob@contoso.com

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CommentsOnSitePagesDisabled

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ConditionalAccessPolicy

Type: SPOConditionalAccessPolicyType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultLinkPermission

Type: SharingPermissionType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultSharingLinkType
Lets administrators choose what type of link appears is selected in the “Get a link” sharing dialog box in OneDrive
for Business and SharePoint Online.
For additional information about how to change the default link type, see Change the default link type when users
get links for sharing.
Note: Setting this value to “none” will default “get a link” to the most permissive link available (that is, if
anonymous links are enabled, the default link will be anonymous access; if they are disabled then the default link
will be internal.
The values are: None Direct Internal AnonymousAccess

Type: SharingLinkType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisabledWebPartIds
Guids of out of the box modern web part id's to hide

Type: Guid[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisallowInfectedFileDownload
Prevents the Download button from being displayed on the Virus Found warning page.
Accepts a value of true (enabled) to hide the Download button or false (disabled) to display the Download button.
By default this feature is set to false.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-DisplayStartASiteOption
Determines whether tenant users see the Start a Site menu option.
The valid values are: True (default) - Tenant users will see the Start a Site menu option. False - Start a Site is hidden
from the menu.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EmailAttestationReAuthDays

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EmailAttestationRequired

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableGuestSignInAcceleration
Accelerates guest-enabled site collections as well as member-only site collections when the
SignInAccelerationDomain parameter is set.
Note: If enabled, your identity provider must be capable of authenticating guest users. If it is not, guest users will be
unable to log in and access content that was shared with them.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExternalServicesEnabled
Enables external services for a tenant. External services are defined as services that are not in the Office 365
datacenters.
The valid values are: True (default) - External services are enabled for the tenant. False - External services that are
outside of the Office 365 datacenters cannot interact with SharePoint.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-FileAnonymousLinkType

Type: AnonymousLinkType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FilePickerExternalImageSearchEnabled

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FolderAnonymousLinkType

Type: AnonymousLinkType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HideDefaultThemes
Defines if the default themes are visible or hidden

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IPAddressAllowList
Configures multiple IP addresses or IP address ranges (IPv4 or IPv6).
Use commas to separate multiple IP addresses or IP address ranges. Verify there are no overlapping IP addresses
and ensure IP ranges use Classless Inter-Domain Routing (CIDR ) notation. For example, 172.16.0.0,
192.168.1.0/27.
Note: The IPAddressAllowList parameter only lets administrators set IP addresses or ranges that are recognized as
trusted. To only grant access from these IP addresses or ranges, set the IPAddressEnforcement parameter to $true.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IPAddressEnforcement
Allows access from network locations that are defined by an administrator.
The values are $true and $false. The default value is $false which means the setting is disabled.
Before the IPAddressEnforcement parameter is set, make sure you add a valid IPv4 or IPv6 address to the
IPAddressAllowList parameter.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IPAddressWACTokenLifetime

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LegacyAuthProtocolsEnabled
By default this value is set to $true.
Setting this parameter prevents Office clients using non-modern authentication protocols from accessing
SharePoint Online resources.
A value of $true - Enables Office clients using non-modern authentication protocols(such as, Forms-Based
Authentication (FBA) or Identity Client Runtime Library (IDCRL )) to access SharePoint resources.
A value of $false - Prevents Office clients using non-modern authentication protocols from accessing SharePoint
Online resources.
Note: This may also prevent third-party apps from accessing SharePoint Online resources.Also, this will also block
apps using the SharePointOnlineCredentials class to access SharePoint Online resources.For additional
information about SharePointOnlineCredentials, see SharePointOnlineCredentials class.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MaxCompatibilityLevel
Specifies the upper bound on the compatibility level for new sites.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MinCompatibilityLevel
Specifies the lower bound on the compatibility level for new sites.
Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NoAccessRedirectUrl
Specifies the URL of the redirected site for those site collections which have the locked state "NoAccess"
The valid values are: ""(default) - Blank by default, this will also remove or clear any value that has been set. Full
URL - Example: https://contoso.sharepoint.com/Pages/Locked.aspx

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NotificationsInOneDriveForBusinessEnabled

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NotificationsInSharePointEnabled

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NotifyOwnersWhenInvitationsAccepted
When this parameter is set to $true and when an external user accepts an invitation to a resource in a user’s
OneDrive for Business, the OneDrive for Business owner is notified by e-mail.
For additional information about how to configure notifications for external sharing, see Configure notifications for
external sharing for OneDrive for Business.
The values are $true and $false.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NotifyOwnersWhenItemsReshared
When this parameter is set to $true and another user re-shares a document from a user’s OneDrive for Business,
the OneDrive for Business owner is notified by e-mail.
For additional information about how to configure notifications for external sharing, see Configure notifications for
external sharing for OneDrive for Business.
The values are $true and $false.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ODBAccessRequests
Lets administrators set policy on access requests and requests to share in OneDrive for Business.
Values:
On- Users without permission to share can trigger sharing requests to the OneDrive for Business owner when they
attempt to share. Also, users without permission to a file or folder can trigger access requests to the OneDrive for
Business owner when they attempt to access an item they do not have permissions to.
Off- Prevent access requests and requests to share on OneDrive for Business.
Unspecified- Let each OneDrive for Business owner enable or disable access requests and requests to share on
their OneDrive.

Type: SharingState
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ODBMembersCanShare
Lets administrators set policy on re-sharing behavior in OneDrive for Business.
Values:
On- Users with edit permissions can re-share.
Off- Only OneDrive for Business owner can share. The value of ODBAccessRequests defines whether a request to
share gets sent to the owner.
Unspecified- Let each OneDrive for Business owner enable or disable re-sharing behavior on their OneDrive.

Type: SharingState
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OfficeClientADALDisabled
When set to true this will disable the ability to use Modern Authentication that leverages ADAL across the tenant.
The valid values are: False (default) - Modern Authentication is enabled/allowed. True - Modern Authentication via
ADAL is disabled.
Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OneDriveForGuestsEnabled
Lets OneDrive for Business creation for administrator managed guest users. Administrator managed Guest users
use credentials in the resource tenant to access the resources.
The valid values are the following:
$true-Administrator managed Guest users can be given OneDrives, provided needed licenses are assigned.
$false- Administrator managed Guest users can't be given OneDrives as functionality is turned off.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OneDriveStorageQuota
Sets a default OneDrive for Business storage quota for the tenant. It will be used for new OneDrive for Business
sites created.
A typical use will be to reduce the amount of storage associated with OneDrive for Business to a level below what
the License entitles the users. For example, it could be used to set the quota to 10 gigabytes (GB ) by default.
If value is set to 0, the parameter will have no effect.
If the value is set larger than the Maximum allowed OneDrive for Business quota, it will have no effect.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OrphanedPersonalSitesRetentionPeriod
Specifies the number of days after a user's Active Directory account is deleted that their OneDrive for Business
content will be deleted.
The value range is in days, between 30 and 3650. The default value is 30.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-OwnerAnonymousNotification
Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PreventExternalUsersFromResharing

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ProvisionSharedWithEveryoneFolder
Creates a Shared with Everyone folder in every user's new OneDrive for Business document library.
The valid values are: True (default) - The Shared with Everyone folder is created. False - No folder is created when
the site and OneDrive for Business document library is created.
The default behavior of the Shared with Everyone folder changed in August 2015. For additional information about
the change, see Provision the Shared with Everyone folder in OneDrive for Business
(https://support.office.com/en-us/article/Provision-the-Shared-with-Everyone-folder-in-OneDrive-for-Business-
6bb02c91-fd0b-42ba-9457-3921cb6dc5b2?ui=en-US&rs=en-US&ad=US )

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PublicCdnAllowedFileTypes

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PublicCdnEnabled

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RequireAcceptingAccountMatchInvitedAccount
Ensures that an external user can only accept an external sharing invitation with an account matching the invited
email address.
Administrators who desire increased control over external collaborators should consider enabling this feature.
Note, this only applies to new external users accepting new sharing invitations. Also, the resource owner must
share with an organizational or Microsoft account or the external user will be unable to access the resource.
The valid values are: False (default) - When a document is shared with an external user, bob@contoso.com, it can be
accepted by any user with access to the invitation link in the original e-mail. True - User must accept this invitation
with bob@contoso.com.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RequireAnonymousLinksExpireInDays
Specifies all anonymous links that have been created (or will be created) will expire after the set number of days .
To remove the expiration requirement, set the value to zero (0).

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SearchResolveExactEmailOrUPN
Removes the search capability from People Picker. Note, recently resolved names will still appear in the list until
browser cache is cleared or expired.
SharePoint Administrators will still be able to use starts with or partial name matching when enabled.
The valid values are: False (default) - Starts with / partial name search functionality is available. True - Disables
starts with / partial name search functionality for all SharePoint users, except SharePoint Admins.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SharingAllowedDomainList
Specifies a list of email domains that is allowed for sharing with the external collaborators. Use the space character
as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".
For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365
SharePoint Online and OneDrive for Business

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SharingBlockedDomainList
Specifies a list of email domains that is blocked or prohibited for sharing with the external collaborators. Use space
character as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".
For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365
SharePoint Online and OneDrive for Business

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SharingCapability
Determines what level of sharing is available for the site.
The valid values are: ExternalUserAndGuestSharing (default) - External user sharing (share by email) and guest link
sharing are both enabled. Disabled - External user sharing (share by email) and guest link sharing are both
disabled. ExternalUserSharingOnly - External user sharing (share by email) is enabled, but guest link sharing is
disabled.
For more information about sharing, see Manage external sharing for your SharePoint online environment
(http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/manage-external-sharing-for-your-
sharepoint-online-environment-HA102849864.aspx).

Type: SharingCapabilities
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SharingDomainRestrictionMode
Specifies the external sharing mode for domains.
The following values are: None AllowList BlockList
For additional information about how to restrict a domain sharing, see Restricted Domains Sharing in Office 365
SharePoint Online and OneDrive for Business.

Type: SharingDomainRestrictionModes
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShowAllUsersClaim
Enables the administrator to hide the All Users claim groups in People Picker.
When users share an item with "All Users (x)", it is accessible to all organization members in the tenant's Azure
Active Directory who have authenticated with via this method. When users share an item with "All Users (x)" it is
accessible to all organization members in the tenant that used NTLM to authentication with SharePoint.
Note, the All Users(authenticated) group is equivalent to the Everyone claim, and shows as Everyone.To change
this, see - ShowEveryoneClaim.
The valid values are: True(default) - The All Users claim groups are displayed in People Picker. False - The All Users
claim groups are hidden in People Picker.
Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShowEveryoneClaim
Enables the administrator to hide the Everyone claim in the People Picker. When users share an item with
Everyone, it is accessible to all authenticated users in the tenant's Azure Active Directory, including any active
external users who have previously accepted invitations.
Note, that some SharePoint system resources such as templates and pages are required to be shared to Everyone
and this type of sharing does not expose any user data or metadata.
The valid values are: True (default) - The Everyone claim group is displayed in People Picker. False - The Everyone
claim group is hidden from the People Picker.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShowEveryoneExceptExternalUsersClaim
Enables the administrator to hide the "Everyone except external users" claim in the People Picker. When users
share an item with "Everyone except external users", it is accessible to all organization members in the tenant's
Azure Active Directory, but not to any users who have previously accepted invitations.
The valid values are: True(default) - The Everyone except external users is displayed in People Picker. False - The
Everyone except external users claim is not visible in People Picker.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ShowPeoplePickerSuggestionsForGuestUsers

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SignInAccelerationDomain
Specifies the home realm discovery value to be sent to Azure Active Directory (AAD ) during the user sign-in
process.
When the organization uses a third-party identity provider, this prevents the user from seeing the Azure Active
Directory Home Realm Discovery web page and ensures the user only sees their company's Identity Provider's
portal. This value can also be used with Azure Active Directory Premium to customize the Azure Active Directory
login page.
Acceleration will not occur on site collections that are shared externally.
This value should be configured with the login domain that is used by your company (that is,
example@contoso.com).
If your company has multiple third-party identity providers, configuring the sign-in acceleration value will break
sign-in for your organization.
The valid values are: "" (default) - Blank by default, this will also remove or clear any value that has been set. Login
Domain - For example: "contoso.com"

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SocialBarOnSitePagesDisabled

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StartASiteFormUrl
Specifies URL of the form to load in the Start a Site dialog.
The valid values are: "" (default) - Blank by default, this will also remove or clear any value that has been set. Full
URL - Example: "https://contoso.sharepoint.com/path/to/form"

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UseFindPeopleInPeoplePicker
Note: When set to $true, users aren't able to share with security groups or SharePoint groups.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UsePersistentCookiesForExplorerView
Lets SharePoint issue a special cookie that will allow this feature to work even when "Keep Me Signed In" is not
selected.
"Open with Explorer" requires persisted cookies to operate correctly. When the user does not select "Keep Me
Signed in" at the time of sign -in, "Open with Explorer" will fail.
This special cookie expires after 30 minutes and cannot be cleared by closing the browser or signing out of
SharePoint Online.To clear this cookie, the user must log out of their Windows session.
The valid values are: False(default) - No special cookie is generated and the normal Office 365 sign -in length /
timing applies. True - Generates a special cookie that will allow "Open with Explorer" to function if the "Keep Me
Signed In" box is not checked at sign -in.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UserVoiceForFeedbackEnabled

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPTenantCdnEnabled
In ths Article

Enables or disabled the public or private Office 365 Content Delivery Network (CDN ).

Syntax
Set-PnPTenantCdnEnabled -Enable <Boolean>
-CdnType <CdnType>
[-Connection <SPOnlineConnection>]

Description
Enables or disabled the public or private Office 365 Content Delivery Network (CDN ).

Examples
------------------EXAMPLE 1------------------

Set-PnPTenantCdnEnabled -CdnType Public -Enable $true

This example sets the Public CDN enabled.

Parameters
-CdnType
The type of cdn to enable or disable

Type: CdnType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-Enable
Specify to enable or disable

Type: Boolean
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPTenantCdnPolicy
In ths Article

Sets the CDN Policies for the specified CDN (Public | Private).

Syntax
Set-PnPTenantCdnPolicy -CdnType <SPOTenantCdnType>
-PolicyType <SPOTenantCdnPolicyType>
-PolicyValue <String>
[-Connection <SPOnlineConnection>]

Description
Sets the CDN Policies for the specified CDN (Public | Private).

Examples
------------------EXAMPLE 1------------------

Set-PnPTenantCdnPolicy -CdnType Public -PolicyType IncludeFileExtensions -PolicyValue


"CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,SVG,TTF,WOFF"

This example sets the IncludeFileExtensions policy to the specified value.

Parameters
-CdnType
The type of cdn to retrieve the policies from

Type: SPOTenantCdnType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PolicyType
The type of the policy to set

Type: SPOTenantCdnPolicyType
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PolicyValue
The value of the policy to set

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPTenantSite
In ths Article

Set site information.

Syntax
Set-PnPTenantSite -Url <String>
[-Title <String>]
[-SharingCapability <SharingCapabilities>]
[-DenyAddAndCustomizePages [<SwitchParameter>]]
[-LocaleId <UInt32>]
[-StorageMaximumLevel <Int>]
[-StorageWarningLevel <Int>]
[-AllowSelfServiceUpgrade [<SwitchParameter>]]
[-Owners <String>]
[-DefaultLinkPermission <SharingPermissionType>]
[-DefaultSharingLinkType <SharingLinkType>]
[-SharingAllowedDomainList <String>]
[-SharingBlockedDomainList <String>]
[-BlockDownloadOfNonViewableFiles [<SwitchParameter>]]
[-SharingDomainRestrictionMode <SharingDomainRestrictionModes>]
[-CommentsOnSitePagesDisabled [<SwitchParameter>]]
[-DisableAppViews <AppViewsPolicy>]
[-DisableCompanyWideSharingLinks <CompanyWideSharingLinksPolicy>]
[-DisableFlows <FlowsPolicy>]
[-Wait [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Set-PnPTenantSite -Url <String>


[-LockState <SiteLockState>]
[-Wait [<SwitchParameter>]]
[-Connection <SPOnlineConnection>]

Description
Sets site properties for existing sites.

Examples
------------------EXAMPLE 1------------------

Set-PnPTenantSite -Url https://contoso.sharepoint.com -Title "Contoso Website" -Sharing Disabled

This will set the title of the site collection with the URL 'https://contoso.sharepoint.com' to 'Contoso Website' and
disable sharing on this site collection.
------------------EXAMPLE 2------------------
Set-PnPTenantSite -Url https://contoso.sharepoint.com -Title "Contoso Website" -StorageWarningLevel 8000 -
StorageMaximumLevel 10000

This will set the title of the site collection with the URL 'https://contoso.sharepoint.com' to 'Contoso Website', set
the storage warning level to 8GB and set the storage maximum level to 10GB.
------------------EXAMPLE 3------------------

Set-PnPTenantSite -Url https://contoso.sharepoint.com/sites/sales -Owners "user@contoso.onmicrosoft.com"

This will add user@contoso.onmicrosoft.com as an additional site collection owner at


'https://contoso.sharepoint.com/sites/sales'.
------------------EXAMPLE 4------------------

Set-PnPTenantSite -Url https://contoso.sharepoint.com/sites/sales -Owners @("user1@contoso.onmicrosoft.com",


"user2@contoso.onmicrosoft.com")

This will add user1@contoso.onmicrosoft.com and user2@contoso.onmicrosoft.com as additional site collection


owners at 'https://contoso.sharepoint.com/sites/sales'.
------------------EXAMPLE 5------------------

Set-PnPTenantSite -Url https://contoso.sharepoint.com/sites/sales -NoScriptSite:$false

This will enable script support for the site 'https://contoso.sharepoint.com/sites/sales' if disabled.

Parameters
-AllowSelfServiceUpgrade
Specifies if the site administrator can upgrade the site collection

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-BlockDownloadOfNonViewableFiles
Specifies if non web viewable files can be downloaded.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CommentsOnSitePagesDisabled
Specifies if comments on site pages are enabled
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultLinkPermission
Specifies the default link permission for the site collection. None - Respect the organization default link permission.
View - Sets the default link permission for the site to "view" permissions. Edit - Sets the default link permission for
the site to "edit" permissions

Type: SharingPermissionType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultSharingLinkType
Specifies the default link type for the site collection. None - Respect the organization default sharing link type.
AnonymousAccess - Sets the default sharing link for this site to an Anonymous Access or Anyone link. Internal -
Sets the default sharing link for this site to the "organization" link or company shareable link. Direct - Sets the
default sharing link for this site to the "Specific people" link

Type: SharingLinkType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DenyAddAndCustomizePages
Determines whether the Add And Customize Pages right is denied on the site collection. For more information
about permission levels, see User permissions and permission levels in SharePoint.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableAppViews
Type: AppViewsPolicy
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableCompanyWideSharingLinks

Type: CompanyWideSharingLinksPolicy
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisableFlows

Type: FlowsPolicy
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LocaleId
Specifies the language of this site collection. For more information, see Locale IDs Assigned by Microsoft
(https://go.microsoft.com/fwlink/p/?LinkId=242911).

Type: UInt32
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LockState
Sets the lockstate of a site

Type: SiteLockState
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owners
Specifies owner(s) to add as site collection administrators. They will be added as additional site collection
administrators. Existing administrators will stay. Can be both users and groups.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SharingAllowedDomainList
Specifies a list of email domains that is allowed for sharing with the external collaborators. Use the space character
as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SharingBlockedDomainList
Specifies a list of email domains that is blocked for sharing with the external collaborators. Use the space character
as the delimiter for entering multiple values. For example, "contoso.com fabrikam.com".

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SharingCapability
Specifies what the sharing capabilities are for the site. Possible values: Disabled, ExternalUserSharingOnly,
ExternalUserAndGuestSharing, ExistingExternalUserSharingOnly

Type: SharingCapabilities
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SharingDomainRestrictionMode
Specifies the external sharing mode for domains.

Type: SharingDomainRestrictionModes
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StorageMaximumLevel
Specifies the storage quota for this site collection in megabytes. This value must not exceed the company's
available quota.
Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-StorageWarningLevel
Specifies the warning level for the storage quota in megabytes. This value must not exceed the values set for the
StorageMaximumLevel parameter

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
Specifies the title of the site

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the site

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Wait
Wait for the operation to complete

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPTheme
In ths Article

Sets the theme of the current web.

Syntax
Set-PnPTheme [-ColorPaletteUrl <String>]
[-FontSchemeUrl <String>]
[-BackgroundImageUrl <String>]
[-ResetSubwebsToInherit [<SwitchParameter>]]
[-UpdateRootWebOnly [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Sets the theme of the current web, if any of the attributes is not set, that value will be set to null

Examples
------------------EXAMPLE 1------------------

Set-PnPTheme

Removes the current theme and resets it to the default.


------------------EXAMPLE 2------------------

Set-PnPTheme -ColorPaletteUrl _catalogs/theme/15/company.spcolor

------------------EXAMPLE 3------------------

Set-PnPTheme -ColorPaletteUrl _catalogs/theme/15/company.spcolor -BackgroundImageUrl 'style


library/background.png'

------------------EXAMPLE 4------------------

Set-PnPTheme -ColorPaletteUrl _catalogs/theme/15/company.spcolor -BackgroundImageUrl 'style


library/background.png' -ResetSubwebsToInherit

Sets the theme to the web, and updates all subwebs to inherit the theme from this web.

Parameters
-BackgroundImageUrl
Specifies the Background Image Url based on the site or server relative url

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ColorPaletteUrl
Specifies the Color Palette Url based on the site or server relative url

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-FontSchemeUrl
Specifies the Font Scheme Url based on the site or server relative url

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ResetSubwebsToInherit
Resets subwebs to inherit the theme from the rootweb

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UpdateRootWebOnly
Updates only the rootweb, even if subwebs are set to inherit the theme.
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPTraceLog
In ths Article

Turn log tracing on or off

Syntax
Set-PnPTraceLog -On [<SwitchParameter>]
[-LogFile <String>]
[-WriteToConsole [<SwitchParameter>]]
[-Level <LogLevel>]
[-Delimiter <String>]
[-IndentSize <Int>]
[-AutoFlush <Boolean>]

Set-PnPTraceLog -Off [<SwitchParameter>]

Description
Defines if tracing should be turned on. PnP Core, which is the foundation of these cmdlets, uses the standard Trace
functionality of .NET. With this cmdlet you can turn capturing of this trace to a log file on or off. Notice that
basically only the Provisioning Engine writes to the tracelog which means that cmdlets related to the engine will
produce output.

Examples
------------------EXAMPLE 1------------------

Set-PnPTraceLog -On -LogFile traceoutput.txt

This turns on trace logging to the file 'traceoutput.txt' and will capture events of at least 'Information' level.
------------------EXAMPLE 2------------------

Set-PnPTraceLog -On -LogFile traceoutput.txt -Level Debug

This turns on trace logging to the file 'traceoutput.txt' and will capture debug events.
------------------EXAMPLE 3------------------

Set-PnPTraceLog -On -LogFile traceoutput.txt -Level Debug -Delimiter ","

This turns on trace logging to the file 'traceoutput.txt' and will write the entries as comma separated. Debug events
are captured.
------------------EXAMPLE 4------------------

Set-PnPTraceLog -Off

This turns off trace logging. It will flush any remaining messages to the log file.

Parameters
-AutoFlush
Auto flush the trace log. Defaults to true.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Delimiter
If specified the trace log entries will be delimited with this value.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-IndentSize
Indents in the tracelog will be with this amount of characters. Defaults to 4.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Level
The level of events to capture. Possible values are 'Debug', 'Error', 'Warning', 'Information'. Defaults to
'Information'.

Type: LogLevel
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-LogFile
The path and filename of the file to write the trace log to.
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Off
Turn off tracing to log file.

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-On
Turn on tracing to log file

Type: SwitchParameter
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WriteToConsole
Turn on console trace output.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPUnifiedGroup
In ths Article

Sets Office 365 Group (aka Unified Group) properties. Requires the Azure Active Directory application permission
'Group.ReadWrite.All'.

Syntax
Set-PnPUnifiedGroup -Identity <UnifiedGroupPipeBind>
[-DisplayName <String>]
[-Description <String>]
[-Owners <String[]>]
[-Members <String[]>]
[-IsPrivate [<SwitchParameter>]]
[-GroupLogoPath <String>]
[-CreateTeam [<SwitchParameter>]]

Examples
------------------EXAMPLE 1------------------

Set-PnPUnifiedGroup -Identity $group -DisplayName "My Displayname"

Sets the display name of the group where $group is a Group entity
------------------EXAMPLE 2------------------

Set-PnPUnifiedGroup -Identity $groupId -Descriptions "My Description" -DisplayName "My DisplayName"

Sets the display name and description of a group based upon its ID
------------------EXAMPLE 3------------------

Set-PnPUnifiedGroup -Identity $group -GroupLogoPath ".\MyLogo.png"

Sets a specific Office 365 Group logo.


------------------EXAMPLE 4------------------

Set-PnPUnifiedGroup -Identity $group -IsPrivate:$false

Sets a group to be Public if previously Private.


------------------EXAMPLE 5------------------
Set-PnPUnifiedGroup -Identity $group -Owners demo@contoso.com

Sets demo@contoso.com as owner of the group.

Parameters
-CreateTeam
Creates a MS Teams team associated with created group.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description
The Description of the group to set.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
The DisplayName of the group to set.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-GroupLogoPath
The path to the logo file of to set.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Identity of the Office 365 Group.

Type: UnifiedGroupPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False
-IsPrivate
Makes the group private when selected.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Members
The array UPN values of members to set to the group. Note: Will replace members.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Owners
The array UPN values of owners to set to the group. Note: Will replace owners.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPUserProfileProperty
In ths Article

Office365 only: Uses the tenant API to retrieve site information. You must connect to the tenant admin website
(https://:<tenant>-admin.sharepoint.com) with Connect-PnPOnline in order to use this command.

Syntax
Set-PnPUserProfileProperty -Value <String>
-Account <String>
-PropertyName <String>
[-Connection <SPOnlineConnection>]

Set-PnPUserProfileProperty -Values <String[]>


-Account <String>
-PropertyName <String>
[-Connection <SPOnlineConnection>]

Description
Requires a connection to a SharePoint Tenant Admin site.

Examples
------------------EXAMPLE 1------------------

Set-PnPUserProfileProperty -Account 'user@domain.com' -Property 'SPS-Location' -Value 'Stockholm'

Sets the SPS -Location property for the user as specified by the Account parameter
------------------EXAMPLE 2------------------

Set-PnPUserProfileProperty -Account 'user@domain.com' -Property 'MyProperty' -Values 'Value 1','Value 2'

Sets the MyProperty multi value property for the user as specified by the Account parameter

Parameters
-Account
The account of the user, formatted either as a login name, or as a claims identity, e.g.
i:0#.f|membership|user@domain.com
Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PropertyName
The property to set, for instance SPS -Skills or SPS -Location

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Value
The value to set in the case of a single value property

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Values
The values set in the case of a multi value property, e.g. "Value 1","Value 2"

Type: String[]
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPView
In ths Article

Change view properties

Syntax
Set-PnPView -Identity <ViewPipeBind>
[-List <ListPipeBind>]
[-Values <Hashtable>]
[-Fields <String[]>]
[-Aggregations <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Sets one or more properties of an existing view, see here https://docs.microsoft.com/previous-
versions/office/sharepoint-server/ee543328(v=office.15) for the list of view properties.

Examples
------------------EXAMPLE 1------------------

Set-PnPView -List "Tasks" -Identity "All Tasks" -Values


@{JSLink="hierarchytaskslist.js|customrendering.js";Title="My view"}

Updates the "All Tasks" view on list "Tasks" to use hierarchytaskslist.js and customrendering.js for the JSLink and
changes the title of the view to "My view"
------------------EXAMPLE 2------------------

Get-PnPList -Identity "Tasks" | Get-PnPView | Set-PnPView -Values


@{JSLink="hierarchytaskslist.js|customrendering.js"}

Updates all views on list "Tasks" to use hierarchytaskslist.js and customrendering.js for the JSLink
------------------EXAMPLE 3------------------

Set-PnPView -List "Documents" -Identity "Corporate Documents" -Fields "Title","Created"

Updates the Corporate Documents view on the Documents library to have two fields
------------------EXAMPLE 4------------------

Set-PnPView -List "Documents" -Identity "Corporate Documents" -Fields "Title","Created" -Aggregations ""
Updates the Corporate Documents view on the Documents library and sets the totals (aggregations) to Count on
the Title field

Parameters
-Aggregations
A valid XML fragment containing one or more Aggregations
Only applicable to: SharePoint Online

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Fields
An array of fields to use in the view. Notice that specifying this value will remove the existing fields

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Id, Title or instance of the view

Type: ViewPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-List
The Id, Title or Url of the list
Type: ListPipeBind
Required: False
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Values
Hashtable of properties to update on the view. Use the syntax @{property1="value";property2="value"}.

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
Microsoft.SharePoint.Client.Field

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPWeb
In ths Article

Sets properties on a web

Syntax
Set-PnPWeb [-SiteLogoUrl <String>]
[-AlternateCssUrl <String>]
[-Title <String>]
[-Description <String>]
[-MasterUrl <String>]
[-CustomMasterUrl <String>]
[-HeaderLayout <HeaderLayoutType>]
[-HeaderEmphasis <SPVariantThemeType>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Sets properties on a web

Parameters
-AlternateCssUrl

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CustomMasterUrl
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Description

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HeaderEmphasis
Only applicable to: SharePoint Online

Type: SPVariantThemeType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HeaderLayout
Only applicable to: SharePoint Online

Type: HeaderLayoutType
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MasterUrl

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SiteLogoUrl
Sets the logo of the web to the current url. If you want to set the logo to a modern team site, use Set-PnPSite -
LogoFilePath.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Title
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPWebhookSubscription
In ths Article

Updates a Webhook subscription

Syntax
Set-PnPWebhookSubscription -Subscription <WebhookSubscriptionPipeBind>
[-List <ListPipeBind>]
[-NotificationUrl <String>]
[-ExpirationDate <DateTime>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPWebhookSubscription -List MyList -Subscription ea1533a8-ff03-415b-a7b6-517ee50db8b6 -NotificationUrl


https://my-func.azurewebsites.net/webhook

Updates an existing Webhook subscription with the specified id on the list MyList with a new Notification Url
------------------EXAMPLE 2------------------

Set-PnPWebhookSubscription -List MyList -Subscription ea1533a8-ff03-415b-a7b6-517ee50db8b6 -NotificationUrl


https://my-func.azurewebsites.net/webhook -ExpirationDate "2017-09-01"

Updates an existing Webhook subscription with the specified id on the list MyList with a new Notification Url and a
new expiration date
------------------EXAMPLE 3------------------

$subscriptions = Get-PnPWebhookSubscriptions -List MyList


$updated = $subscriptions[0]
$updated.ExpirationDate = "2017-10-01"
Set-PnPWebhookSubscription -List MyList -Subscription $updated

Updates the Webhook subscription from the list MyList with a modified subscription object. Note: The date will be
converted to Universal Time

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ExpirationDate
The date at which the Webhook subscription will expire. (Default: 6 months from today)

Type: DateTime
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-List
The list object or name from which the Webhook subscription will be modified

Type: ListPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-NotificationUrl
The URL of the Webhook endpoint that will be notified of the change

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Subscription
The identity of the Webhook subscription to update

Type: WebhookSubscriptionPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.
Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
OfficeDevPnP.Core.Entities.WebhookSubscription

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPWebPartProperty
In ths Article

Sets a web part property

Syntax
Set-PnPWebPartProperty -ServerRelativePageUrl <String>
-Identity <GuidPipeBind>
-Key <String>
-Value <PSObject>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Set-PnPWebPartProperty -ServerRelativePageUrl /sites/demo/sitepages/home.aspx -Identity ccd2c98a-c9ae-483b-


ae72-19992d583914 -Key "Title" -Value "New Title"

Sets the title property of the web part.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The Guid of the web part

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Key
Name of a single property to be set

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl
Full server relative url of the web part page, e.g. /sites/demo/sitepages/home.aspx

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Value
Value of the property to be set

Type: PSObject
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPWebPermission
In ths Article

Set permissions

Syntax
Set-PnPWebPermission -Group <GroupPipeBind>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPWebPermission -User <String>


[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPWebPermission -Identity <WebPipeBind>


-Group <GroupPipeBind>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPWebPermission -Identity <WebPipeBind>


-User <String>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPWebPermission -Url <String>


-Group <GroupPipeBind>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPWebPermission -Url <String>


-User <String>
[-AddRole <String[]>]
[-RemoveRole <String[]>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Description
Sets web permissions

Examples
------------------EXAMPLE 1------------------

Set-PnPWebPermission -Url projectA -User 'user@contoso.com' -AddRole 'Contribute'

Adds the 'Contribute' permission to the user 'user@contoso.com' for a web, specified by its site relative url
------------------EXAMPLE 2------------------

Set-PnPWebPermission -Identity 5fecaf67-6b9e-4691-a0ff-518fc9839aa0 -User 'user@contoso.com' -RemoveRole


'Contribute'

Removes the 'Contribute' permission to the user 'user@contoso.com' for a web, specified by its ID

Parameters
-AddRole
The role that must be assigned to the group or user

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Group

Type: GroupPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Identity/Id/Web object
Type: WebPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-RemoveRole
The role that must be removed from the group or user

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Url
The site relative url of the web, e.g. 'Subweb1'

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-User

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPWebTheme
In ths Article

Sets the theme of the current web.

Syntax
Set-PnPWebTheme [-Theme <ThemePipeBind>]
[-WebUrl <String>]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Sets the theme of the current web. * Requires Tenant Administration Rights *

Examples
------------------EXAMPLE 1------------------

Set-PnPWebTheme -Theme MyTheme

Sets the theme named "MyTheme" to the current web


------------------EXAMPLE 2------------------

Get-PnPTenantTheme -Name "MyTheme" | Set-PnPWebTheme

Sets the theme named "MyTheme" to the current web

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Theme
Specifies the Color Palette Url based on the site or server relative url
Type: ThemePipeBind
Required: False
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-WebUrl
The URL of the web to apply the theme to. If not specified it will default to the current web based upon the URL
specified with Connect-PnPOnline.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Set-PnPWikiPageContent
In ths Article

Sets the contents of a wikipage

Syntax
Set-PnPWikiPageContent -Content <String>
-ServerRelativePageUrl <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Set-PnPWikiPageContent -Path <String>


-ServerRelativePageUrl <String>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Content

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Path

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ServerRelativePageUrl
Site Relative Page Url

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Start-PnPWorkflowInstance
In ths Article

Starts a workflow instance on a list item

Syntax
Start-PnPWorkflowInstance -Subscription <WorkflowSubscriptionPipeBind>
-ListItem <ListItemPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Start-PnPWorkflowInstance -Name 'WorkflowName' -ListItem $item

Starts a workflow instance on the specified list item


------------------EXAMPLE 2------------------

Start-PnPWorkflowInstance -Name 'WorkflowName' -ListItem 2

Starts a workflow instance on the specified list item

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ListItem
The list item to start the workflow against
Type: ListItemPipeBind
Required: True
Position: 1
Accept pipeline input: False
Accept wildcard characters: False

-Subscription
The workflow subscription to start

Type: WorkflowSubscriptionPipeBind
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Stop-PnPWorkflowInstance
In ths Article

Stops a workflow instance

Syntax
Stop-PnPWorkflowInstance -Identity <WorkflowInstancePipeBind>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Stop-PnPWorkflowInstance -identity $wfInstance

Stops the workflow Instance

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forcefully terminate the workflow instead of cancelling. Works on errored and non-responsive workflows. Deletes
all created tasks. Does not notify participants.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The instance to stop
Type: WorkflowInstancePipeBind
Required: True
Position: 0
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Submit-PnPSearchQuery
In ths Article

Executes an arbitrary search query against the SharePoint search index

Syntax
Submit-PnPSearchQuery -Query <String>
[-StartRow <Int>]
[-MaxResults <Int>]
[-TrimDuplicates <Boolean>]
[-Properties <Hashtable>]
[-Refiners <String>]
[-Culture <Int>]
[-QueryTemplate <String>]
[-SelectProperties <String[]>]
[-RefinementFilters <String[]>]
[-SortList <Hashtable>]
[-RankingModelId <String>]
[-ClientType <String>]
[-CollapseSpecification <String>]
[-HiddenConstraints <String>]
[-TimeZoneId <Int>]
[-EnablePhonetic <Boolean>]
[-EnableStemming <Boolean>]
[-EnableQueryRules <Boolean>]
[-SourceId <Guid>]
[-ProcessBestBets <Boolean>]
[-ProcessPersonalFavorites <Boolean>]
[-RelevantResults [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
Submit-PnPSearchQuery -Query <String>
[-All [<SwitchParameter>]]
[-TrimDuplicates <Boolean>]
[-Properties <Hashtable>]
[-Refiners <String>]
[-Culture <Int>]
[-QueryTemplate <String>]
[-SelectProperties <String[]>]
[-RefinementFilters <String[]>]
[-SortList <Hashtable>]
[-RankingModelId <String>]
[-ClientType <String>]
[-CollapseSpecification <String>]
[-HiddenConstraints <String>]
[-TimeZoneId <Int>]
[-EnablePhonetic <Boolean>]
[-EnableStemming <Boolean>]
[-EnableQueryRules <Boolean>]
[-SourceId <Guid>]
[-ProcessBestBets <Boolean>]
[-ProcessPersonalFavorites <Boolean>]
[-RelevantResults [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Submit-PnPSearchQuery -Query "finance"

Returns the top 500 items with the term finance


------------------EXAMPLE 2------------------

Submit-PnPSearchQuery -Query "Title:Intranet*" -MaxResults 10

Returns the top 10 items indexed by SharePoint Search of which the title starts with the word Intranet
------------------EXAMPLE 3------------------

Submit-PnPSearchQuery -Query "Title:Intranet*" -All

Returns absolutely all items indexed by SharePoint Search of which the title starts with the word Intranet
------------------EXAMPLE 4------------------

Submit-PnPSearchQuery -Query "Title:Intranet*" -Refiners "contentclass,FileType(filter=6/0/*)"

Returns absolutely all items indexed by SharePoint Search of which the title starts with the word Intranet, and
return refiners for contentclass and FileType managed properties

Parameters
-All
Automatically page results until the end to get more than 500. Use with caution!
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ClientType
Specifies the name of the client which issued the query.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-CollapseSpecification
Limit the number of items per the collapse specification. See https://docs.microsoft.com/en-
us/sharepoint/dev/general-development/customizing-search-results-in-sharepoint#collapse-similar-search-
results-using-the-collapsespecification-property for more information.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Culture
The locale for the query.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnablePhonetic
Specifies whether the phonetic forms of the query terms are used to find matches.
Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableQueryRules
Specifies whether Query Rules are enabled for this query.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-EnableStemming
Specifies whether stemming is enabled.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-HiddenConstraints
The keyword query’s hidden constraints.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MaxResults
Maximum amount of search results to return. Default and max per page is 500 search results.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-ProcessBestBets
Determines whether Best Bets are enabled.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-ProcessPersonalFavorites
Determines whether personal favorites data is processed or not.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Properties
Extra query properties. Can for example be used for Office Graph queries.

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Query
Search query in Keyword Query Language (KQL ).

Type: String
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-QueryTemplate
Specifies the query template that is used at run time to transform the query based on user input.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RankingModelId
The identifier (ID ) of the ranking model to use for the query.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RefinementFilters
The set of refinement filters used.
Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Refiners
The list of refiners to be returned in a search result.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-RelevantResults
Specifies whether only relevant results are returned

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SelectProperties
The list of properties to return in the search results.

Type: String[]
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SortList
The list of properties by which the search results are ordered.

Type: Hashtable
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-SourceId
Specifies the identifier (ID or name) of the result source to be used to run the query.

Type: Guid
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
-StartRow
Search result item to start returning the results from. Useful for paging. Leave at 0 to return all results.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TimeZoneId
The identifier for the search query time zone.

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-TrimDuplicates
Specifies whether near duplicate items should be removed from the search results.

Type: Boolean
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Outputs
List<System.Object>

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Sync-PnPAppToTeams
In ths Article

Synchronize an app from the tenant app catalog to the Microsoft Teams app catalog

Syntax
Sync-PnPAppToTeams -Identity <AppMetadataPipeBind>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Sync-PnPAppToTeams -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will synchronize the given app with the Microsoft Teams app catalog

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Id of the Addin Instance

Type: AppMetadataPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Test-PnPListItemIsRecord
In ths Article

Checks if a list item is a record

Syntax
Test-PnPListItemIsRecord -List <ListPipeBind>
-Identity <ListItemPipeBind>
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Test-PnPListItemIsRecord -List "Documents" -Identity 4

Returns true if the document in the documents library with id 4 is a record

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The ID of the listitem, or actual ListItem object

Type: ListItemPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-List
The ID, Title or Url of the list.
Type: ListPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Test-PnPOffice365GroupAliasIsUsed
In ths Article

Tests if a given alias is already used used

Syntax
Test-PnPOffice365GroupAliasIsUsed -Alias <String>
[-Connection <SPOnlineConnection>]

Description
This command allows you to test if a provided alias is used or free, helps decide if it can be used as part of
connecting an Office 365 Unified group to an existing classic site collection.

Examples
------------------EXAMPLE 1------------------

Test-PnPOffice365GroupAliasIsUsed -Alias "MyGroup"

This will test if the alias MyGroup is already used

Parameters
-Alias
Specifies the alias of the group. Cannot contain spaces.

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Test-PnPTenantTemplate
In ths Article

Tests a tenant template for invalid references

Syntax
Test-PnPTenantTemplate -Template <ProvisioningHierarchy>
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Test-PnPTenantTemplate -Template $myTemplate

Checks for valid template references

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Template
The in-memory template to test
Only applicable to: SharePoint Online

Type: ProvisioningHierarchy
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Uninstall-PnPApp
In ths Article

Uninstalls an available add-in from the site

Syntax
Uninstall-PnPApp -Identity <AppMetadataPipeBind>
[-Scope <AppCatalogScope>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Uninstall-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will uninstall the specified app from the current site.
------------------EXAMPLE 2------------------

Uninstall-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Site

This will uninstall the specified app from the current site. Notice that the app was original installed from the site
collection appcatalog.

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Id of the Addin Instance
Only applicable to: SharePoint Online
Type: AppMetadataPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Defines which app catalog to use. Defaults to Tenant
Only applicable to: SharePoint Online

Type: AppCatalogScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Uninstall-PnPAppInstance
In ths Article

Removes an app from a site

Syntax
Uninstall-PnPAppInstance -Identity <AppPipeBind>
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]

Description
Removes an add-in/app that has been installed to a site.

Examples
------------------EXAMPLE 1------------------

Uninstall-PnPAppInstance -Identity $appinstance

Uninstalls the app instance which was retrieved with the command Get-PnPAppInstance
------------------EXAMPLE 2------------------

Uninstall-PnPAppInstance -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

Uninstalls the app instance with the ID '99a00f6e-fb81-4dc7-8eac-e09c6f9132fe'


------------------EXAMPLE 3------------------

Uninstall-PnPAppInstance -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -force

Uninstalls the app instance with the ID '99a00f6e-fb81-4dc7-8eac-e09c6f9132fe' and do not ask for confirmation

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Force
Do not ask for confirmation.

Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Appinstance or Id of the addin to remove.

Type: AppPipeBind
Required: True
Position: Named
Accept pipeline input: True
Accept wildcard characters: False

-Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most
situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead.
Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit
this parameter to use the current web.

Type: WebPipeBind
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Uninstall-PnPSolution
In ths Article

Uninstalls a sandboxed solution from a site collection

Syntax
Uninstall-PnPSolution -PackageId <GuidPipeBind>
-PackageName <String>
[-MajorVersion <Int>]
[-MinorVersion <Int>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Uninstall-PnPSolution -PackageId c2f5b025-7c42-4d3a-b579-41da3b8e7254 -SourceFilePath mypackage.wsp

Removes the package to the current site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MajorVersion
Optional major version of the solution, defaults to 1

Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-MinorVersion
Optional minor version of the solution, defaults to 0
Type: Int
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PackageId
ID of the solution, from the solution manifest

Type: GuidPipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-PackageName
Filename of the WSP file to uninstall

Type: String
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Unpublish-PnPApp
In ths Article

Unpublishes/retracts an available add-in from the app catalog

Syntax
Unpublish-PnPApp -Identity <AppMetadataPipeBind>
[-Scope <AppCatalogScope>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Unpublish-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will retract, but not remove, the specified app from the tenant app catalog
------------------EXAMPLE 2------------------

Unpublish-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Site

This will retract, but not remove, the specified app from the site collection app catalog

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Id of the Addin Instance
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: AppMetadataPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Defines which app catalog to use. Defaults to Tenant
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppCatalogScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Unregister-PnPHubSite
In ths Article

Unregisters a site as a hubsite

Syntax
Unregister-PnPHubSite -Site <SitePipeBind>
[-Connection <SPOnlineConnection>]

Description
Registers a site as a hubsite

Examples
------------------EXAMPLE 1------------------

Unregister-PnPHubSite -Site https://tenant.sharepoint.com/sites/myhubsite

This example unregisters the specified site as a hubsite

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Site
The site to unregister as a hubsite

Type: SitePipeBind
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False
Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Update-PnPApp
In ths Article

Updates an available app from the app catalog

Syntax
Update-PnPApp -Identity <AppMetadataPipeBind>
[-Scope <AppCatalogScope>]
[-Connection <SPOnlineConnection>]

Examples
------------------EXAMPLE 1------------------

Update-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe

This will update an already installed app if a new version is available in the tenant app catalog. Retrieve a list all
available apps and the installed and available versions with Get-PnPApp
------------------EXAMPLE 2------------------

Update-PnPApp -Identity 99a00f6e-fb81-4dc7-8eac-e09c6f9132fe -Scope Site

This will update an already installed app if a new version is available in the site collection app catalog. Retrieve a list
all available apps and the installed and available versions with Get-PnPApp -Scope Site

Parameters
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -
ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: SPOnlineConnection
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Id or an actual app metadata instance
Only applicable to: SharePoint Online, SharePoint Server 2019
Type: AppMetadataPipeBind
Required: True
Position: 0
Accept pipeline input: True
Accept wildcard characters: False

-Scope
Defines which app catalog to use. Defaults to Tenant
Only applicable to: SharePoint Online, SharePoint Server 2019

Type: AppCatalogScope
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Update-PnPSiteClassification
In ths Article

Updates Site Classifications for the tenant. Requires a connection to the Microsoft Graph.

Syntax
Update-PnPSiteClassification [-Classifications <String>]
[-DefaultClassification <String>]
[-UsageGuidelinesUrl <String>]

Update-PnPSiteClassification -Settings <SiteClassificationsSettings>

Examples
------------------EXAMPLE 1------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Update-PnPSiteClassification -Classifications "HBI","Top Secret"

Replaces the existing values of the site classification settings


------------------EXAMPLE 2------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Update-PnPSiteClassification -DefaultClassification "LBI"

Sets the default classification value to "LBI". This value needs to be present in the list of classification values.
------------------EXAMPLE 3------------------

Connect-PnPOnline -Scopes "Directory.ReadWrite.All"


Update-PnPSiteClassification -UsageGuidelinesUrl https://aka.ms/sppnp

sets the usage guideliness URL to the specified URL.

Parameters
-Classifications
A list of classifications, separated by commas. E.g. "HBI","LBI","Top Secret"
Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-DefaultClassification
The default classification to be used. The value needs to be present in the list of possible classifications

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-Settings
A settings object retrieved by Get-PnPSiteClassification

Type: SiteClassificationsSettings
Required: True
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

-UsageGuidelinesUrl
The UsageGuidelinesUrl. Set to "" to clear.

Type: String
Required: False
Position: Named
Accept pipeline input: False
Accept wildcard characters: False

Related Links
SharePoint Developer Patterns and Practices
minutes to read • Edit Online

Add-DatabaseToAvailabilityGroup
In ths Article

Adds one or more SharePoint databases to a SQL Server Availability Group

Syntax
Add-DatabaseToAvailabilityGroup [-AGName] <String> [-AssignmentCollection <SPAssignmentCollection>]
-DatabaseName <String> [-FileShare <String>] [<CommonParameters>]

Add-DatabaseToAvailabilityGroup [-AGName] <String> [-AssignmentCollection <SPAssignmentCollection>]


[-FileShare <String>] [-ProcessAllDatabases] [<CommonParameters>]

Description
Use the Add-DatabaseToAvailabilityGroup cmdlet to add an availability group to the farm.

Examples
Example 1

Add-DatabaseToAvailabilityGroup -AGName MyAvailabilityGroup -DatabaseName WSS_Content -FileShare


\\backup\share\

This example adds the database WSS_Content to the availability group named "MyAvailabilityGroup".
Example 2

Add-DatabaseToAvailabilityGroup -AGName MyAvailabilityGroup -ProcessAllDatabases -FileShare \\backup\share\

This example adds all SharePoint databases attached to the farm to the availability group named
"MyAvailabilityGroup"

Parameters
-AGName
The name of the availability group from which the databases are being added.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseName
The name of the database to be added to the availability group. Note: This parameter should not be used in
conjunction with the ProcessAllDatabases parameter.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileShare
When a database is being added to the availability group, backup / restores are done from this location to
propagate the database to all replicas.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProcessAllDatabases
Adds all databases from the current SharePoint farm into the availability group.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

Add-FASTSearchResource
In ths Article

Uploads a resource to the resource store.

Syntax
Add-FASTSearchResource [-Path] <String> [-FilePath] <String> [<CommonParameters>]

Description
This cmdlet uploads a specified file, located in the local environment, to the Microsoft FAST Search Server 2010 for
SharePoint resource store. The location of the resource store is typically specified in
%FASTSEARCH%/etc/Admin.config (where %FASTSEARCH% is the FAST Search Server 2010 for SharePoint
installation folder.) Specify a unique location of the resource in the upload URI.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>Add-FASTSearchResource dictionaries\spellcheck\check_en.aut c:\check_en.aut

This example uploads the file c:\check_en.aut to dictionaries\spellcheck\check_en.aut to the resource store.

Parameters
-FilePath
Path of the local resource to be uploaded.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Partial URI within the resource store where the file will be uploaded.
Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchResource
Remove-FASTSearchResource
minutes to read • Edit Online

Add-FASTSearchSpelltuning
In ths Article

Enables the spell tuning processor, used to fine-tune a spell check dictionary.

Syntax
Add-FASTSearchSpelltuning [<CommonParameters>]

Description
This cmdlet activates alignment of the spell checking dictionary with the index, so that spell checking dictionaries
are built from content that is fed into the index (not from standardized spelling dictionaries).
The Did You Mean feature is dictionary based; when spell tuning is activated, Did You Mean only suggests terms
that are actually in the index.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
(FAST Server for SharePoint 2010)

Related Links
Get-FASTSearchSpelltuningStatus
Remove-FASTSearchSpelltuning
Reset-FASTSearchSpelltuning
minutes to read • Edit Online

Add-SPAppDeniedEndpoint
In ths Article

Adds a relative URL endpoint of a server to the list of app-denied endpoints.

Syntax
Add-SPAppDeniedEndpoint [-Endpoint] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Use the Add-SPAppDeniedEndpoint cmdlet to add a relative URL endpoint of a server to the list of app-denied
endpoints in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE-------------

Add-SPAppDeniedEndpoint -Endpoint "/_vti_bin/contoso/service.asmx"

This example adds the "/_vti_bin/contoso/service.asmx" endpoint to the list of denied endpoints for apps. Apps will
not be able to access this endpoint.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Endpoint
Specifies a relative URL endpoint of a server that is added to the list of app-denied endpoints. Apps will not be able
to access relative URL endpoints of a server that exist in the app-denied endpoint list.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Clear-SPAppDeniedEndpoints
Get-SPAppDeniedEndpoints
Remove-SPAppDeniedEndpoint
minutes to read • Edit Online

Add-SPClaimTypeMapping
In ths Article

Adds a claim mapping to a trusted security token service (STS ) identity provider.

Syntax
Add-SPClaimTypeMapping [-Identity] <SPClaimMappingPipeBind>
[-TrustedIdentityTokenIssuer] <SPTrustedIdentityTokenIssuerPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Force] [<CommonParameters>]

Description
The Add-SPClaimTypeMapping cmdlet adds a claim type mapping rule to a security token service (STS ) identity
provider from a farm trust STS authentication provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>Get-SPTrustedIdentityProvider -Name "LiveIDSTS" | Add-SPClaimTypeMapping -IncomingClaimType


"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" -IncomingClaimTypeDisplayName "PUID" -
LocalClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/thumbprint"

This example adds a claim mapping to a trusted identity token issuer.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Overwrites the claim mapping rule if it exists.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the STS for the farm that will issue the security token for the identity provider.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a claim
mapping rule (for example, ClaimMap1); or an instance of a valid SPClaimMapping object.

Type: SPClaimMappingPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TrustedIdentityTokenIssuer
Specifies the farm trust Token Issuer (STS authentication provider).
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of an
authentication provider (for example, MyIDprovider1); or an instance of a valid SPTrustedIdentityTokenIssuer
object.

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPDiagnosticsPerformanceCounter
In ths Article

Adds a new instance of a performance counter to a Web front end computer or a database server.

Syntax
Add-SPDiagnosticsPerformanceCounter [-Category] <String> -Counter <String> [-AllInstances]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseServer] [-WebFrontEnd] [-WhatIf]
[<CommonParameters>]

Add-SPDiagnosticsPerformanceCounter [-Category] <String> [-Counter <String>] -Instance <String> [-AllInstances]


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseServer] [-WebFrontEnd] [-WhatIf]
[<CommonParameters>]

Add-SPDiagnosticsPerformanceCounter [-Category] <String> [-Instance <String>] [-AllInstances]


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseServer] [-WebFrontEnd] [-WhatIf]
-CounterList <String[]> [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Add-SPDiagnosticsPerformanceCounter cmdlet adds a performance counter to a front end Web server or a
database server. A performance counter is read and recorded in the usage database. By default, the new
performance counter is added to the database servers in the farm.

Examples
------------------EXAMPLE 1------------------

C:\PS>Add-SPDiagnosticsPerformanceCounter -category ASP.NET -Counter "Requests Queued"

This example adds the counter that has the name ASP.NET\Requests Queued on front end Web servers.
------------------EXAMPLE 2------------------

C:\PS>Add-SPDiagnosticsPerformanceCounter -category PhysicalDisk -counter "Avg. Disk Queue Length" -


allinstances

This example adds all instances of the counter PhysicalDisk in the category Avg. Disk Queue Length on front end
Web servers.
------------------EXAMPLE 3------------------

C:\PS>Add-SPDiagnosticsPerformanceCounter -category Processor -counter "% Processor Time" -instance "_Total" -


databaseserver

This example adds the _Total instance of the counter % Processor Time in the category Processor on database
servers.

Parameters
-AllInstances
Collects all instances of a counter category and type on the target Web front end computer or database server.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Category
Specifies the category of performance counter to add to the target Web front end computer or database server.
The type must be a valid name of a category of performance counters; for example, ASP.NET, PhysicalDisk, or
Processor.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Counter
Specifies the type of counter to add to the target Web front end computer or database server.
The type must be a valid name of counter type; for example, Requests Queued, Avg. Disk Queue Length, and %
Processor Time.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-CounterList
{{Fill CounterList Description}}

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseServer
Adds the specified performance counter to all database servers in the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Instance
Specifies the display name of the new performance counter.
The type must be a valid name of a performance counter instance; for example Total_PerfCounter.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-WebFrontEnd
Adds the specified performance counter to all Web front end computers in the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPDistributedCacheServiceInstance
In ths Article

Adds an instance of the distributed cache service to a local server.

Syntax
Add-SPDistributedCacheServiceInstance [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Add-SPDistributedCacheServiceInstance [-AssignmentCollection <SPAssignmentCollection>] [-CacheSizeInMB <Int32>]


[<CommonParameters>]

Add-SPDistributedCacheServiceInstance [-AssignmentCollection <SPAssignmentCollection>] [-Role <SPServerRole>]


[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets.
Use the Add-SPDistributedCacheServiceInstance cmdlet to add an instance of the distributed cache server to a
local server. This is required to start the AppFabric service.

Examples
Example 1

Add-SPDistributedCacheServiceInstance

This example adds an instance of the distributed cache service to a local server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CacheSizeInMB
Specifies the amount of RAM to allocate for the Distributed Cache service instance.
If this parameter is not specified, the default value will be used.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Role
Specifies the type of server role that the Distributed Cache service instance should be configured for.
This parameter is typically used when you are going to do a server role conversion to the specified server role.
The valid values are:
SingleServerFarm
DistributedCache
WebFrontEndWithDistributedCache

Type: SPServerRole
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Remove-SPDistributedCacheServiceInstance
minutes to read • Edit Online

Add-SPEduClassMember
In ths Article

Not in use

Syntax
Add-SPEduClassMember [-AssignmentCollection <SPAssignmentCollection>] -ClassId <String> -Role <String>
-Site <SPSitePipeBind> -UserAlias <String> [<CommonParameters>]

Description
Not in use

Examples
Example 1

Not in use

Parameters
-AssignmentCollection
Not in use

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClassId
Not in use

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Role
Not in use
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Site
Not in use

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-UserAlias
Not in use

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String
Microsoft.SharePoint.PowerShell.SPSitePipeBind Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Add-SPEduUser
In ths Article

Do not use

Syntax
Add-SPEduUser [-AssignmentCollection <SPAssignmentCollection>] [-FirstName <String>] [-LastName <String>]
-Role <String> -Site <SPSitePipeBind> -UserAlias <String> [-UserEmail <String>] [<CommonParameters>]

Description
Do not use

Examples
Example 1

Do not use

Parameters
-AssignmentCollection
Do not use

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-FirstName
Do not use

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-LastName
Do not use
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Role
Do not use

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Site
Do not use

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-UserAlias
Do not use

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-UserEmail
Do not use

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String
Microsoft.SharePoint.PowerShell.SPSitePipeBind Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

Add-SPInfoPathUserAgent
In ths Article

Adds a user agent to a farm.

Syntax
Add-SPInfoPathUserAgent [-Name] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Add-SPInfoPathUserAgent cmdlet creates a user agent to receive the .xml file that contains the data of the
form for indexing. The user agent receives the InfoPath 2013 files from InfoPath Forms Services in SharePoint
Server instead of Web pages in response to an HTTP request.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE-----------------

C:\PS>Add-SPInfoPathUserAgent -Name "NewAgent"

This example creates a new agent named NewAgent.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the user agent to receive InfoPath 2013 files. These user agents represent search bots that
are commonly used in an enterprise environment. If a different search technology is being used and InfoPath 2013
files are not being indexed, you can add additional search bots for that technology to the collection.
The type must be a valid file name; for example UserAgentName1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPPluggableSecurityTrimmer
In ths Article

Adds a pluggable security trimmer to a Profile service application proxy.

Syntax
Add-SPPluggableSecurityTrimmer -UserProfileApplicationProxyId <Guid> -PlugInId <Int32>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-QualifiedTypeName <String>] [-WhatIf]
[-CustomProperties <NameValueCollection>] [<CommonParameters>]

Description
Use the Add-SPPluggableSecurityTrimmer cmdlet to add a specified pluggable security trimmer to a User Profile service application proxy.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint
Server Cmdlets.

Examples
----------------EXAMPLE 1--------------------

C:\PS>$proxy = Get-SPServiceApplicationProxy | ? {$_.TypeName -eq 'User Profile Service Application Proxy'}


C:\PS>Add-SPPluggableSecurityTrimmer -UserProfileApplicationProxyId $proxy.Id -PlugInId 0

This example adds a pluggable security trimmer that is related to the User Profile service application proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects
in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose
of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically
disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-
SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomProperties
{{Fill CustomProperties Description}}
Type: NameValueCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PlugInId
The index of the pluggable security trimmer must have an integer value greater than or equal to zero.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QualifiedTypeName
Specifies the qualified type name of the class that implements the pluggable security trimmer.
The type must be a valid qualified type name, in the form
Microsoft.Office.Server.SocialData.SocialSecurityTrimmer,Microsoft.Office.Server.UserProfiles,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserProfileApplicationProxyId
Specifies the ID of the User Profile service application proxy to which you are adding the pluggable security trimmer.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPProfileLeader
In ths Article

Adds a company leader.

Syntax
Add-SPProfileLeader [-ProfileServiceApplicationProxy] <SPServiceApplicationProxyPipeBind>
[-Name] <SPProfileLeaderPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet was introduced in SharePoint Server 2010 Service Pack 1 (SP1).
Use the Add-SPProfileLeader cmdlet to add a user as the company leader in the User Profile Service Application.
For additional information about SPProfileLeader cmdlets, see the *-SPProfileLeader Windows PowerShell
cmdlets in SharePoint Server https://go.microsoft.com/fwlink/p/?LinkId=226295.
After you use the Add-SPProfileLeader cmdlet to add a company leader, you have to complete a full crawl of your
content sources for the changes to take effect.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
---------EXAMPLE------------

C:\PS>$upaProxy = Get-SPServiceApplicationProxy | where {$_.TypeName -eq 'User Profile Service Application


Proxy'}
C:\PS>Add-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy -Name "contoso\janedoe"

This example adds a company leader named Jane Doe.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the account name to be added as a leader for the new User Profile Service application. For example,
contoso\janedoe.

Type: SPProfileLeaderPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the name of the User Profile Service Application Proxy to use.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run. This parameter is mandatory in a hosted-environment
and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPProfileSyncConnection
In ths Article

Adds a synchronization connection.

Syntax
Add-SPProfileSyncConnection [-ProfileServiceApplication] <SPServiceApplicationPipeBind>
-ConnectionDomain <String> -ConnectionForestName <String> -ConnectionPassword <SecureString>
-ConnectionSynchronizationOU <String> -ConnectionUserName <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-ConnectionClaimIDMapAttribute <String>]
[-ConnectionClaimProviderIdValue <String>] [-ConnectionClaimProviderTypeValue <String>]
[-ConnectionNamingContext <String>] [-ConnectionPort <Int32>] [-ConnectionServerName <String>]
[-ConnectionUseSSL <Boolean>] [-WhatIf] [-ConnectionFilterOutUnlicensed <Boolean>]
[-ConnectionUseDisabledFilter <Boolean>] [<CommonParameters>]

Description
This cmdlet was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).
Use the Add-SPProfileSyncConnection cmdlet to add a User Profile synchronization connection.
For additional information about profile synchronization connections, see
This cmdlet only works with Active Directory Synchronization Connections
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------EXAMPLE-----------

Add-SPProfileSyncConnection -ProfileServiceApplication 888ds256-9ad9-53a9-f135-99eecd245670b -


ConnectionForestName "fabrikam.com"-ConnectionDomain "Fabrikam" -ConnectionUserName "Testupa" -
ConnectionPassword convertto-securestring "Password1" -asplaintext -force -ConnectionSynchronizationOU
"OU=SharePoint Users,DC=fabrikam,DC=com"

This example adds a user from the fabrikam domain using a specific user profile service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionClaimIDMapAttribute
Specifies the Claims ID used by the Claim Provider, that is, samAccountName.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionClaimProviderIdValue
Specifies the Claims Provider ID or Name for an authentication type while a Web App is configured.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionClaimProviderTypeValue
Specifies the Authentication claim Provider that will be used to encode the User Profile accounts names. For
example, Windows/Forms etc. This means if a user logs in using the given Authentication Type, then a profile can
be found by looking up a claim encoded credentials.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionDomain
Specifies the NetBIOS name of the domain you are connecting to.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionFilterOutUnlicensed
Do not use.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionForestName
Specifies the fully qualified domain name (FQDN ) of the forest you are connecting to.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionNamingContext
Specifies the naming context of the directory information tree to connect to.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionPassword
Specifies the password of the account used for directory connection.
Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionPort
Specifies the port to be used to connect to the directory service. The default port is 389.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionServerName
Specifies the name of the domain controller to connect to.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionSynchronizationOU
Specifies the top level organizational unit (OU ) that you would like to synchronize. The value must be a domain
name and you can only include one container per command.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionUseDisabledFilter
Filters out disabled accounts.

NOTE

This will only filter out accounts which are in a disabled state prior to being imported. It will not filter out accounts
which have been disabled after importing.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionUserName
Specifies the user name to be used for the synchronization connection.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionUseSSL
Specifies if the connection to the directory service must be over SSL.
The valid values are: $True or $False

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileServiceApplication
Specifies the name of the User Profile service application.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPRoutingMachineInfo
In ths Article

Adds a new routing target to the farm.

Syntax
Add-SPRoutingMachineInfo [-RequestManagementSettings] <SPRequestManagementSettingsPipeBind> [-Name] <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Availability <SPRoutingMachineAvailability>]
[-OutgoingPort <Int32>] [-OutgoingScheme <SPRoutingOutgoingScheme>] [-StaticWeight <Double>]
[<CommonParameters>]

Description
Use the Add-SPRoutingMachineInfo cmdlet to add a new routing target to the farm by using the
RequestManagementSettings and Name parameters.

Examples
-------------EXAMPLE--------------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

C:\PS>Add-SPRoutingMachineInfo -RequestManagementSettings $rm -Name -Availability Available

C:\PS>

This example adds a routing target for a specified identity to the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Availability
Specifies whether or not the added computer will be available for routing.
The valid values are:
--Available --Unavailable

Type: SPRoutingMachineAvailability
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the computer to add to the route.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OutgoingPort
Specifies the port used by Request Manager to make an outgoing connection.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutgoingScheme
Determines the Http scheme of outgoing connections.
The valid values are:
--SameAsIncoming --Http --Https

Type: SPRoutingOutgoingScheme
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RequestManagementSettings
Specifies the name of the request management settings object to add to the routing target.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-StaticWeight
Specifies the static weight of a computer routing that is used by Request Manager. If the static weight is higher,
more requests will be routed to the computer.

Type: Double
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPRoutingMachineInfo
Remove-SPRoutingMachineInfo
Set-SPRoutingMachineInfo
minutes to read • Edit Online

Add-SPRoutingMachinePool
In ths Article

Adds a new machine pool.

Syntax
Add-SPRoutingMachinePool [-RequestManagementSettings] <SPRequestManagementSettingsPipeBind> [-Name] <String>
[-AssignmentCollection <SPAssignmentCollection>] [-MachineTargets <SPRoutingRuleTargetPipeBind[]>]
[<CommonParameters>]

Description
Use the Add-SPRoutingMachinePool cmdlet to add a machine pool by using the RequestManagementSettings and
Name parameters.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------EXAMPLE--------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

C:\PS>Add-SPRoutingMachinePool -RequestManagementSettings $rm -Name

This example adds a machine pool.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MachineTargets
Specifies the routing targets collection that the machine pool will contain.

Type: SPRoutingRuleTargetPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of machine pool.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestManagementSettings
Specifies the name of the request management settings object to add to the routing machine pool.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-SPRoutingMachinePool
Remove-SPRoutingMachinePool
Set-SPRoutingMachinePool
minutes to read • Edit Online

Add-SPRoutingRule
In ths Article

Adds a routing rule.

Syntax
Add-SPRoutingRule [-RequestManagementSettings] <SPRequestManagementSettingsPipeBind> [-Name] <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Criteria <SPRequestManagementRuleCriteriaPipeBind[]>]
[-ExecutionGroup <Int32>] [-Expiration <DateTime>] [-MachinePool <SPRoutingMachinePoolPipeBind>]
[<CommonParameters>]

Description
The Add-SPRoutingRule cmdlet adds a routing rule for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE--------

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

C:\PS>Get-SPRoutingRule -RequestManagementSettings $rm

C:\PS>$machines=Get-SPRoutingMachineInfo -RequestManagementSettings $rm

C:\PS>Add-SPRoutingMachinePool -RequestManagementSettings $rm -Name -MachineTargets $machines

This examples adds a routing rule to the farm by using the $rm and $machines variables.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Criteria
Specifies the criteria for the rule to match.

Type: SPRequestManagementRuleCriteriaPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExecutionGroup
Specifies the group in which the rule will be placed.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expiration
Specifies the expiration date and time of the rule.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MachinePool
Specifies the pool of machines to which a request will be routed if the created rule is matched.

Type: SPRoutingMachinePoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the rule.
Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestManagementSettings
Specifies the name of the request management settings object to add to the routing rule.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-SPRoutingRule
Remove-SPRoutingRule
Set-SPRoutingRule
minutes to read • Edit Online

Add-SPScaleOutDatabase
In ths Article

Adds an existing scale-out database to the specified service application.

Syntax
Add-SPScaleOutDatabase -DatabaseName <String> -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseCredentials <PSCredential>]
[-DatabaseFailoverServer <String>] [-DatabaseServer <String>] [-WhatIf] [-DeferUpgradeActions]
[<CommonParameters>]

Description
Use the Add-SPScaleOutDatabase cmdlet to add an existing scale-out database to the specified service application
by using the ServiceApplication parameter or creates a new scale-out database and adds it to the specified service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE------------

C:\PS>$serviceApplication = Get-SPServiceApplication -Name "AppManagement"

C:\PS>Add-SPScaleOutDatabase -ServiceApplication $serviceApplication

This example adds a new or existing scale out database into a specific service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the owner's credentials of the scale-out database to be added to the service application.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseFailoverServer
The name of the failover server for the scale-out database to be added.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database to add to the specified service application.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
The name of the server hosting the scale-out database to be added. If a value is not provided, the default database
server will be used.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
{{Fill DeferUpgradeActions Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application of the scale-out databases.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPScaleOutDatabase
Remove-SPScaleOutDatabase
Split-SPScaleOutDatabase
minutes to read • Edit Online

Add-SPSecureStoreSystemAccount
In ths Article

Adds an account to a designated list.

Syntax
Add-SPSecureStoreSystemAccount [-AccountName] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Add-SPSecureStoreSystemAccount cmdlet to add a user to a list that of accounts which will be considered
a system account.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE----------

C:\PS>Add-SPSecureStoreSystemAccount -AccountName contoso\jdoe

This example adds the account name jdoe.

Parameters
-AccountName
Specifies the account name to add.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPSecureStoreSystemAccount
Remove-SPSecureStoreSystemAccount
minutes to read • Edit Online

Add-SPServerScaleOutDatabase
In ths Article

Adds an existing scale-out content database to the specified service application.

Syntax
Add-SPServerScaleOutDatabase -DatabaseName <String> -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseCredentials <PSCredential>]
[-DatabaseFailoverServer <String>] [-DatabaseServer <String>] [-WhatIf] [-DeferUpgradeActions]
[<CommonParameters>]

Description
Use the Add-SPServerScaleOutDatabase cmdlet to add an existing scale-out database to the specified service
application by using the ServiceApplication parameter or creates a new scale-out database and adds it to the
specified service application.

Examples
-------------EXAMPLE------------

$serviceApplication = Get-SPServiceApplication -Name "AppManagement"


Add-SPServerScaleOutDatabase -ServiceApplication $serviceApplication

This example adds a new or existing scale out database into a specific service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the owner's credentials of the scale-out database to be added to the service application.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseFailoverServer
The name of the failover server for the scale-out database to be added.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database to add to the specified service application.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
The name of the server hosting the scale-out database to be added. If a value is not provided, the default database
server will be used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
Specifies whether upgrade actions are deferred duringi an Upgrade process.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application of the scale-out databases.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Get-SPServerScaleOutDatabase
Remove-SPServerScaleOutDatabase
Split-SPServerScaleOutDatabase
minutes to read • Edit Online

Add-SPServiceApplicationProxyGroupMember
In ths Article

Adds a member to the service application proxy group.

Syntax
Add-SPServiceApplicationProxyGroupMember [-Identity] <SPServiceApplicationProxyGroupPipeBind>
[-Member] <SPServiceApplicationProxyPipeBind[]> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
The Add-SPServiceApplicationProxyGroupMember cmdlet adds a member to the service application proxy group.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -match 'User Profile Service Application Proxy'}


Add-SPServiceApplicationProxyGroupMember RemoteProxyGroup -Member $proxy

This example adds a select service application proxy to the service application proxy group named
RemoteProxyGroup.
The service application proxy group GUID is unique to every farm. You can run Get-
SPServiceApplicationProxyGroup | Select Name,Id to see the GUID of the serviceapplication proxy groups. Use
this result for any other SPServiceApplicationProxyGroup cmdlets.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the service application proxy group to which to add the member.

Type: SPServiceApplicationProxyGroupPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Member
Specifies an array of members to add to the service application proxy group.

Type: SPServiceApplicationProxyPipeBind[]
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPShellAdmin
In ths Article

Adds a user to the SharePoint_Shell_Access role for the specified database.

Syntax
Add-SPShellAdmin [-UserName] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-database <SPDatabasePipeBind>] [-WhatIf] [<CommonParameters>]

Description
When you run this cmdlet to add a user to the SharePoint_Shell_Access role, you must have membership in the
securityadmin fixed server role on the SQL Server instance, membership in the db_owner fixed database role on all
affected databases, and local administrative permission on the local computer.
This cmdlet is intended only to be used with a database that uses Windows authentication. There is no need to use
this cmdlet for databases that use SQL authentication; in fact, doing so may result in an error message.
Use the Add-SPShellAdmin cmdlet to add a user to the SharePoint_Shell_Access role as follows:
--If you specify only the user, the user is added to the role for the farm configuration database.
--If you use the database parameter, the user is added to the role on the farm configuration database, the Central
Administration content database, and the specified database. Using the database parameter is the preferred
method because most of the administrative operations require access to the Central Administration content
database.
The user is added to the WSS_Admin_WPG group on all Web servers when the user is added to the
SharePoint_Shell_Access role. If the target database does not have a SharePoint_Shell_Access role, the role is
automatically created.
In order to use Windows PowerShell for SharePoint Products, a user must be a member of the
SharePoint_Shell_Access role on the configuration database and a member of the WSS_ADMIN_WPG local group
on the computer where SharePoint Products is installed.
However, the result of running this cmdlet is that the user specified with the UserName parameter will have the
SPDataAccess role, if it exists, or db_owner role, if the SPDataAccess role does not exist, on the affected databases
as described above. Therefore, you should carefully plan which users are given this access.
Therefore, you should carefully plan which users are given this access.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
-------------------EXAMPLE 1-------------------------
Add-SPShellAdmin -UserName CONTOSO\User1

This example adds a new user named User1 to the SharePoint_Shell_Access role in the farm configuration
database only, and also ensures the user is added to the WSS_Admin_WPG local group on each server in the farm.
-------------------EXAMPLE 2-------------------------

Add-SPShellAdmin -UserName CONTOSO\User1 -database 4251d855-3c15-4501-8dd1-98f960359fa6

This example adds a new user named User1 to the SharePoint_Shell_Access role in both the specified content
database and the configuration database by passing a database GUID to the cmdlet.
-------------------EXAMPLE 3-------------------------

Get-SPDatabase | Where-Object {$_.WebApplication -like "SPAdministrationWebApplication"} | Add-SPShellAdmin


CONTOSO\User1

This example adds a new user named User1 to the SharePoint_Shell_Access role in both the specified Central
Administration content database and the configuration database.
-------------------EXAMPLE 4-------------------------

Get-SPDatabase | ?{$_.Name -eq "WSS_Content"} | Add-SPShellAdmin -Username CONTOSO\User1

This example adds a new user named User1 to the SharePoint_Shell_Access role of both the specified content
database and the configuration database by passing the name of the database to the cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-database
Specifies the GUID of the database or the Database object that includes the SharePoint_Shell_Access role to which
you want to add the user. If the database parameter is not specified, the configuration database is used. The farm
configuration database is always included, even if you specify another database.

Type: SPDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UserName
Specifies the name of the user to add to the SharePoint_Shell_Access role in the target database.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPSiteSubscriptionFeaturePackMember
In ths Article

Adds a feature to a SharePoint Feature set.

Syntax
Add-SPSiteSubscriptionFeaturePackMember [-Identity] <SPSiteSubscriptionFeaturePackPipeBind>
-FeatureDefinition <SPFeatureDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
The Add-SPSiteSubscriptionFeaturePackMember cmdlet adds features to the provided SharePoint Feature set.
Feature sets are an Allow List of SharePoint Features that can be associated with any site subscription. If a Feature
set is assigned to a site subscription, only the SPFeatures object in that Feature set are available for use on the site
collections and Web sites that are members of the site subscription. Feature sets contain a list of the GUIDs of each
Feature that are on the Allow List for associated site subscriptions.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE----------------

$fp = New-SPSiteSubscriptionFeaturePack
Get-SPFeature -limit all | Where{ $_.Scope -eq "WEB" } | Add-SPSiteSubscriptionFeaturePackMember -id $fp
$fp = Get-SPSiteSubscriptionFeaturePack $fp

This example creates a Feature set and adds all Web site scoped Features to the set.
The Feature set is refreshed in the last line so that the local object has the correct values.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FeatureDefinition
Specifies the Feature definition, name, or GUID to add to the Feature set.

Type: SPFeatureDefinitionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the Feature set object or GUID to which the given SharePoint Feature is added.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a
Feature set (for example, FeatureSet1); or an instance of a valid SPFeatureSet object.

Type: SPSiteSubscriptionFeaturePackPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPSiteSubscriptionProfileConfig
In ths Article

Adds a new site subscription to a User Profile Service application.

Syntax
Add-SPSiteSubscriptionProfileConfig [-Identity] <SPSiteSubscriptionPipeBind>
[-MySiteHostLocation <SPSitePipeBind>] -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-SynchronizationOU <String>] [-WhatIf]
[<CommonParameters>]

Add-SPSiteSubscriptionProfileConfig [-Identity] <SPSiteSubscriptionPipeBind>


-MySiteHostLocation <SPSitePipeBind> -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-MySiteManagedPath <SPPrefixPipeBind>]
[-SiteNamingConflictResolution <String>] [-SynchronizationOU <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Add-SPSiteSubscriptionProfileConfig cmdlet adds a new site subscription to a User Profile Service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE------------------

$sub = Get-SPSiteSubscription https://contoso/my


$proxy = Get-SPServiceApplicationProxy | ? {$_.TypeName -eq 'User Profile Service Application Proxy'}
Add-SPSiteSubscriptionProfileConfig -Identity $sub -ProfileServiceApplicationProxy $proxy -MySiteHostLocation
https://contoso/my
$sub = New-SPSiteSubscription

This example creates a new User Profile Service application tenant.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the proxy of the User Profile Service application to add the site subscription to.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a User
Profile Service application proxy (for example, UserProfileSvcProxy1); or an instance of a valid
SPServiceApplicationProxy object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteHostLocation
Specifies the site collection where the My Site host for the site subscription is provisioned.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid URL, in the
form https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteManagedPath
Specifies the managed path where personal sites will be created.
The type must be a valid URL, in the form https://server_name.

Type: SPPrefixPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the identifier for the User Profile Service Application proxy where the tenant is to be created.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteNamingConflictResolution
Specifies the format to use to name personal sites.
Use one of the following integer values:
1 Personal site collections are to be named based on user names without any conflict resolution. For example,
https://portal_site/location/username/
2 Personal site collections are to be based on user names with conflict resolution by using domain names. For
example, .../username/ or .../domain_username/
3 Personal site collections are to be named by using domain and user name always, to avoid any conflicts. For
example, https://portal_site/location/domain_username/
The default value is 1 (do not resolve conflicts).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SynchronizationOU
Specifies the organizational unit serving the site subscription.
The type must be a valid name of an organizational unit; for example, OrgUnit1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPSolution
In ths Article

Uploads a SharePoint solution package to the farm.

Syntax
Add-SPSolution [-LiteralPath] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Language <UInt32>] [-WhatIf] [<CommonParameters>]

Description
The Add-SPSolution cmdlet adds a SharePoint solution package to the farm. This cmdlet does not deploy the
uploaded SharePoint solution. Use the Install-SPSolution cmdlet to deploy the SharePoint solution in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Add-SPSolution -LiteralPath c:\contoso_solution.wsp

This example adds the SharePoint solution in the file contoso_solution.wsp to the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Language
Specifies the language pack to install with the solution package.
The type must be a valid language identifier; for example, 1033.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LiteralPath
Specifies the path to the solution package.
The type must be a valid path in either of the following forms:
C:\folder_name
\\server_name\folder_name

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Add-SPThrottlingRule
In ths Article

Adds a new throttling rule.

Syntax
Add-SPThrottlingRule [-RequestManagementSettings] <SPRequestManagementSettingsPipeBind> [-Name] <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Criteria <SPRequestManagementRuleCriteriaPipeBind[]>]
[-Expiration <DateTime>] [-Threshold <Int32>] [<CommonParameters>]

Description
The Add-SPThrottlingRule cmdlet adds a new throttling rule for the farm by using the Name and
RequestManagementSettings parameters.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE---------

$web=Get-SPWebApplication -Identity
$rm=Get-SPRequestManagementSettings -Identity $web
$c=New-SPRequestManagementRuleCriteria -Value http -Property url -MatchType startswith -CaseSensitive $false
Add-SPThrottlingRule -RequestManagementSettings $rm -Name -Criteria $c -Threshold 4

This example adds a throttling rule for a specified identity by using the $rm and $c variables.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Criteria
Specifies the criteria for the rule to match.

Type: SPRequestManagementRuleCriteriaPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expiration
Specifies the expiration date and time of the rule.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the throttling rule.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestManagementSettings
Specifies the name of the request management settings object to add.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Threshold
Specifies a value between 0 and 10 which defines the maximum threshold for throttling. The Request Manager will
remove routing targets if their Health-Score becomes greater than this value.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPThrottlingRule
Remove-SPThrottlingRule
Set-SPThrottlingRule
minutes to read • Edit Online

Add-SPUserLicenseMapping
In ths Article

Maps a security group, forms-based role, or claim to a SharePoint user license.

Syntax
Add-SPUserLicenseMapping
-Mapping <System.Collections.Generic.List`1[Microsoft.SharePoint.PowerShell.SPUserLicenseMapping]>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Add-SPUserLicenseMapping cmdlet maps a claim, Active Directory Domain Services (AD DS ) security group,
or forms-based role to a SharePoint user license for a farm or web application. To specify a mapping to a specific
web application, use the WebApplication parameter. If you do not specify parameters, mapping applies to the entire
SharePoint farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1-------------------

$a = New-SPUserLicenseMapping -SecurityGroup yoursecuritygroup -License Enterprise


Add-SPUserLicenseMapping -Mapping $a

This example adds user mappings for the entire farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mapping

Type: List<Microsoft.SharePoint.PowerShell.SPUserLicenseMapping>
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Disable-SPUserLicensing
Enable-SPUserLicensing
Get-SPUserLicenseMapping
Remove-SPUserLicenseMapping
minutes to read • Edit Online

Add-SPUserSolution
In ths Article

Uploads a new sandboxed solution to the solution gallery.

Syntax
Add-SPUserSolution [-LiteralPath] <String> -Site <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Add-SPUserSolution cmdlet uploads a new sandboxed solution package to the solution gallery. This cmdlet
does not activate the uploaded sandboxed solution; to activate the solution in the site collection, use the Install-
SPUserSolution cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE---------------------

Add-SPUserSolution -LiteralPath c:\contoso_solution.wsp -Site https://sitename

This example adds the sandboxed solution c:\contoso_solution.wsp to the site https://sitename.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LiteralPath
Specifies the path to the sandboxed solution package.
The type must be a valid path in either of the following forms:
C:\folder_name
\\server_name\folder_name

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Specifies the site collection where the sandboxed solution is to be added.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSiteobject.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Backup-SPConfigurationDatabase
In ths Article

Performs a farm-level configuration-only backup.

Syntax
Backup-SPConfigurationDatabase -Directory <String> [-AssignmentCollection <SPAssignmentCollection>]
[-DatabaseCredentials <PSCredential>] [-DatabaseName <String>] [-DatabaseServer <String>] [-Item <String>]
[<CommonParameters>]

Backup-SPConfigurationDatabase [-AssignmentCollection <SPAssignmentCollection>]


[-DatabaseCredentials <PSCredential>] [-DatabaseName <String>] [-DatabaseServer <String>] [-Item <String>]
[-ShowTree] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Backup-SPConfigurationDatabase cmdlet performs a configuration-only backup of the current farm or a
configuration-only backup of a separate configuration database which is not attached to the current farm. If you
wish to perform a configuration-only backup of the current farm, there is no need to specify the DatabaseServer
and DatabaseName parameters. However, using the Backup-SPFarm cmdlet with the ConfigurationOnly
parameter is recommended for such a scenario.
An example of a configuration backup is an administrator creates a farm configuration template which then can be
applied to other SharePoint farms by performing a restore using the Restore-SPFarm cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
-------------------EXAMPLE 1--------------------

Backup-SPConfigurationDatabase -DatabaseName SharePoint_Config -DatabaseServer SqlServer1 -Directory


\\server\share\Backup -ShowTree

This example displays components that are available for inclusion in a configuration-only backup.
-------------------EXAMPLE 2--------------------
Backup-SPConfigurationDatabase -DatabaseName SharePoint_Config -DatabaseServer SqlServer1 -Directory
\\server\share\Backup -Verbose

This example performs a configuration-only backup with verbose output.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseCredentials
Specifies the ID and password that corresponds to the administrator user name for the SQL Server database.
This parameter should only be specified if SQL authentication is used to connect to the database. If Windows
authentication is used to connect to the database, then this parameter should not be specified.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DatabaseName
Specifies the configuration database name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the SQL database server that contains the configuration database. The default value is the local computer
name.
The type must be a valid database server; for example, DS.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Directory
Specifies the path where SharePoint Products stores the backup package it generates. If you have a computer on
which SQL Server and an instance of SharePoint Products are installed, you can use local drive paths. This includes
a basic installation. However, if SQL Server and SharePoint Products are installed on multiple computers or if you
have multiple servers running SharePoint Products, you must use Universal Naming Convention (UNC ) share
paths so that the SQL Server database and search components are written to the same location; for example,
\\computer_name\volume\Backup).
Multiple backup packages can be stored in the same location. This is the same path that you pass to the Directory
parameter of the Restore-SPFarm cmdlet.
The type must be either of the valid paths:
C:\folder_name
\\server_name\folder_name
The spbr* folders are automatically created.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Item
Indicates the part of the farm to back up. You may use the full farm path notation as displayed by the ShowTree
parameter or the name of the target component in the path if the component has a unique name. If multiple items
match the name, the full path must be provided. Surround the item or path in quotation marks if it contains a
space.
If the Item parameter is not specified, the entire farm configuration is backed up.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowTree
Displays which objects in the farm will be backed up based on the other parameters passed to the backup cmdlet,
namely the Item parameter. Items that will be excluded from the backup based on the other parameters passed to
the Backup-SPConfigurationDatabase cmdlet will be preceded with an asterisk character (*). Items that cannot be
backed up will be enclosed in square brackets ([ ]). A backup will not be performed if the ShowTree parameter is
present.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Backup-SPEnterpriseSearchServiceApplicationIndex
In ths Article

Takes a backup of the search index to a specified backup location.

Syntax
Backup-SPEnterpriseSearchServiceApplicationIndex [-Phase] <Int32>
[-SearchApplication] <SearchServiceApplication> [-BackupFolder] <String> [-BackupHandleFile] <String>
[[-Retries] <Int32>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [-PeerToPeer]
[-SpecifiedBackupHandle <String>] [<CommonParameters>]

Backup-SPEnterpriseSearchServiceApplicationIndex [-SearchApplication] <SearchServiceApplication>


[-BackupHandleFile] <String> [[-Retries] <Int32>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [-Abort] [-PeerToPeer] [-SpecifiedBackupHandle <String>] [<CommonParameters>]

Description
This cmdlet will take a backup of the search index to a specified backup location. The cmdlet has to be run in two
phases. Phase one will take a backup of what is present in the index at the time that the backup cmdlet is run. Phase
two will take a differential backup of what was added to the index after you started the first phase index backup.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Backup-SPEnterpriseSearchServiceApplicationIndex -Phase 1 -SearchApplication $ssa -BackupFolder
"\\backuphost\backupfolder" -BackupHandleFile "\\backuphost\backupfolder\backuphandle.txt" -Retries 3

This example starts a Phase 1 backup of the search index for the default search application, and stores the backup
at the location \\backuphost\backupfolder. The cmdlet stores a handle file backuphandle.txt that is used by the
second phase cmdlet.
------------------EXAMPLE 2------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Backup-SPEnterpriseSearchServiceApplicationIndex -Phase 1 $ssa -BackupFolder "\\backuphost\backupfolder" -
BackupHandleFile "\\backuphost\backupfolder\backuphandle.txt" -Retries 3

This example checks the backup status and progress by re-running the cmdlet for Phase 1.
------------------EXAMPLE 3------------------
$ssa = Get-SPEnterpriseSearchServiceApplication
Backup-SPEnterpriseSearchServiceApplicationIndex -Phase 2 -SearchApplication $ssa -BackupFolder
"\\backuphost\backupfolder" -BackupHandleFile "\\backuphost\backupfolder\backuphandle.txt" -Retries 3

This example starts the Phase 2 of the search index backup by using the same backup location and backup handle
file as used for Phase 1. The Search Service Application must be paused before the second phase can be started.

Parameters
-Abort
{{Fill Abort Description}}

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackupFolder
Full UNC path of the backup files should be written.

Type: String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackupHandleFile
Specifies a file handle for an ongoing backup job.
Type: String
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeerToPeer
{{Fill PeerToPeer Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Phase
Specifies the phase of the backup job.

Type: Int32
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Retries
Number of times to retry if temporary failure occurs.

Type: Int32
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Name of the search service application to be backed up
Type: SearchServiceApplication
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SpecifiedBackupHandle
{{Fill SpecifiedBackupHandle Description}}

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Backup-SPFarm
In ths Article

Creates a backup of an individual database, Web application, or the entire farm.

Syntax
Backup-SPFarm -BackupMethod <String> -Directory <String> [-AssignmentCollection <SPAssignmentCollection>]
[-BackupThreads <Int32>] [-ConfigurationOnly] [-Force] [-Item <String>] [-Percentage <Int32>] [-WhatIf]
[-Confirm] [<CommonParameters>]

Backup-SPFarm [-ShowTree] [-AssignmentCollection <SPAssignmentCollection>] [-ConfigurationOnly]


[-Item <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Backup-SPFarm cmdlet creates a backup for the entire farm or individual components within the farm. It can
also be used to back up just the configuration settings of a farm to be used as a farm template for other SharePoint
farms. If you want to back up a single site collection, use the Backup-SPSite cmdlet.
To see the available objects to backup, use the -ShowTree parameter set.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

Backup-SPFarm -Directory \\file_server\share\Backup -BackupMethod full -ConfigurationOnly

This example backs up the configuration settings of the farm to the \\file_server\share\Backup directory.
--------------------EXAMPLE 2---------------------

Backup-SPFarm -ShowTree -Item "Microsoft SharePoint Foundation Web Application" -Verbose

This example shows which components of the farm would be backed up under the "Microsoft SharePoint
Foundation Web Application" node, but do not actually back them up.
--------------------EXAMPLE 3---------------------
Backup-SPFarm -Directory C:\Backup -BackupMethod full -BackupThreads 10 -Force

This example performs a backup of a farm using 10 threads and forces the backup to be saved to the C:\Backup
directory even though SharePoint estimates that it does not have sufficient space available.
--------------------EXAMPLE 4---------------------

Backup-SPFarm -ShowTree

This example shows you the available objects to backup with Backup-SPFarm .

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackupMethod
Specifies the type of backup file to be created.
If a backup is performed with the -ShowTree parameter, then the BackupMethod parameter is not used.
A full backup is a backup of all the selected data. A differential backup is a backup of all the selected data that has
changed since the last full backup. If an item does not support differential backup, then a full backup is performed
for that item instead.
The type must be either of the following:
Full
Differential

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackupThreads
Specifies the number of threads to be used during the backup. The fewer the threads, the easier the backup log file
is to read and understand. The more the threads, the more components that can be backed up in parallet,
potentially resulting in a faster backup operation. The minimum value is 1 and the maximum value is 10.
The default value is 3.
If a backup is performed with the -ShowTree parameter, then the BackupMethod parameter is not used.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConfigurationOnly
If set, the backup will contain configuration settings only (no data) for each of the objects to be backed up.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Directory
Specifies the path where SharePoint Products stores the backup package it generates. If you have a computer on
which SQL Server and an instance of SharePoint Products are installed, you can use local drive paths. This includes
a basic installation. However, if SQL Server and SharePoint Products are installed on multiple computers or if you
have multiple servers running SharePoint Products, you must use Universal Naming Convention (UNC ) share
paths so that the SQL Server database and search components are written to the same location; for example,
\\computer_name\volume\Backup).
Multiple backup packages can be stored in the same location. This is the same path that you pass to the Directory
parameter of the Restore-SPFarm cmdlet.
The type must be either of the valid paths:
C:\folder_name
\\server_name\folder_name
The spbr* folders are automatically created.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifies to proceed with a backup operation even if the estimation is that the backup directory does not have
sufficient space to hold the entire backup.
If a backup is performed with the ShowTree parameter, then the Force parameter is not used.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Item
Indicates the part of the farm to back up. You might use the full farm path notation as displayed by the ShowTree
parameter or the name of the target component in the path if the component has a unique name. If multiple items
are included in the same match, the full path must be provided. By default, the top node is selected. Surround the
item or path in quotation marks if it contains a space. If this parameter is not specified, the entire farm is backed up.
The type must be a valid item; for example, Farm\Microsoft SharePoint Foundation Web Application\SharePoint -
80.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Percentage
Requests progress updates about the backup operation to be displayed in increments of that percentage; for
example, a value of 5 displays backup progress updates at every 5 percent completed, and a value of 10 displays
backup progress updates at every 10 percent completed. To have progress outputs displayed, you must specify the
Verbose parameter.
This percentage is not precise and the actual progress updates might be lower or higher than requested. Progress
updates are always recorded in the backup log file.
The percentage value is not prcesie and the actual progress updates might be lower or higher than requested.
The default value is 5. For a very large database, 1 is the recommended value.
Valid values are an integer value between 1 and 100.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowTree
Displays which objects in the farm will be backed up based on the other parameters passed to the Backup-SPFarm
cmdelt, namely the Item parameter. Items that will be excluded from the backup based on the other parameters
passed to the Backup-SPFarm cmdlet will be preceded with an asterisk character (*). Items that cannot be backed
up will be enclosed in square brackets ([ ]). A backup will not be performed if the ShowTree parameter is present.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Backup-SPSite
In ths Article

Performs a backup of a site collection.

Syntax
Backup-SPSite [-Identity] <SPSitePipeBind> -Path <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-WhatIf] [-UseABSDocStreamInfo] [<CommonParameters>]

Description
The Backup-SPSite cmdlet performs a backup of the site collection when the Identity parameter is used.
By default, the site collection will be set to read-only for the duration of the backup to reduce the potential for user
activity during the backup operation to corrupt the backup. If you have SQL Server Enterprise Edition, we
recommend that UseSqlSnapshot parameter be used because this ensures a valid backup while it allows users to
continue reading and writing to the site collection during the backup.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE 1--------------------

Backup-SPSite https://server_name/sites/site_name -Path C:\Backup\site_name.bak

This example backs up a site collection at https://server_name/sites/site_name to the C:\Backup\site_name.bak file.


-------------------EXAMPLE 2--------------------

Get-SPSiteAdministration https://server_name/sites/site_name | Backup-SPSite -Path C:\Backup\site_name.bak

This example backs up a site collection at https://server_name/sites/site_name to the C:\Backup\site_name.bak file.


Same result as Example 1, but a different way of performing the operation.
-------------------EXAMPLE 3--------------------

Backup-SPSite https://server_name/sites/site_name -Path C:\Backup\site_name.bak -UseSqlSnapshot

This example backs up a site collection using database snapshots to ensure backup integrity.
-------------------EXAMPLE 4--------------------
Backup-SPSite https://server_name/sites/site_name -Path C:\Backup\site_name.bak -NoSiteLock

This example backs up a site collection and prevents placing the site into a read only mode during the backup
phase. Use the -NoSiteLock parameter when backing up a site in production where it is desirable to not place the
site into a read only mode while the backup takes place.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specify to overwrite an existing backup file if it already exists.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the site collection to be backed up.
For example, a valid URL, such as https://server_name/sites/site_name or a GUID such as, "01234567-89ab-cdef-
0123-456789abcdef"
Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoSiteLock
Specifies the site collection to remain read and write during the backup.
If the NoSiteLock parameter is not specified, then a site collection that has a site collection lock setting of "none" or
"no additions" will be temporarily set to "read only" while the site collection backup is performed. Once the backup
has completed, the site collection lock will return to its original state. The backup package will record the original
site collection lock state so that it is restored to that state.
If users are writing to the site collection while the site collection is being backed up, then the NoSiteLock parameter
is not recommended for potential impact to backup integrity

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the full path to the backup file (that is, C:\Backup\site_name.bak.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseABSDocStreamInfo
Do not use.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseSqlSnapshot
Specifies a SQL Database Snapshot will be created when the backup begins, and all site collection data will be
retrieved directly from the database snapshot. This snapshot will be deleted automatically when the backup
completes
The UseSqlSnapshot parameter is recommended if the database server hosting your content database supports
database snapshots such as SQL Server Enterprise Edition and SQL Server Developer Edition. This is because it
will ensure a valid backup while allowing users to continue reading and writing to the site collection during the
backup. It is not necessary to specify the NoSiteLock parameter when specifying the UseSqlSnapshot parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Clear-FASTSearchContentCollection
In ths Article

Clears the content of a Microsoft FAST Search Server 2010 for SharePoint content collection.

Syntax
Clear-FASTSearchContentCollection [-Name] <String> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes from the index all items that are associated with the specified collection without removing the
collection.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>Clear-FASTSearchContentCollection -Name newscollection

This example clears the content of the "newscollection" content collection.


---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

C:\PS>Clear-FASTSearchContentCollection -Name newscollection -Force

This example clears the content of the "newscollection" content collection. The user does not have to confirm the
operation.

Parameters
-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated.
If Confirm is false (-Confirm:$false), you will not be prompted.
In cases where Confirm is not specified, the cmdlet will prompt if the $ConfirmPreference shell variable is equal to
or greater than the ConfirmImpact setting of the cmdlet (HIGH).
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overrides any user prompting settings so the user is not asked to confirm the operation.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the content collection to clear.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchContentCollection
Remove-FASTSearchContentCollection
Get-FASTSearchContentCollection
minutes to read • Edit Online

Clear-SPAppDeniedEndpointList
In ths Article

Remove all app-denied endpoints in the farm.

Syntax
Clear-SPAppDeniedEndpointList [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Clear-SPAppDeniedEndpoint cmdlet to remove all app-denied endpoints in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE---------

Clear-SPAppDeniedEndpoint

This example removes all app-denied endpoints from the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Get-SPAppDeniedEndpointList
minutes to read • Edit Online

Clear-SPBusinessDataCatalogEntityNotificationWeb
In ths Article

Clears the entity notification site.

Syntax
Clear-SPBusinessDataCatalogEntityNotificationWeb -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Clear-SPBusinessDataCatalogEntityNotificationWeb cmdlet to clear the entity notification site for the
given service context.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE-----------

Clear-SPBusinessDataCatalogEntityNotificationWeb -ServiceContext "http://contoso"

This example clears the entity notification site for the service context corresponding to the site http://contoso.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the dervice context for which the entity notification web has to be cleared.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPBusinessDataCatalogEntityNotificationWeb
Set-SPBusinessDataCatalogEntityNotificationWeb
minutes to read • Edit Online

Clear-SPContentDatabaseSyncData
In ths Article

Clears synchronization information from the content databases that have not been synchronized since the
mentioned number of days.

Syntax
Clear-SPContentDatabaseSyncData [-DaysSinceLastProfileSync] <Int32>]
[-AssignmentCollection <SPAssignmentCollection>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
Use the Clear-SPContentDatabaseSyncData to clear synchronization information from the content databases
that has not been synchronized since the mentioned number of days, which can be passed as a parameter.

Examples
EXAMPLE 1

Clear-SPContentDatabaseSyncData -DaysSinceLastProfileSync 12

This example resets synchronization information from the content databases that have not been synchronized for
more than or equal to 12 days, without prompting for user confirmation.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DaysSinceLastProfileSync
Specifies the least number of days by which the databases are old.
The default value of this parameter is 0.

Type: Int32
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Clear-SPDistributedCacheItem
In ths Article

Clears cached items from the distributed cache server.

Syntax
Clear-SPDistributedCacheItem [-ContainerType] <SPDistributedCacheContainerType>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Clear-SPDistributedCacheItems cmdlet to clear cached items from the distributed cache server.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE------

Clear-SPDistributedCacheItem -ContainerType DistributedLogonTokenCache

This example removes all the cache items for distributed token cache.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainerType
Specifies the container type to clear.
The valid values for SharePoint Server 2013 and SharePoint Server 2016 are the following:
DistributedDefaultCache, DistributedAccessCache, DistributedActivityFeedCache, DistributedBouncerCache,
DistributedLogonTokenCache, DistributedServerToAppServerAccessTokenCache, DistributedSearchCache,
DistributedSecurityTrimmingCache, DistributedActivityFeedLMTCache, DistributedViewStateCache
Additional valid values for SharePoint Server 2016 are the following:
DistributedSharedWithUserCache, DistributedUnifiedGroupsCache, DistributedFileLockThrottlerCache,
DistributedResourceTallyCache, DistributedHealthScoreCache, DistributedClientSideAppUpdateTimeCache

Type: SPDistributedCacheContainerType
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Clear-SPLogLevel
In ths Article

Resets the Windows event logging and trace logging to their default values.

Syntax
Clear-SPLogLevel [-AssignmentCollection <SPAssignmentCollection>] [-Identity <String[]>]
[-InputObject <PSObject>] [<CommonParameters>]

Description
The Clear-SPLogLevel cmdlet resets the Windows event logging and trace logging levels for the specified
categories to the default values. If the Identity parameter is not provided, all categories are affected.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Clear-SPLogLevel -Identity Cat1

This example resets the log levels for a single category.


--------------EXAMPLE 2-----------------

"Cat1", "Cat2", "Cat3" | Clear-SPLogLevel

This example resets the log levels for multiple categories.


--------------EXAMPLE 3-----------------

Get-SPLogLevel | Clear-SPLogLevel

This example resets the log levels for all categories.


--------------EXAMPLE 4-----------------

Clear-SPLogLevel -Identity "SharePoint Server:Database"

This example resets the log level for the specific category in the SharePoint Server area only. This is useful when
more than one area uses the same named category.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the name(s) of the category or set of categories to set the throttle for; for example, "Unified Logging
Service". If the Identity parameter is not specified, the event throttling setting is applied to all categories in the farm.
Providing an invalid category is a non-terminating error and will be ignored.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
Specifies the result of the InputObject parameter to be piped. The value can be a string in a format identical to the
Identity parameter, or can be an SPDiagnosticsCategory object. The user can retrieve one or more categories from
the Get-SPLogLevel cmdlet, modify their values, and then pipe the results to the Set-SPLogLevel cmdlet.

Type: PSObject
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Clear-SPMetadataWebServicePartitionData
In ths Article

Removes all data for a site subscription on a metadata Web service application.

Syntax
Clear-SPMetadataWebServicePartitionData [-Identity] <SPSiteSubscriptionPipeBind>
[-ServiceProxy] <SPMetadataServiceProxyCmdletPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-FromContentDatabase <SPContentDatabasePipeBind>] [-FromServiceDatabase] [<CommonParameters>]

Clear-SPMetadataWebServicePartitionData [-ServiceProxy] <SPMetadataServiceProxyCmdletPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] -ServiceContext <SPServiceContextPipeBind>
[-FromContentDatabase <SPContentDatabasePipeBind>] [-FromServiceDatabase] [<CommonParameters>]

Description
Use the Clear-SPMetadataWebServicePartitionData cmdlet to clear all data for a site subscription on a metadata
Web service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE---------------

Clear-SPMetadataWebServicePartitionData -Identity $siteSubscriptionPipeBind1 -ServiceProxy


"MetadataServiceProxy2"

This example removes data for a site subscription on a Metadata Service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-FromContentDatabase
{{Fill FromContentDatabase Description}}

Type: SPContentDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FromServiceDatabase
{{Fill FromServiceDatabase Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the site subscription configuration to remove.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site
subscription (for example, SiteSubscriptionConfig1); or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceContext
{{Fill ServiceContext Description}}

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceProxy
Specifies the service proxy for the service application that contains the site subscription.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of the
service application proxy (for example, ServiceAppProxy1); or an instance of a valid SPMetadataServiceProxy
object.

Type: SPMetadataServiceProxyCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Clear-SPPerformancePointServiceApplicationTrustedLocation
In ths Article

Clears all the trusted locations for a PerformancePoint Service application identity.

Syntax
Clear-SPPerformancePointServiceApplicationTrustedLocation
-ServiceApplication <SPPerformancePointMonitoringServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-TrustedLocationType <TrustedFileType>] [-WhatIf]
[<CommonParameters>]

Description
The Clear-SPPerformancePointServiceApplicationTrustedLocation cmdlet removes all the trusted locations for a
PerformancePoint Service application. Use the TrustedLocationType parameter to remove only the trusted
locations for a trusted location type.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Clear-SPPerformancePointServiceApplicationTrustedLocation -ServiceApplication My_Service_Application

This example removes trusted locations from the Service application named, My_Service_Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the PerformancePoint Service application that contains the trusted locations.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
PerformancePoint Service application (for example, PerfPointApp1); or an instance of a valid
SPPerformancePointMonitoringServiceApplication object.

Type: SPPerformancePointMonitoringServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TrustedLocationType
Specifies the type of trusted locations to clear. If the TrustedLocationType parameter is not specified, this cmdlet
clears all the trusted locations for the specified PerformancePoint Service application.
The type must be one of the following: content, data source.

Type: TrustedFileType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Clear-SPScaleOutDatabaseDeletedDataSubRange
In ths Article

Clears all partitions inside the specified deleted subrange.

Syntax
Clear-SPScaleOutDatabaseDeletedDataSubRange -Database <SPDatabasePipeBind> -IsUpperSubRange <Boolean>
-Range <SPScaleOutDataRange> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Clear-SPScaleOutDatabaseDeletedDataSubRange cmdlet to clear all partitions inside the specified deleted
subrange that are contained within a specified scale-out database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE--------------

$databases = Get-SPScaleOutDatabase -ServiceApplication $serviceApplication


$database = $databases[0]
$state = Get-SPScaleOutDatabaseDataState -Database $database
Set-SPScaleOutDatabaseDataSubRange -Database $database -Range $state.Range -SubRangePoint $state.Range.RangeEnd
-SubRangeMode Deleted -IsUpperSubRange $false
$state = Get-SPScaleOutDatabaseDataState -Database $database
Clear-SPScaleOutDatabaseDeletedDataSubRange -Database $database -Range $state.Range -IsUpperSubRange $false

This example creates a deleted subrange that starts from the data range start point and ends at the data range end
point on the first scale-out database of the specified service application. The example then clears that subrange and
all data in the partitions in the subrange.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database to clear the deleted subrange from.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsUpperSubRange
Specifies whether the subrange with deleted mode is on the upper or lower side of the data range.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Range
Specifies the expected data range of the scale-out database.

Type: SPScaleOutDataRange
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPScaleOutDatabaseDataSubRange
minutes to read • Edit Online

Clear-SPScaleOutDatabaseLog
In ths Article

Clears all scale-out logs.

Syntax
Clear-SPScaleOutDatabaseLog -Database <SPDatabasePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-LogEntryTimeout <Int32>] [-WhatIf] [<CommonParameters>]

Description
Use the Clear-SPScaleOutDatabaseLog cmdlet clears all scale-out logs in the specified scale-out database unless
there is a scale-out log entry newer than the specified time-out value.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE-------

$databases = Get-SPScaleOutDatabase -ServiceApplication $serviceApplication


$database = $databases[0]
Clear-SPScaleOutDatabaseLog -Database $database -LogEntryTimeout 30

This example removes all scale-out log entries in the first scale-out database of the specified service application
unless there is a scale-out log entry which is more recent than 30 minutes.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database from which to clear the logs.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LogEntryTimeout
Specifies the time-out value in minutes for the log entries. If there is at least one log entry which is more recent
than this value, no log entries will be deleted.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Clear-SPScaleOutDatabaseTenantData
In ths Article

Removes all data related to the specified site subscription.

Syntax
Clear-SPScaleOutDatabaseTenantData -ServiceApplication <SPServiceApplicationPipeBind>
-SiteSubscriptionId <Guid> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Clear-SPScaleOutDatabaseTenantData cmdlet removes all data related to the specified site subscription
from the specified service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE---------

Clear-SPScaleOutDatabaseTenantData -ServiceApplication $serviceApplication -SiteSubscriptionId "5CAF2F99-A75F-


4239-B9CD-7FE63D1CE904"

This example clears all data related to the site subscription with id 5CAF2F99-A75F -4239-B9CD -7FE63D1CE904
from the specified service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application in which to clear data.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscriptionId
Specifies the site subscription id of the site subscription in which to clear data.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Export-SPScaleOutDatabaseTenantData
Import-SPScaleOutDatabaseTenantData
minutes to read • Edit Online

Clear-SPSecureStoreCredentialMapping
In ths Article

Deletes a credential mapping from a Secure Store Service application.

Syntax
Clear-SPSecureStoreCredentialMapping [-All] -Principal <SPClaim> -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Clear-SPSecureStoreCredentialMapping -Identity <SPSecureStoreApplication> -Principal <SPClaim>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Clear-SPSecureStoreCredentialMapping cmdlet deletes a credential mapping from a Secure Store application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssApp = Get-SPSecureStoreApplication -ServiceContext http://contoso -Name "ContosoTargetApplication"


$userClaim = New-SPClaimsPrincipal -Identity "CONTOSO\janedoe" -IdentityType WindowsSamAccountName
Clear-SPSecureStoreCredentialMapping -Identity $ssApp -Principal $userClaim

This example deletes the credential mapping from the target application ContosoTargetApplication for the user
with alias johndoe and domain CONTOSO.

Parameters
-All
Specifies that the principal is deleted from all Secure Store applications.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Secure Store application (that contains the principal) from which to delete the credential mapping.

Type: SPSecureStoreApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Principal
Specifies the SPClaims object that contains the principal.
Type: SPClaim
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context for which the credential mapping will be deleted.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Clear-SPSecureStoreDefaultProvider
In ths Article

Clears the secure store provider.

Syntax
Clear-SPSecureStoreDefaultProvider [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Clear-SPSecureStoreDefaultProvider cmdlet clears the secure store provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Clear-SPSecureStoreDefaultProvider

This example clears the secure store provider.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Clear-SPServerScaleOutDatabaseDeletedDataSubRange
In ths Article

Clears all partitions inside the specified deleted subrange.

Syntax
Clear-SPServerScaleOutDatabaseDeletedDataSubRange -Database <SPDatabasePipeBind> -IsUpperSubRange <Boolean>
-Range <SPScaleOutDataRange> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Clear-SPServerScaleOutDatabaseDeletedDataSubRange cmdlet to clear all partitions inside the specified
deleted subrange that are contained within a specified scale-out database.

Examples
--------------EXAMPLE--------------

$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication


$database = $databases[0]
$state = Get-SPServerScaleOutDatabaseDataState -Database $database
Set-SPServerScaleOutDatabaseDataSubRange -Database $database -Range $state.Range -SubRangePoint
$state.Range.RangeEnd -SubRangeMode Deleted -IsUpperSubRange $false
$state = Get-SPServerScaleOutDatabaseDataState -Database $database
Clear-SPServerScaleOutDatabaseDeletedDataSubRange -Database $database -Range $state.Range -IsUpperSubRange
$false

This example creates a deleted subrange that starts from the data range start point and ends at the data range end
point on the first scale-out database of the specified service application. The example then clears that subrange and
all data in the partitions in the subrange.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database to clear the deleted subrange from.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsUpperSubRange
Specifies whether the subrange with deleted mode is on the upper or lower side of the data range.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Range
Specifies the expected data range of the scale-out database.

Type: SPScaleOutDataRange
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Set-SPServerScaleOutDatabaseDataSubRange
minutes to read • Edit Online

Clear-SPServerScaleOutDatabaseLog
In ths Article

Clears all scale-out logs in the specified scale-out database unless there is a scale-out log entry newer than the
specified time-out value.

Syntax
Clear-SPServerScaleOutDatabaseLog -Database <SPDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-LogEntryTimeout <Int32>] [-WhatIf]
[<CommonParameters>]

Description
Use the Clear-SPServerScaleOutDatabaseLog cmdlet clears all scale-out logs in the specified scale-out database
unless there is a scale-out log entry newer than the specified time-out value.

Examples
-----------EXAMPLE-------

$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication


$database = $databases[0]
Clear-SPServerScaleOutDatabaseLog -Database $database -LogEntryTimeout 30

This example removes all scale-out log entries in the first scale-out database of the specified service application
unless there is a scale-out log entry which is more recent than 30 minutes.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database from which to clear the logs.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LogEntryTimeout
Specifies the time-out value in minutes for the log entries. If there is at least one log entry which is more recent
than this value, no log entries will be deleted.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Clear-SPServerScaleOutDatabaseTenantData
In ths Article

Removes all data related to the specified site subscription.

Syntax
Clear-SPServerScaleOutDatabaseTenantData -ServiceApplication <SPServiceApplicationPipeBind>
-SiteSubscriptionId <Guid> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Clear-SPServerScaleOutDatabaseTenantData cmdlet removes all data related to the specified site
subscription from the specified service application.

Examples
------------EXAMPLE---------

Clear-SPServerScaleOutDatabaseTenantData -ServiceApplication $serviceApplication -SiteSubscriptionId "5CAF2F99-


A75F-4239-B9CD-7FE63D1CE904"

This example clears all data related to the site subscription with id 5CAF2F99-A75F -4239-B9CD -7FE63D1CE904
from the specified service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application in which to clear data.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscriptionId
Specifies the site subscription id of the site subscription in which to clear data.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Export-SPServerScaleOutDatabaseTenantData
Import-SPServerScaleOutDatabaseTenantData
minutes to read • Edit Online

Clear-SPSiteSubscriptionBusinessDataCatalogConfig
In ths Article

Deletes all data from the Business Data Connectivity Metadata Store for a specified partition.

Syntax
Clear-SPSiteSubscriptionBusinessDataCatalogConfig -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Clear-SPSiteSubscriptionBusinessDataCatalogConfig cmdlet deletes all models and data from the Business
Data Connectivity Metadata Store for a specified service partition.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Clear-SPSiteSubscriptionBusinessDataCatalogConfig -ServiceContext http://contoso

This example deletes all data from the Business Data Connectivity Metadata Store for the specified site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context for which the Business Data Connectivity models are deleted.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Connect-SPConfigurationDatabase
In ths Article

Connects the local server computer to a farm.

Syntax
Connect-SPConfigurationDatabase [-DatabaseName] <String> [-SkipRegisterAsDistributedCacheHost]
[-Passphrase] <SecureString> -DatabaseServer <String> [-AssignmentCollection <SPAssignmentCollection>]
[-DatabaseCredentials <PSCredential>] [-DatabaseFailOverPartner <String>] [-LocalServerRole <SPServerRole>]
[<CommonParameters>]

Description
The Connect-SPConfigurationDatabase cmdlet connects the current server to the specified configuration database.
Essentially, this cmdlet connects the server to the farm. If the current computer cannot be connected to a farm, the
following error message is displayed:
"This machine is already connected to a SharePoint farm. See: Dismount-SPConfigurationDatabase"
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Connect-SPConfigurationDatabase -DatabaseServer "ServerName\InstanceName" -DatabaseName


"SharePointConfigurationDatabaseName" -Passphrase (ConvertTo-SecureString "MyP@ssw0rd" -AsPlainText -Force)
Start-Service SPTimerv4

This example joins the local server computer to a farm that is configured to use the database
SharePointConfigurationDatabase on an instance of SQL Server by using the name ServerName\InstanceName
with the passphrase MyP@ssw0rd.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL
authentication. If this parameter is not specified, the current user is used.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseFailOverPartner
Specifies the Database Mirroring partner for a SQL Server instance.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the configuration database to which to connect the server.
The type must be a valid database name; for example, DB1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseServer
Specifies the server on which to create the configuration database. The default value is the local computer name.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-LocalServerRole
Specifies the MinRole assigned to the local server.

Type: SPServerRole
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Passphrase
Specifies the secure password phrase for connecting the current server to the configuration database.
The type must be a valid secure string; for example, MyBDCApp1serverkey.

Type: SecureString
Required: True
Position: 9
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-SkipRegisterAsDistributedCacheHost
By default all the servers in the farm are registered as a cache host (that is, DistributedCacheService is running by
default).
Use this parameter to not register the server computer as a distributed cache host. If you want to have a dedicated
cache host, then use this parameter to make sure that caching service is not installed on the computer.

Type: SwitchParameter
Required: False
Position: 10
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Convert-SPWebApplication
In ths Article

Converts the authentication mode of a web application.

Syntax
Convert-SPWebApplication -Identity <SPWebApplicationPipeBind> -From <String> -To <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Force] [-RetainPermissions] [-Database <SPContentDatabase>]
[-MapList <String>] [-SiteSubsriptionId <Guid>] [-SkipPolicies] [-SkipSites]
[-SourceSkipList <String>] [-TrustedProvider <SPTrustedIdentityTokenIssuerPipeBind>]
[-LoggingDirectory <String>] [<CommonParameters>]

Description
Use the Convert-SPWebApplication cmdlet to convert the authentication mode of a Web application to Windows
Claims authentication mode and migrate the user accounts in the content database to claims encoded values.
When retaining permissions, users within Sites are only converted if the source account is enabled and queryable
by SharePoint. For example, if the Active Directory account is deleted or disabled prior to a Classic Windows to
Windows Claims conversion, the account in the database will not be updated to the Claims format.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE 1-------

Convert-SPWebApplication -Identity "https://" -To Claims -RetainPermissions

This example converts a web application specified by the Identity parameter to use the claim authentication mode.
------------EXAMPLE 2-------

Convert-SPWebApplication -Identity "https://" -From Legacy -To Claims -RetainPermissions

This example converts a web application specified by the Identity parameter from Classic Windows authentication
to Claims authentication mode while retaining permissions. The -From parameter is required after security update
MS04-022 or the April 2014 Cumulative Update for SharePoint Server 2013 is applied. This is required for all
versions of SharePoint Server 2016.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Database
Specifies the name of the content database to migrate.

Type: SPContentDatabase
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the conversion of the web application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-From
Specifies the authentication method to convert from.
Valid values for this parameter are as follows.
Legacy, Claims-Windows, Claims-Trusted-Default

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the URL of the web application that you want to convert, for example: https://mysite/app1
Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LoggingDirectory
Specifies a directory where verbose logs about the results of the migration will be written.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapList
Specifies a file containing as list of rows in the following format: user-key, migrated-user-name, migrated-user-key.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RetainPermissions
Specifies the account under which the cmdlet is run and retains the permission in the web application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubsriptionId
Specifies the GUID fo the Site Subscription.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipPolicies
Specifies the SPWebApplication security policies will not be migrated.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipSites
Specifies the SPWebApplication's SPSites will not be migrated.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceSkipList
Specifies a file containing as list of rows in the following format: user-key.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-To
Specifies the authentication method to convert to.
Valid values for this parameter are as follows.
Claims, Claims-Windows, Claims-Trusted-Default, Claims-SharePoint-Online

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TrustedProvider
When you migrate from a trusted login provider this is how you specify which trusted login provider.

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Copy-SPAccessServicesDatabaseCredentials
In ths Article

{{Fill in the Synopsis}}

Syntax
Copy-SPAccessServicesDatabaseCredentials [-AppUrl] <String> [-AssignmentCollection <SPAssignmentCollection>]
-ServerCredential <NetworkCredential> -ServiceContext <SPServiceContextPipeBind> -SourceServer <String>
-TargetServer <String> [<CommonParameters>]

Description
{{Fill in the Description}}

Examples
Example 1

{{ Add example code here }}

{{ Add example description here }}

Parameters
-AppUrl
{{Fill AppUrl Description}}

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServerCredential
{{Fill ServerCredential Description}}

Type: NetworkCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
{{Fill ServiceContext Description}}

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SourceServer
{{Fill SourceServer Description}}

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetServer
{{Fill TargetServer Description}}

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

Copy-SPActivitiesToWorkflowService
In ths Article

Copies the Workflow Activities from SharePoint to Workflow Manager. Activities are defined within Microsoft
provided or custom coded assemblies.

Syntax
Copy-SPActivitiesToWorkflowService [-ActivityName <String>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Credential <ICredentials>] [-Force <Boolean>] [-WhatIf] [-WorkflowServiceAddress <String>]
[<CommonParameters>]

Description
Copies Workflow activities from SharePoint Server to Workflow Manager.

Examples
Example 1

$credential = [System.Net.CredentialCache]::DefaultNetworkCredentials
$site = Get-SPSite
$proxy = Get-SPWorkflowServiceApplicationProxy
$svcAddress = $proxy.GetWorkflowServiceAddress($site)
Copy-SPActivitiesToWorkflowService -WorkflowServiceAddress $svcAddress -Credential $credential -Force $true

Copies the Workflow activities from SharePoint to the Workflow Manager farm using the specified Site Collection
URL as a reference.

Parameters
-ActivityName
Copies a specific ActivityName. If not specified, all Activities are copied.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential
The credential used to connect to Workflow Manager.

Type: ICredentials
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces a specific Activity to be copied to Workflow Manager.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WorkflowServiceAddress
The Workflow Manager farm endpoint URL.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Copy-SPBusinessDataCatalogAclToChildren
In ths Article

Copies a set of permissions of a Business Data Connectivity Metadata Store metadata object to its child objects.

Syntax
Copy-SPBusinessDataCatalogAclToChildren -MetadataObject <MetadataObject>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Copy-SPBusinessDataCatalogAclToChildren cmdlet copies a set of rights of a Business Data Connectivity
metadata object to its child objects.
Any principals and their rights will be lost from the child metadata objects. Make sure that the parent metadata
object has the final permissions you want, or make sure to append them to the child object again after you run this
cmdlet.
Running this cmdlet on a BdcObjectType BdcCatalog (Business Data Connectivity Metadata Store) will propagate
to:
BDC Models
External Systems
External Content Types
Methods
Method Instances
Running this cmdlet on a BdcObjectType Model (Business Data Connectivity Model) will propagate to:
Nothing; this type has no child metadata objects
Running this cmdlet on a BdcObjectType LobSystem (External System) will propagate to:
External Content Types
Methods
Method Instances
Running this cmdlet on a BdcObjectType Entity (External Content Type) will propagate to:
Methods
Method Instances
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ExternalSystem = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "LobSystem" -ServiceContext


https://contoso -Name "ContosoDatabase"

This example looks at the principals (users) and their corresponding rights given for the External System metadata
object, and overwrites the permissions of its child metadata objects with these same principals and rights.
Any principals and their rights will be lost from the child metadata objects. Make sure that the parent metadata
object has the final permissions you want, or make sure to append them to the child object again after you run this
cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MetadataObject
Specifies the Business Data Connectivity metadata object.

Type: MetadataObject
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Copy-SPContentTypes
In ths Article

Specifies content types for replicating from on-premises to SharePoint Online (SPO ) environment.

Syntax
Copy-SPContentTypes [-AssignmentCollection <SPAssignmentCollection>] [-AuthEndpoint <String>]
-ContentTypeNames <String[]> -Credential <PSCredential> [-GraphApiEndPoint <String>] -LocalSiteUrl <Uri>
-LocalTermStoreName <String> -RemoteSiteUrl <Uri> [<CommonParameters>]

Description
This cmdlet is used in hybrid scenarios with SharePoint Online to copy Content Types from an on-premises farm to
SharePoint Online.

Examples
Example 1

Copy-SPContentTypes -LocalSiteUrl https://localsite/ -LocalTermStoreName "managed metadata service application


proxy" -RemoteSiteUrl https://contoso.sharepoint.com/ -ContentTypeNames @("ContentTypeA", "ContentTypeB") -
Credential (Get-Credential)

This example migrates the specified content types named: ContentTypeA, ContentTypeB on the local site
https://localsite/ whose term store named "managed metadata service application proxy" to the hub site of remote
site https://contoso.sharepoint.com/. If the remote site is a hub site, the migration target will be itself.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthEndpoint
Specifies the AuthEndpoint to use, but not the default one.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentTypeNames
Specifies the content type names to be migrated. Can be in a form of an array.

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Credential
Specifies the administrator account credential of the target SharePoint Online site.

Type: PSCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-GraphApiEndPoint
Specifies the GraphApiEndpoint to use, but not the default one.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocalSiteUrl
Specifies the migration source. Can be a local site or a local hubsite.
Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-LocalTermStoreName
Specifies the name of the local term store of the local site.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-RemoteSiteUrl
Specifies the migration target. You can input a remote site url or remote hub site url, both will be processed to be
the hub site url.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.Uri
System.String System.String[] System.Management.Automation.PSCredential
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Copy-SPSideBySideFiles
In ths Article

Copy side by side files.

Syntax
Copy-SPSideBySideFiles [-AssignmentCollection <SPAssignmentCollection>] [-LogFile <String>]
[<CommonParameters>]

Description
In SharePoint Server 2016, zero down time in-place upgrade is available. If the PSConfig.exe file is used during an
upgrade and copy SideBySide files fail, you can use the Copy-SPSideBySideFiles cmdlet to copy SideBySide
files. If you use Microsoft PowerShell scripts instead of PSConfig.exe to perform an upgrade, please run the Copy-
SPSideBySideFiles cmdlet to copy SideBySide files.

Examples
Example 1

Copy-SPSideBySideFiles -LogFile "C:\CopySideBySideFiles.log"

This example copies SideBySide files and writes a log data of the copy process to the CopySideBySideFiles.log file.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-LogFile
Specifies the fully-qualified logfile name of SideBySide copy operation. If LogFile is not specified, the logfile will be
placed in default SharePoint log files folder.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Copy-SPSite
In ths Article

Makes a copy of a site collection.

Syntax
Copy-SPSite [-Identity] <SPSitePipeBind> [-TargetUrl] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-DestinationDatabase <SPContentDatabasePipeBind>] [-HostHeaderWebApplication <String>] [-PreserveSiteId]
[<CommonParameters>]

Description
Use the Copy-SPSite cmdlet to make a copy of a site collection from an implied source content database to a
specified destination content database.
The copy of the site collection has a new URL and a new SiteID. When you have database snapshot capabilities on
a computer runningSQL Server, a temporary snapshot of the source database is created for the duration of the
copy to prevent any data changes during the copy process. If you do not have database snapshot capabilities on the
server running SQL Server, you can back up the source and restore it to the destination to get the same result.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-------------

Copy-SPSite https://contoso/sites/OldTeam -DestinationDatabase WSS_Content -TargetUrl


https://contoso/sites/NewTeam

This example makes a copy of the https://contoso/sites/OldTeam site collection from its database to the
WSS_Content database with the new URL, https://contoso/sites/NewTeam and a new Site ID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DestinationDatabase
Specifies the location where the copy will be sent to.

Type: SPContentDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostHeaderWebApplication
Use when the site collection is a host-named site collection that allows the site to land on the correct web
application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the site collection to copy. This can be a valid URL or GUID.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PreserveSiteId
Specifies if the SiteID is to be saved or not.
The valid values are True and False. The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetUrl
The URL that will be used for the destination copy of the site collection.
Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Test-SPSite
Repair-SPSite
minutes to read • Edit Online

Copy-SPTaxonomyGroups
In ths Article

Copies Managed Metadata Taxonomy Groups from SharePoint on-premises to SharePoint Online.

Syntax
Copy-SPTaxonomyGroups [-AssignmentCollection <SPAssignmentCollection>] [-AuthEndpoint <String>]
-Credential <PSCredential> [-GraphApiEndpoint <String>] -GroupNames <String[]> -LocalSiteUrl <Uri>
-LocalTermStoreName <String> -RemoteSiteUrl <Uri> [<CommonParameters>]

Description
Use the Copy-SPTaxonomyGroups cmdlet to copy specified Metadata groups from an on-premises environment
to SharePoint Online in a Hybrid SharePoint setup. SharePoint Online becomes the authoritative source for the
copied Taxonomy Group. All updates to the Taxonomy Group must be made in SharePoint Online. Once a
Taxonomy Group is copied, it cannot be re-copied.

Examples
Example 1

$credential = Get-Credential
Copy-SPTaxonomyGroups -LocalTermStoreName "Managed Metadata Service Application Proxy" -LocalSiteUrl
"https://sharepoint" -RemoteSiteUrl "https://contoso.sharepoint.com" -GroupNames "Group1","Group2" -Credential
$credential

This example copies two taxonomy groups "Group1" and "Group2" from local Term Store to the remote Term Store
in "https://contoso.com". These two sites have been enabled with Hybrid Taxonomy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthEndpoint
Specifies the Azure Active Directory Graph API authentication endpoint. By default, the well-known endpoint will
be used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential
Specifies the Taxonomy Term Store administrator credential of remote SharePoint Online Term Store.
Writes data to remote Term Store, so a Term Store Administrator's credential is needed to perform the operations.

Type: PSCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-GraphApiEndpoint
Specifies the Azure Active Directory Graph API endpoint. By default, the well-known endpoint will be used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupNames
Specifies the name array of Taxonomy groups in local on-premises term store that will be copied to remote
SharePoint Online Term store.

Type: String[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-LocalSiteUrl
Specifies the Url of local SharePoint on-premises site that contains the local Taxonomy Term Store.
Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-LocalTermStoreName
Specifies the name of local Taxonomy Term Store in the SharePoint on-premises farm.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-RemoteSiteUrl
Specifies the Url of remote SharePoint Online site that contains remote Taxonomy Term Store.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String
System.Uri System.String[] System.Management.Automation.PSCredential
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Disable-ProjectServerLicense
In ths Article

If the farm has Project Server enabled, this cmdlet will disable the Project Server functionality across the farm. All
Project Web App sites will be read only and will still contain any data that existed before the license was disabled.
New Project Web App sites cannot be created.

Syntax
Disable-ProjectServerLicense [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Disables Project Server functionality across the farm.

Examples
Example 1

Disable-ProjectServerLicense

This example disables Project Server functionality for the entire farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Disable-SPAppAutoProvision
In ths Article

Disables automatic provisioning of an app.

Syntax
Disable-SPAppAutoProvision [-AssignmentCollection <SPAssignmentCollection>]
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Description
Use the Disable-SPAppAutoProvision cmdlet to disable automatic provisioning of an app to the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1--------------

Disable-SPAppAutoProvision

This example disables app auto provisioning for the farm. The app auto provisioning is enabled by default. This
setting overrides site subscription level setting.
---------------EXAMPLE 2--------------

C:\PS>$subscription = Get-SPSiteSubscription https://Contoso.com

Disable-SPAppAutoProvision -SiteSubscription $subscription

This example disables app auto provisioning for the site subscription for Contoso.Com site. The app auto
provisioning is enabled by default.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the site collection for which auto provisioning is to be disabled.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Enable-SPAppAutoProvision
Get-SPAppAutoProvisionConnection
Set-SPAppAutoProvisionConnection
minutes to read • Edit Online

Disable-SPBusinessDataCatalogEntity
In ths Article

Deactivates an External Content type in the Business Data Connectivity Metadata Store.

Syntax
Disable-SPBusinessDataCatalogEntity -Identity <Entity> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Disable-SPBusinessDataCatalogEntity cmdlet deactivates an External Content type in the Business Data
Connectivity Metadata Store.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$entityToDisable = Get-SPBusinessDataCatalogMetadataObject -Namespace "Contoso" -Name "Customer" -


BdcObjectType "Entity" -ServiceContext http://contoso
Disable-SPBusinessDataCatalogEntity -Identity $entityToDisable

This example deactivates the External Content type of the name Customer in the Contoso. Note that the terms
External Content type and Entity refer to the same object type, and the term Disable refers to the same action as
the Business Data Connectivity term Deactivate.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the External Content type in the Business Data Connectivity Metadata Store to deactivate.

Type: Entity
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-SPFeature
In ths Article

Disables an installed SharePoint Feature at a given scope.

Syntax
Disable-SPFeature [-Identity] <SPFeatureDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Force] [-Url <String>] [-WhatIf] [<CommonParameters>]

Description
The Disable-SPFeature cmdlet disables a SharePoint Feature at the given scope. If the scope of the Feature is the
farm, the URL is not needed. Otherwise, provide the URL at which this Feature is to be deactivated (explicit scope is
not needed).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Disable-SPFeature -identity "MyCustom" -URL https://somesite

This example disables the "MyCustom" Web site scoped feature at https://somesite.
--------------EXAMPLE 2-----------------

C:\PS>$w = Get-SPWeb https://somesite/myweb | ForEach{ $_.URL }


Get-SPFeature -Web $w |%{ Disable-SPFeature -Identity $_ -URL $w}

This example disables all features in the subsite at https://somesite/myweb.


You do not need to use the SPAssignment cmdlets in this case because the Web object is not stored -- only the
string value for the URL.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces a Feature to be disabled.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the Feature or GUID to disable.
The type must be the name of the Feature folder located in the 14\Template\Features folder or GUID, in the format
21d186e1-7036-4092-a825-0eb6709e9281.

Type: SPFeatureDefinitionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the URL of the Web application, site collection, or Web site to which the Feature is being disabled.
The type must be a valid URL, such as https://server_name.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-SPHealthAnalysisRule
In ths Article

Disables health analyzer rules.

Syntax
Disable-SPHealthAnalysisRule [-Identity] <SPHealthAnalysisRuleInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Disable-SPHealthAnalysisRule cmdlet to disable a health analyzer rule.
The SPHealthAnalysisRule cmdlets were first introduced in the February 2011 Cumulative Update, which is
available for download as follows:
--Description of the SharePoint Foundation Cumulative Update Server Hotfix Package (SharePoint Foundation
server-package) (https://support.microsoft.com/kb/2475880) --Description of the SharePoint Server Cumulative
Update Server Hotfix Package (MOSS server-package (https://support.microsoft.com/kb/2475878)
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE 1---------------------------

Disable-SPHealthAnalysisRule -Identity "CustomRule"

This example disables the health analyzer rule named CustomRule.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name or GUID of the health analyzer rule to disable.
The type must be a valid name; an instance of a valid SPHealthAnalysisRule object, or a valid GUID (for example,
12345678-90ab-cdef-1234-567890bcdefgh).

Type: SPHealthAnalysisRuleInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-SPInfoPathFormTemplate
In ths Article

Deactivates a InfoPath form template from the specified site collection.

Syntax
Disable-SPInfoPathFormTemplate [-Identity] <SPFormTemplatePipeBind> -Site <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Disable-SPInfoPathFormTemplate cmdlet deactivates the InfoPath form template that is specified in the
Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Disable-SPInfoPathFormTemplate -Identity "FormTemplate.xsn" -Site https://testSite

This example deactivates an InfoPath form template from a site collection named TestSite.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the InfoPath form template to disable.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form
template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example,
FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

Type: SPFormTemplatePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Specifies the site collection that contains the InfoPath form template to deactivate.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-
SPProjectActiveDirectoryEnterpriseResourcePoolSync
In ths Article

Disables Timer Job execution of the Active Directory Enterprise Resource Pool synchronization.

Syntax
Disable-SPProjectActiveDirectoryEnterpriseResourcePoolSync [-Url] <Uri>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Active Directory Enterprise Resource Pool synchronization is used to create or update multiple Project Server
enterprise resources at the same time. Project Server enterprise resources can also be automatically activated and
deactivated based on group membership in the Active Directory directory service. For example, new employees in
your department can automatically be added as Project Server enterprise resources as long as they are in the
Active Directory group selected for synchronization. Conversely, employees who are removed from the Active
Directory group have their Project Server accounts deactivated upon synchronization.
Enterprise Resource Pool synchronization also updates enterprise resource properties with the most current data
from Active Directory. For example, an employee's name and e-mail address may change because of marriage. As
long as the change is made in Active Directory and the user is in the linked group, the change occurs in the user's
Enterprise Resource properties when synchronization occurs.
The Enterprise Resource Pool can be mapped to a single Active Directory group for synchronization. However, this
Active Directory group can contain nested groups whose members are also synchronized.
The following actions can occur during the Enterprise Resource Pool synchronization process:
A new Project Server enterprise resource and corresponding user account can be created based on an Active
Directory account.
An active Project Server resource/user account can be deactivated.
An existing Project Server user account's metadata (for example, name, e-mail address, and so on) can be updated
if it has changed in Active Directory.
A previously inactive Project Server resource/user account can be reactivated.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------------EXAMPLE---------------------
Disable-SPProjectActiveDirectoryEnterpriseResourcePoolSync https://localhost/pwa

This example disables Timer Job execution of the Active Directory Enterprise Resource Pool synchronization on
https://localhost/pwa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the URL of the Project Web App (PWA) instance to disable Active Directory Enterprise Resource Sync.

Type: Uri
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Invoke-SPProjectActiveDirectoryEnterpriseResourcePoolSync
minutes to read • Edit Online

Disable-SPProjectEmailNotification
In ths Article

Turns off the Project Web App site level setting for email notifications in Project Server.

Syntax
Disable-SPProjectEmailNotification [-Url] <Uri> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Turns off the Project Web App site level setting for email notifications in Project Server.

Examples
Example 1

Disable-SPProjectEmailNotification -Url https://pwa_site

Disables Project Server email notifications on the Project Web App site, https://pwa_site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
The URL of the Project Web App site.
Type: Uri
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Disable-SPProjectEnterpriseProjectTaskSync
In ths Article

Disables task sync between Project Web App and the associated project site. Once this is disabled, tasks created in
the enterprise project in Project Web App will no longer sync to the task list on the project site associated with the
project. This feature is disabled by default.

Syntax
Disable-SPProjectEnterpriseProjectTaskSync [-AssignmentCollection <SPAssignmentCollection>] -Url <Uri>
[<CommonParameters>]

Description
Disables task sync between Project Web App and the associated project site.

Examples
Example 1

Disable-SPProjectEnterpriseProjectTaskSync -Url https://pwa_site

Disables Project Server task sync on the Project Web App site, https://pwa_site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
The URL of the PWA site.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Disable-SPProjectQueueStatsMonitoring
In ths Article

Disables monitoring Project Server queue statistics.

Syntax
Disable-SPProjectQueueStatsMonitoring [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Disables monitoring Project Server queue statistics.

Examples
Example 1

Disable-SPProjectQueueStatsMonitoring

Disables monitoring Project Server queue statistics.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

Disable-SPSessionStateService
In ths Article

Turns off the session state service on the farm.

Syntax
Disable-SPSessionStateService [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Disable-SPSessionStateService cmdlet turns off the session state service. If your farm does not depend on
session state service, we recommend that you disable it.
When session state is disabled, some SharePoint Server services, components, and third-party components no
longer function. Changing this property modifies the Web.config file on every content Web application on every
server in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Disable-SPSessionStateService

This example turns off ASP.NET session state on the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-SPSingleSignOn
In ths Article

Disables the single sign-on (SSO ) Service on a farm server.

Syntax
Disable-SPSingleSignOn -ServerName <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Use the Disable-SPSingleSignOn cmdlet to disable the SSO Service on a farm server.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Disable-SPSingleSignOn myOldSSO -ServerName CONTOSO

This example turns off the SSO Service on the server named CONTOSO.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerName
Specifies the name of the server in which the service is running.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-SPTimerJob
In ths Article

Disables a timer job.

Syntax
Disable-SPTimerJob [-Identity] <SPTimerJobPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
The Disable-SPTimerJob cmdlet disables a timer job.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-----------------------

Disable-SPTimerJob job-ceip-datacollection

This example disables the timer job named job-ceip-datacollection.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the timer job to disable.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a timer
job (for example, TimerJob1); or an instance of a valid SPTimerJob object.

Type: SPTimerJobPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-SPUserLicensing
In ths Article

Disables user license enforcement.

Syntax
Disable-SPUserLicensing [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Disable-SPUserLicensing cmdlet disables user license enforcement on the SharePoint farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-------------------

Disable-SPUserLicensing

This example disables user license enforcement on the SharePoint farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-SPUserSolutionAllowList
In ths Article

Disables the user managed solutions gallery capability on the farm.

Syntax
Disable-SPUserSolutionAllowList [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Disables the user managed solutions gallery capability on the farm.

Examples
Example 1

Disable-SPUserSolutionAllowList

Disables the user managed solutions gallery capability on the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Disable-SPWebApplicationHttpThrottling
In ths Article

Turns off network throttling for a Web application.

Syntax
Disable-SPWebApplicationHttpThrottling [-Identity] <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Disable-SPWebApplicationHttpThrottling cmdlet turns off network throttling for a Web application. This
operation prompts you to confirm that you want to turn off network throttling.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Disable-SPWebApplicationHTTPThrottling https://sitename

This example disables network throttling on the Web application https://sitename.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Turns off network throttling on the specified SharePoint Web application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Disable-SPWebTemplateForSiteMaster
In ths Article

Disables the site master in the farm.

Syntax
Disable-SPWebTemplateForSiteMaster [-AssignmentCollection <SPAssignmentCollection>]
[-CompatibilityLevel <Int32>] -Template <SPWebTemplatePipeBind> [<CommonParameters>]

Description
Use the Disable-SPWebTemplateForSiteMaster cmdlet to disable a site master in the farm.

Examples
Example 1

Disable-SPWebTemplateForSiteMaster -Template STS#0

This example disables the template in the site master of a farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial
CompatibilityLevel value for the site collection.
When this parameter is not specified, the CompatibilityLevel parameter will default to the highest possible version
for the web application depending on the SiteCreationMode setting.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the name of the template. For example, SPSPERS#2.

Type: SPWebTemplatePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Disconnect-SPConfigurationDatabase
In ths Article

Disconnects the local server computer from the farm.

Syntax
Disconnect-SPConfigurationDatabase [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Disconnect-SPConfigurationDatabase cmdlet disconnects the active server computer from the SharePoint
configuration database. This operation removes the server computer from the farm. The configuration database
must be disconnected before the database can be removed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Disconnect-SPConfigurationDatabase -Confirm:$false

This example removes the local server computer from a farm without prompting for user confirmation.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Dismount-SPContentDatabase
In ths Article

Detaches a content database from its currently associated Web application.

Syntax
Dismount-SPContentDatabase [-Identity] <SPContentDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Dismount-SPContentDatabase cmdlet to detatch the given content database from its currently associated
Web application. This cmdlet will not delete the content database. Use the Remove-SPContentDatabase cmdlet to
delete a content database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1------------

Dismount-SPContentDatabase 12345678-90ab-cdef-1234-567890abcdef

This example detaches the content database with the GUID 12345678-90ab-cdef-1234-567890abcdef from its
current parent Web application.
--------------EXAMPLE 2------------

Get-SPContentDatabase -WebApplication https://sitename | Dismount-SPContentDatabase -WhatIf

This example detaches all content databases from the Web application on port 80 of the local machine. Remove the
WhatIf parameter to perform the operation.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the content database to detach.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint content database (for example, SPContentDB1); or an instance of a valid SPContentDatabase object.

Type: SPContentDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Dismount-SPSiteMapDatabase
In ths Article

Do not use.

Syntax
Dismount-SPSiteMapDatabase [-DatabaseId] <Guid> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Do not use.

Examples
------------EXAMPLE------------------

Do not use.

Parameters
-AssignmentCollection
Do not use.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Do not use.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseId
Do not use.

Type: Guid
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Do not use.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Dismount-SPStateServiceDatabase
In ths Article

Removes the association to a state service database from the farm without dropping the database in the Microsoft
SQL Server database.

Syntax
Dismount-SPStateServiceDatabase [-Identity] <SPStateDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Dismount-SPStateServiceDatabase cmdlet removes a state service database from a service application and
deletes the associated SharePoint object. This cmdlet does not delete or alter the state service database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Dismount-SPStateServiceDatabase -Identity 9703f7e2-9521-47c3-bd92-80e3eeba391b

This example removes the association between the SharePoint farm and the SQL Server database without
dropping the SQL Server database.
--------------EXAMPLE 2-----------------

Get-SPStateServiceDatabase -ServiceApplication F9168C5E-CEB2-4faa-B6B


F-329BF39FA1E4 | Dismount-SPStateServiceDatabase

This example dismounts a single database because only the Identity parameter is used.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service database to remove from the service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a state
database (for example, StateSvcDB1); or an instance of a valid SPStateServiceDatabase object.

Type: SPStateDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Enable-ProjectServerLicense
In ths Article

Enables all Project Server functionality in the farm. The cmdlet depends on the farm having a valid SharePoint
Server license (trials are allowed). Any existing Project Web App sites will become read/write. A Project Server Trial
key will only be accepted if the farm has never had a Project Server trial key previously.

Syntax
Enable-ProjectServerLicense [-Key] <String> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Enables Project Server functionality on the farm.

Examples
Example 1

Enable-ProjectServerLicense -Key XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

This example enables all Project Server functionality in the farm. The type of license being enabled (full or trial)
depends on the key that is passed in.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Key
License key (trial or full).

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Enable-SPAppAutoProvision
In ths Article

Enables automatic provisioning of an app.

Syntax
Enable-SPAppAutoProvision [-AssignmentCollection <SPAssignmentCollection>]
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Description
Use the Enable-SPAppAutoProvision cmdlet to enable automatic provisioning of an app to the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------

Enable-SPAppAutoProvision

This example enables auto provisioning for the farm. The app auto provisioning is enabled by default. This setting
overrides site subscription level setting.
--------------EXAMPLE 2--------

C:\PS>$subscription = Get-SPSiteSubscription https://Contoso.com


Enable-SPAppAutoProvision -SiteSubscription $subscription

This example enables app auto provisioning for the site subscription for Contoso.Com site. The app auto
provisioning is enabled by default.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the site collection for which auto provisioning is to be enabled.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Disable-SPAppAutoProvision
Get-SPAppAutoProvisionConnection
Set-SPAppAutoProvisionConnection
minutes to read • Edit Online

Enable-SPBusinessDataCatalogEntity
In ths Article

Activates an External Content type in the Business Data Connectivity Metadata Store.

Syntax
Enable-SPBusinessDataCatalogEntity -Identity <Entity> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Enable-SPBusinessDataCatalogEntity cmdlet activates an External Content type in the Business Data
Connectivity Metadata Store.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$entityToEnable = Get-SPBusinessDataCatalogMetadataObject -Namespace "Contoso" -Name "Customer" -


BdcObjectType "Entity" -ServiceContext http://contoso
Enable-SPBusinessDataCatalogEntity -Identity $entityToEnable

This example activates the External Content type with the name Customer in the Contoso namespace on the site
http://contoso. Note that the terms External Content type and Entity refer to the same object type.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the External Content type in the Business Data Connectivity Metadata Store to activate.

Type: Entity
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Enable-SPFeature
In ths Article

Enables an installed SharePoint Feature at the given scope.

Syntax
Enable-SPFeature [-Identity] <SPFeatureDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Force] [-PassThru] [-Url <String>] [-WhatIf] [<CommonParameters>]

Enable-SPFeature [-Identity] <SPFeatureDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>]


[-Confirm] [-Force] [-PassThru] [-WhatIf] [-CompatibilityLevel <Int32>] [<CommonParameters>]

Description
The Enable-SPFeature cmdlet enables an installed feature at the given scope. If the feature is a farm feature, no
URL is needed. Otherwise, provide the URL where the feature is to be enabled and it will be enabled at the proper
scope based on the Feature definition.
This cmdlet has no output unless the PassThru parameter is provided, in which case the SPFeatureDefinition object
for the newly enabled feature is returned.
If you try to use the Url parameter on a farm-scoped feature, you receive the following error message:
The feature '<feature name>' applies to the entire farm; the Url parameter cannot be used with farm-scoped
features.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Enable-SPFeature -identity "MyCustom" -URL https://somesite

This example enables the "MyCustom" site scoped SharePoint Feature at https://somesite.
--------------EXAMPLE 2-----------------

C:\PS>$w = Get-SPWeb https://somesite/myweb | ForEach{ $_.URL }


Get-SPFeature -Web $w |%{ Enable-SPFeature -Identity $_ -URL $w}

This example enables all SharePoint Features in the subsite at https://somesite/myweb.


Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
{{Fill CompatibilityLevel Description}}

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the activation of a Feature. This causes any custom code associated with the Feature to rerun.

NOTE
Please be aware -Force will not work if you updated the feature with Update-SPSolution. In this case you have to disable
feature first with Disable-SPFeature and then enable it back with Enable-SPFeature
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the Feature or GUID to uninstall.
The type must be the name of the Feature folder located in the 14\Template\Features folder or GUID, in the form
21d186e1-7036-4092-a825-0eb6709e9281.

Type: SPFeatureDefinitionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
If provided, the cmdlet outputs the Feature definition object after enable.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the Web application, site collection, or Web site for which the Feature is being activated.
The type must be a valid URL; for example, https://server_name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Enable-SPHealthAnalysisRule
In ths Article

Enables a health analyzer rule.

Syntax
Enable-SPHealthAnalysisRule [-Identity] <SPHealthAnalysisRuleInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Enable-SPHealthAnalysisRule cmdlet to enable a health analyzer rule.
The SPHealthAnalysisRule cmdlets were first introduced in the February 2011 Cumulative Update, which is
available for download as follows:
--Description of the SharePoint Foundation Cumulative Update Server Hotfix Package (SharePoint Foundation
server-package) (https://support.microsoft.com/kb/2475880) --Description of the SharePoint Server Cumulative
Update Server Hotfix Package (MOSS server-package (https://support.microsoft.com/kb/2475878)
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE 1---------------------------

Enable-SPHealthAnalysisRule -Identity "CustomRule"

This example enables the health analyzer rule named CustomRule.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the name or GUID of the health analyzer rule to enable.
The type must be a valid name, an instance of a valid SPHealthAnalysisRule object, or a valid GUID (for example,
12345678-90ab-cdef-1234-567890bcdefgh).

Type: SPHealthAnalysisRuleInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Enable-SPInfoPathFormTemplate
In ths Article

Activates a InfoPath form template in the specified site collection.

Syntax
Enable-SPInfoPathFormTemplate [-Identity] <SPFormTemplatePipeBind> -Site <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Enable-SPInfoPathFormTemplate cmdlet activates an InfoPath form template to the SharePoint site collection
specified in the Site parameter. This cmdlet returns a new InfoPath form template.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Enable-SPInfoPathFormTemplate -Identity "FormTemplate.xsn" -Site "https://TestSite"

This example activates an InfoPath form template to a site collection named TestSite.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the InfoPath form template to activate. The form template must be an administrator-approved, browser-
enabled form template that is available on the server farm.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form
template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example,
FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

Type: SPFormTemplatePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Specifies the site collection that contains the InfoPath form template to activate.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Enable-SPProjectActiveDirectoryEnterpriseResourcePoolSync
In ths Article

Enables Timer Job execution of the Active Directory Enterprise Resource Pool synchronization.

Syntax
Enable-SPProjectActiveDirectoryEnterpriseResourcePoolSync [-Url] <Uri>
[-GroupUids] <System.Collections.Generic.IEnumerable`1[System.Guid]>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Active Directory Enterprise Resource Pool synchronization is used to create or update multiple Project Server
enterprise resources at the same time. Project Server enterprise resources can also be automatically activated and
deactivated based on group membership in the Active Directory directory service. For example, new employees in
your department can automatically be added as Project Server enterprise resources as long as they are in the
Active Directory group selected for synchronization. Conversely, employees who are removed from the Active
Directory group have their Project Server accounts deactivated upon synchronization.
Enterprise Resource Pool synchronization also updates enterprise resource properties with the most current data
from Active Directory. For example, an employee's name and e-mail address may change because of marriage. As
long as the change is made in Active Directory and the user is in the linked group, the change occurs in the user's
Enterprise Resource properties when synchronization occurs.
The Enterprise Resource Pool can be mapped to a single Active Directory group for synchronization. However, this
Active Directory group can contain nested groups whose members are also synchronized.
The following actions can occur during the Enterprise Resource Pool synchronization process:
A new Project Server enterprise resource and corresponding user account can be created based on an Active
Directory account.
An active Project Server resource/user account can be deactivated.
An existing Project Server user account's metadata (for example, name, e-mail address, and so on) can be updated
if it has changed in Active Directory.
A previously inactive Project Server resource/user account can be reactivated.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
------------ Example 1 --------------------
$groupGuids = Get-ADGroup -Filter {Name -eq 'Domain Users' -or Name -eq 'Domain Admins'} | select ObjectGuid
#Active Directory PowerShell Module required
[Guid[]]$groupUids = $groupGuids[0].ObjectGuid,$groupGuids[1].ObjectGuid
Enable-SPProjectActiveDirectoryEnterpriseResourcePoolSync -Url https://pwa_site -GroupUids $groupUids

Retrieves the ObjectGuid values of the Domain Users and Domain Admins Active Directory groups and adds them
to the Active Directory Enterprise Resource Pool Synchronization on the Project Web Apps site, https://pwa_site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-GroupUids
The Active Directory Group GUID to synchronize the Enterprise Resource Pool with.

Type: System.Collections.Generic.IEnumerable`1[System.Guid]
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the Project Web App instance to enable Active Directory Enterprise Resource Sync.

Type: Uri
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Disable-SPProjectActiveDirectoryEnterpriseResourcePoolSync
Invoke-SPProjectActiveDirectoryEnterpriseResourcePoolSync
minutes to read • Edit Online

Enable-SPProjectEmailNotification
In ths Article

Turns on the Project Web App site level setting for email notifications in Project Server.

Syntax
Enable-SPProjectEmailNotification [-Url] <Uri> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Turns on the Project Web App site level setting for email notifications in Project Server.

Examples
Example 1

Enable-SPProjectEmailNotification -Url https://pwa_site

Enables Project Server email notifications on the Project Web App site, https://pwa_site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
The URL of the Project Web App site.
Type: Uri
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Enable-SPProjectEnterpriseProjectTaskSync
In ths Article

Enables task sync between Project Web App and the associated project site. Once this is enabled, tasks created in
the enterprise project in Project Web App will sync to the task list on the project site associated with the project.
This feature is disabled by default. If you enable this feature, the restrictions that come with SharePoint lists, such
as the maximum number of items supported before throttling, apply. Syncing tasks uses the queue and can affect
performance. You should enable it only if you really need it.

Syntax
Enable-SPProjectEnterpriseProjectTaskSync [-AssignmentCollection <SPAssignmentCollection>] -Url <Uri>
[<CommonParameters>]

Description
Enables task sync between Project Web App and the associated project site.

Examples
Example 1

Enable-SPProjectEnterpriseProjectTaskSync -Url https://pwa_site

Enables Project Task sync on the Project Web Apps site, https://pwa_site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Url
The URL of the PWA site.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Enable-SPProjectQueueStatsMonitoring
In ths Article

Enables monitoring Project Server queue statistics.

Syntax
Enable-SPProjectQueueStatsMonitoring [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Enables monitoring Project Server queue statistics.

Examples
Example 1

Enable-SPProjectQueueStatsMonitoring

Enables monitoring Project Server queue statistics.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

Enable-SPSessionStateService
In ths Article

Creates a session state database and turns on the session state service.

Syntax
Enable-SPSessionStateService -DatabaseName <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DatabaseCredentials <PSCredential>] [-DatabaseServer <String>] [-SessionTimeout <Int32>] [-WhatIf]
[<CommonParameters>]

Enable-SPSessionStateService [-DefaultProvision] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-SessionTimeout <Int32>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Enable-SPSessionStateService cmdlet creates a session state database, installs the ASP.NET session state
schema, and updates the Web.config files on the farm to turn on the session state service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Enable-SPSessionStateService -DefaultProvision

This example enables a ASP.NET session state on a SharePoint Server farm that uses the defaults (database hosted
on the configuration database SQL Server, using Windows authentication, 60-minute session time-out).
--------------EXAMPLE 2-----------------

Enable-SPSessionStateService -DatabaseName "Session State Database" -DatabaseServer "localhost" -SessionTimeout


120

This example enables a ASP.NET session state on a SharePoint Server farm that uses a custom database name,
database server, session time-out of 120 minutes, and Windows credentials (due to the lack of a
DatabaseCredentials parameter).
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the database credentials for SQL Authentication used to access the session state service database. If this
parameter is not specified, Windows authentication is used.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database for the session state service.
The type must be a valid name of a SQL Server database; for example, SessionStateDB1.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the host SQL Server for the state service database.
The type must be a valid SQL Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProvision
Specifies that the default provisioning settings are used. The default provisioning settings are: Windows
Authentication, Auto SQL Server (configuration database), and Auto Catalog Name.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionTimeout
Specifies the time, in minutes, that a ASP .NET session state service will remain active with no user activity. The
default value is 60.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Enable-SPTimerJob
In ths Article

Enables a timer job.

Syntax
Enable-SPTimerJob [-Identity] <SPTimerJobPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
The Enable-SPTimerJob cmdlet enables a timer job. A timer job must be enabled before it can be started.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE---------------------

Get-SPTimerJob job-ceip-datacollection | Enable-SPTimerJob

This example enables the timer job named job-ceip-datacollection.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the timer job to enable.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a timer
job (for example, TimerJob1); or an instance of a valid SPTimerJob object.

Type: SPTimerJobPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Enable-SPUserLicensing
In ths Article

Enables user-license enforcement.

Syntax
Enable-SPUserLicensing [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Enable-SPUserLicensing cmdlet enables user-license enforcement on the SharePoint farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE------------------

Enable-SPUserLicensing

This example enables user-license enforcement on the SharePoint farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Enable-SPUserSolutionAllowList
In ths Article

Enables the user managed solutions gallery capability on the farm.

Syntax
Enable-SPUserSolutionAllowList [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Enables the user managed solutions gallery capability on the farm.

Examples
Example 1

Enable-SPUserSolutionAllowList

This example enables a user managed solutions gallery on the entire farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Enable-SPWebApplicationHttpThrottling
In ths Article

Turns on network throttling for a Web application.

Syntax
Enable-SPWebApplicationHttpThrottling [-Identity] <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Enable-SPWebApplicationHttpThrottling cmdlet turns on network throttling for a Web application. This
operation prompts you to confirm that you want to turn on network throttling.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Enable-SPWebApplicationHttpThrottling https://sitename

This example enables network throttling on the https://sitename Web application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Turns on network throttling on the specified SharePoint Web application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Enable-SPWebTemplateForSiteMaster
In ths Article

Creates a template for a site master.

Syntax
Enable-SPWebTemplateForSiteMaster [-AssignmentCollection <SPAssignmentCollection>]
[-CompatibilityLevel <Int32>] -Template <SPWebTemplatePipeBind> [<CommonParameters>]

Description
Use the Enable-SPWebTemplateEnabledForSiteMaster cmdlet to create a site master in the database.

Examples
Example 1

Enable-SPWebTemplateForSiteMaster -Template STS#0 -CompatibilityLevel 15

This example creates a site master in the database using the Team Site template.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial
CompatibilityLevel value for the site collection.
When this parameter is not specified, the CompatibilityLevel parameter will default to the highest possible version
for the web application depending on the SiteCreationMode setting.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the name of the template. For example, SPSPERS#2.

Type: SPWebTemplatePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Export-SPAccessServicesDatabase
In ths Article

Exports an Access Services Database to a DACPAC via the Data-Tier Framework.

Syntax
Export-SPAccessServicesDatabase [-AssignmentCollection <SPAssignmentCollection>] -DatabaseName <String>
-ServerReferenceId <Guid> [<CommonParameters>]

Description
This cmdlet exports an Access Services Database to a DACPAC. The cmdlet requires the Data-Tier Framework to
be installed on the SharePoint server where the cmdlet is run. The Data-Tier Framework packages can be found at
Microsoft® SQL Server® Data-Tier Application Framework (17.4.1 GA DacFx). Install the following MSI from the
download:
EN\x86\DacFramework.msi
Note: The x86 package is required. The x64 package is not compatible with this cmdlet.
See more information about Data-Tier Framework at Data-tier Applications.

Examples
Example 1

$contentdb = Get-SPContentDatabase ContentDbName


$accessDb = Get-SPAccessServicesDatabase -ContentDb $contentdb -EA 0 | Select -First 1
Export-SPAccessServicesDatabase -DatabaseName $accessDb.DatabaseName -ServerReferenceId
$accessDb.ServerReferenceId | Set-Content -Path C:\accessDb.bacpac -Encoding Byte

This cmdlet retrieves the first Access Database from the specified Content Database and exports the Access
Database to a BACPAC. This BACPAC file can then be imported via SQL Server Management Studio to restore the
Access Database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseName
The name of the Access Database.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServerReferenceId
The ServerReferenceId used for the Access Database.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String
System.Guid Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Export-SPAppPackage
In ths Article

Exports an app package.

Syntax
Export-SPAppPackage -App <SPApp> -Path <String> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Use the Export-SPAppPackage cmdlet to export an app package from the content database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------

C:\PS>$instance = Get-SPAppInstance -AppInstanceId $instance.Id


Export-SPAppPackage -App $instance.App -Path .\exported.spapp

This example exports an app package to the \exported.spapp location.

Parameters
-App
Specifies the App for which to export the package.

Type: SPApp
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path
Specifies the path of the exported file.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Import-SPAppPackage
minutes to read • Edit Online

Export-SPBusinessDataCatalogModel
In ths Article

Exports a Business Data Connectivity Model.

Syntax
Export-SPBusinessDataCatalogModel -Identity <MetadataObject> -Path <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Force] [-LocalizedNamesIncluded] [-ModelsIncluded]
[-PermissionsIncluded] [-PropertiesIncluded] [-ProxiesIncluded] [-SettingId <String>] [<CommonParameters>]

Description
The Export-SPBusinessDataCatalogModel cmdlet exports a Business Data Connectivity Model. There are two
types of Business Data Connectivity models: Model type (.bdcm) and Resource type (.bdcr). The Model type
contains the base XML metadata, and can also include resource properties. The Resource type includes only
resource properties.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$Model = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Model" -Name "ContosoModel" -


ServiceContext http://contoso
Export-SPBusinessDataCatalogModel -Identity $Model -Path "C:\folder\model.bdcm"

This example gets a Business Data Connectivity Model from the Business Data Connectivity Metadata Store and
exports it to the location specified with the name model and using the bdcm file extension.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Overwrites the output file if the file exists.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Business Data Connectivity Metadata Store metadata object from which to export the Business Data
Connectivity Model.

Type: MetadataObject
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LocalizedNamesIncluded
Specifies that names for business data fields in multiple languages are exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ModelsIncluded
Specifies that models are included in the exported Business Data Connectivity Model file. A model contains the
base XML metadata for a system.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path and name to use to create the export file.
The type must be a valid path in either of the following forms:
C:\folder_name \file.bdcm
\\server_name\folder_name \file.bdcm
...\folder_name\file.bdcm

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PermissionsIncluded
Specifies that permissions from the Business Data Connectivity Model are exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertiesIncluded
Specifies that properties from the application definition are exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxiesIncluded
Specifies that proxies for Business Data Connectivity Service applications are exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SettingId
Specifies the custom environment settings model slice to export.
The type must be a valid string that identifies a model slice; for example, ModelSlice1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Export-SPEnterpriseSearchTopology
In ths Article

Saves an existing search topology.

Syntax
Export-SPEnterpriseSearchTopology -Filename <String> -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Export-SPEnterpriseSearchTopology cmdlet exports the topology for a shared search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$ssa = Get-SPEnterpriseSearchServiceApplication
Export-SPEnterpriseSearchTopology -SearchApplication $ssa -Filename topology.xml

This example exports the topology to a file named topology.xml in the search service application referenced by
$ssa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filename
Specifies the path and file name to use to create the topology XML file.
The type must be a valid path, in the form MyFeature\Feature.xml.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application with the topology to export.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchTopology
Get-SPEnterpriseSearchTopology
Set-SPEnterpriseSearchTopology
Remove-SPEnterpriseSearchTopology
minutes to read • Edit Online

Export-SPInfoPathAdministrationFiles
In ths Article

Saves InfoPath form templates on the SharePoint Central Administration Web site and .udcx files to a .cab file.

Syntax
Export-SPInfoPathAdministrationFiles [-Path] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Identity <SPFormsServicePipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Export-SPInfoPathAdministrationFiles cmdlet saves all InfoPath form templates (.xsn files) and universal data
connections (.udcx files) that are located on the Central Administration page. The backup package includes all
workflow forms in InfoPath that were deployed by an administrator and not included with SharePoint Server, and
includes browser forms that were deployed by an administrator. The backup package is output to the specified .cab
file.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Export-SPInfoPathAdministrationFiles -path d:\file.cab

This example saves all InfoPath form templates (.xsn files) and universal data connections (.udcx files) located on
the SharePoint Central Administration Web site in a compressed cabinet file named file.cab.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the site collection that contains the InfoPath form template and Central Administration .udcx files to
export.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPFormsServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the location and name of the output .cab file.
The type must be a valid file path, in the form \\ipadmin\folder\backups1\ipfsfiles.cab.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Export-SPMetadataWebServicePartitionData
In ths Article

Exports the data from a metadata Web service for a site subscription.

Syntax
Export-SPMetadataWebServicePartitionData [-Identity] <SPSiteSubscriptionPipeBind>
[-ServiceProxy] <SPMetadataServiceProxyCmdletPipeBind> -Path <String>
[-AssignmentCollection <SPAssignmentCollection>] [-NoCompression] [<CommonParameters>]

Description
Use the Export-SPMetadataWebServicePartitionData cmdlet to export the data from a metadata Web service that
is associated with the specified site subscription.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE--------------

Export-SPMetadataWebServicePartitionData -Identity $siteSubscriptionPipeBind1 -ServiceProxy


"MetadataServiceProxy2" -Path "\\server_name\folder_name\file_name.cab"

This example creates a backup of data for a specific site subscription on a Metadata Service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the site subscription to export.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site
subscription (for example, SiteSubscriptionConfig1); or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoCompression
{{Fill NoCompression Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path and file name for the file to create from the exported data.
The type must be a valid path in either of the following forms:
C:\folder_name\subscription_export
\\server_name\folder_name\file_name.cab

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceProxy
Specifies the service proxy for the service application that contains the site subscription.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of the
service application proxy (for example, ServiceAppProxy1); or an instance of a valid SPMetadataServiceProxy
object.
Type: SPMetadataServiceProxyCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Export-SPPerformancePointContent
In ths Article

Exports a Performance Point Server (PPS ) dashboard.

Syntax
Export-SPPerformancePointContent [-AssignmentCollection <SPAssignmentCollection>] -ExportFileUrl <String>
-ItemUrls <Array> [<CommonParameters>]

Description
The Export-SPPerformancePointContent exports a PPS dashboard and its dependencies from a CMP file that can
then be used to import to another server.

Examples
Example 1

Export-SPPerformancePointContent -ItemUrls https://contoso/sites/marketing/default.aspx -ExportFileURL


"https://contoso/bicenter/SharedDocuments/bi/dashboard1.cmp"

This example exports a dashboard at the location specified with the ItemUrls parameter.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ExportFileUrl
Output name and path of the CMP file to which the data will be stored.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ItemUrls
The URL to the dashboard to be migrated or to the additional content URLs.

Type: Array
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Export-SPScaleOutDatabaseTenantData
In ths Article

Exports the data of the specified subscription.

Syntax
Export-SPScaleOutDatabaseTenantData -FilePath <String> -ServiceApplication <SPServiceApplicationPipeBind>
-SiteSubscriptionId <Guid> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force] [-WhatIf]
[<CommonParameters>]

Description
Use the Export-SPScaleOutDatabaseTenantData cmdlet to export the data of the specified subscription id to the
specified file from the specified service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------EXAMPLE-------

Export-SPScaleOutDatabaseTenantData -FilePath "C:\TenantData.dat" -ServiceApplication $serviceApplication -


SiteSubscriptionId "5CAF2F99-A75F-4239-B9CD-7FE63D1CE904"

This example exports data for the site subscription with id 5CAF2F99-A75F -4239-B9CD -7FE63D1CE904 to the
file at C:\ TenantData.dat, from the specified service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePath
Specifies the output path for the file to export the data to.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites an existing data file without prompting for confirmation.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application to export the data from.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscriptionId
Specifies the site subscription id of the site subscription to export the data from.
Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Clear-SPScaleOutDatabaseTenantData
Import-SPScaleOutDatabaseTenantData
minutes to read • Edit Online

Export-SPServerScaleOutDatabaseTenantData
In ths Article

Exports the data of the specified subscription.

Syntax
Export-SPServerScaleOutDatabaseTenantData [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-FilePath <String> [-Force] -ServiceApplication <SPServiceApplicationPipeBind> -SiteSubscriptionId <Guid>
[-WhatIf] [<CommonParameters>]

Description
Use the Export-SPServerScaleOutDatabaseTenantData cmdlet to export the data of the specified subscription id to
the specified file from the specified service application.

Examples
----------EXAMPLE-------

Export-SPServerScaleOutDatabaseTenantData -FilePath "C:\TenantData.dat" -ServiceApplication $serviceApplication


-SiteSubscriptionId "5CAF2F99-A75F-4239-B9CD-7FE63D1CE904"

This example exports data for the site subscription with id 5CAF2F99-A75F -4239-B9CD -7FE63D1CE904 to the
file at C:\ TenantData.dat, from the specified service application.

Parameters
-AssignmentCollection
{{Fill AssignmentCollection Description}}

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePath
{{Fill FilePath Description}}

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
{{Fill Force Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
{{Fill ServiceApplication Description}}

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscriptionId
{{Fill SiteSubscriptionId Description}}

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Clear-SPServerScaleOutDatabaseTenantData
Import-SPServerScaleOutDatabaseTenantData
minutes to read • Edit Online

Export-SPSiteSubscriptionBusinessDataCatalogConfig
In ths Article

Exports all data from the Business Data Connectivity Metadata Store associated with a partition.

Syntax
Export-SPSiteSubscriptionBusinessDataCatalogConfig -Path <String> -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force] [-LocalizedNamesIncluded]
[-ModelsIncluded] [-PermissionsIncluded] [-PropertiesIncluded] [-ProxiesIncluded] [-WhatIf]
[<CommonParameters>]

Description
The SPSiteSubscriptionBusinessDataCatalogConfig cmdlet exports all data from the Business Data Connectivity
Metadata Store associated with a specified partition.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Export-SPSiteSubscriptionBusinessDataCatalogConfig -ServiceContext http://contoso -Path


"C:\folder\exportedFile.xml"

This example exports the data file named exportedFile.xml.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the output file if the file exists.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocalizedNamesIncluded
Specifies that names for business data fields in multiple languages are exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ModelsIncluded
Specifies that Business Data Connectivity models are included in the exported file.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path and name to use to create the export file.
The type must be a valid path in either of the following forms:
C:\folder_name\file.xml
\\server_name\folder_name\file.xml
...\folder_name\file.xml

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionsIncluded
Specifies that permissions from the Business Data Connectivity Models are exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertiesIncluded
Specifies that properties from the Business Data Connectivity Models are exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxiesIncluded
Specifies that proxies for Business Data Connectivity Service applications are exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context of the data to be exported.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
context (for example, http://ServiceContext1); or an instance of a valid SPServiceContext object.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Export-SPSiteSubscriptionSettings
In ths Article

Creates a backup file of site subscription data.

Syntax
Export-SPSiteSubscriptionSettings [-Identity] <SPSiteSubscriptionPipeBind> -Path <String> [-AdminProperties]
[-AssignmentCollection <SPAssignmentCollection>] [-Force] [<CommonParameters>]

Description
The Export-SPSiteSubscriptionSettings cmdlet generates a backup file of all settings in the subscription data store
for the given site subscription.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Export-SPSiteSubscriptionSettings -Identity "https://siteCollection" -Path


"C:\siteCollection_sitesubscriptionsettings.txt"

The example backs up the subscription settings store of https://siteCollection.


--------------EXAMPLE 2-----------------

C:\PS>$site = Get-SPSite https://siteCollection


Export-SPSiteSubscriptionSettings -Identity $site.SiteSubscription -Path
"C:\siteCollection_sitesubscriptionsettings.txt"

The example backs up the subscription settings store of https://siteCollection using the Site Subscription object.

Parameters
-AdminProperties
Specifies that only administrator subscription properties are exported. If this parameter is not set, only non-
administrator subscription properties are exported.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Forces the output backup file (if provided) to overwrite any existing file at the given path.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the ID of the site subscription from which to back up data.
The type must be a valid URL, in the form https://server_name or a Site Subscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path
Specifies the location of the output file.
The type must be a valid path; for example, C:/backupfile.back..
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Export-SPTagsAndNotesData
In ths Article

Exports the SharePoint Newsfeed tags and notes from the SharePoint database to a ZIP file.

Syntax
Export-SPTagsAndNotesData [-Site] <SPSitePipeBind> [-FilePath] <String>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Export-SPTagsAndNotesData cmdlet exports the SharePoint Newsfeed tags and notes from the SharePoint
database. The tags and notes are written into separate files, and then the two are compressed and added to the ZIP
file you specify.

Examples
----------------EXAMPLE-----------------

Export-SPTagsAndNotesData -Site https://site.contoso.com -FilePath C:\TagsAndNotes.zip

This example creates a new ZIP file called TagsAndNotes.zip, on the root of C: drive, exports tags and notes from
the SharePoint database for the site https://site.contoso.com, and adds the resulting files to the TagsAndNotes.zip
file

Parameters
-AssignmentCollection
{{Fill AssignmentCollection Description}}

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-FilePath
File name, including full path, that you want export the tags and notes to.
The cmdlet will create a new ZIP file with the name you specified. If the file already exists, the cmdlet won't perform
the export and will ask you to specify a new file name.
Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
URL of the root site where you want to export the tags and notes from.
You must specify a valid URL to an existing SharePoint root site. For example: https://site.contoso.com

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Export-SPWeb
In ths Article

Exports a site, list, or library.

Syntax
Export-SPWeb [-Identity] <SPWebPipeBind> -Path <String> [-AppLogFilePath <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-CompressionSize <Int32>] [-Confirm] [-Force] [-HaltOnError]
[-HaltOnWarning] [-IncludeUserSecurity] [-IncludeVersions <SPIncludeVersions>] [-ItemUrl <String>]
[-NoFileCompression] [-NoLogFile] [-UseSqlSnapshot] [-WhatIf] [-IncludeAlerts] [<CommonParameters>]

Description
The Export-SPWeb cmdlet exports a site, list, or library. The capability to export from a library is a new feature in
SharePoint.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-----------------------.

Export-SPWeb https://site -Path "C:\Temp\export.cmp"

This example exports the site at https://site/ to a file called site export.cmp in the current directory.

Parameters
-AppLogFilePath

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompressionSize
Sets the maximum file size for the compressed export files. If the total size of the exported package is greater than
this size, the exported package will be split into multiple files.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forcefully overwrites the export package if it already exists.
The type must be either of the following values:
-True
-False
The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HaltOnError
Stops the export process when an error occurs.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HaltOnWarning
Stops the export process when a warning occurs.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the Web to be exported.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint site (for example, MySPSite1); or an instance of a valid SPWeb object.

Type: SPWebPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncludeAlerts
Indicates if alerts are turned on.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeUserSecurity
Preserves the user security settings.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeVersions
Indicates the type of file and list item version history to be included in the export operation. If the IncludeVersions
parameter is absent, the Export-SPWeb cmdlet by default uses a value of 1.
The type must be any one of the following versions:
-Last major version for files and list items (default)
-The current version, either the last major version or the last minor version
-Last major and last minor version for files and list items
-All versions for files and list items
Valid values are:
All, CurrentVersion, LastMajor, LastMajorAndMinor

Type: SPIncludeVersions
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ItemUrl
Specifies the URL of the Web application, GUID, or object to be exported.
The type must be a valid URL; for example, https://server_name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoFileCompression
Either enables or disables file compression in the export package. The export package is stored in the folder
specified by the Path parameter or Identity parameter. We recommend that you use this parameter for
performance reasons. If compression is enabled, the export process can increase by approximately 30 percent.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoLogFile
Suppresses the generation of an export log file. If this parameter is not specified, the Export-SPWeb cmdlet will
generate an export log file in the same location as the export package. The log file uses Unified Logging Service
(ULS ).

It is recommended to use this parameter. However, for performance reasons, you might not want to generate a log
file.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the name of the export file.
If the NoFileCompression parameter is used, a directory must be specified; otherwise, any file format is valid.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseSqlSnapshot
Specifies a SQL Database Snapshot will be created when the export process begins, and all exported data will be
retrieved directly from the database snapshot. This snapshot will be automatically deleted when export completes.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-AvailabilityGroupStatus
In ths Article

Returns one or more objects representing the availability groups known to the SharePoint farm.

Syntax
Get-AvailabilityGroupStatus [-AssignmentCollection <SPAssignmentCollection>] [-Identity <String>]
[<CommonParameters>]

Description
Returns one or more objects representing the availability groups known to the SharePoint farm.

Examples
Example 1

Get-AvailabilityGroupStatus -Identity MyAvailabilityGroup

This example returns an availability group named "MyAvailabilityGroup".

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Finds the availability group whose name property matches this string. Otherwise, returns all availability groups.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-FASTSearchContentCollection
In ths Article

Retrieves Microsoft FAST Search Server 2010 for SharePoint content collections.

Syntax
Get-FASTSearchContentCollection [[-Name] <String>] [<CommonParameters>]

Description
This cmdlet retrieves all FAST Search Server 2010 for SharePoint content collections. When a collection name is
specified, a single collection is retrieved, if it exists.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchContentCollection

This example retrieves all FAST Search Server 2010 for SharePoint content collections.
---------------EXAMPLE 2-----------------

Get-FASTSearchContentCollection -Name newscollection

This example retrieves the "newscollection" content collection.

Parameters
-Name
The name of the FAST Search Server 2010 for SharePoint collection to retrieve.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Clear-FASTSearchContentCollection
New -FASTSearchContentCollection
Remove-FASTSearchContentCollection
minutes to read • Edit Online

Get-FASTSearchDocumentProcessingPipeline
In ths Article

Retrieves FAST Search Server 2010 for SharePoint document processing pipelines.

Syntax
Get-FASTSearchDocumentProcessingPipeline [[-Name] <String>] [<CommonParameters>]

Description
A document processing pipeline consists of multiple processing stages that an item goes through before being
indexed for searching. Item processing includes adding/removing/modifying metadata, linguistic processing,
language detection. This cmdlet retrieves all FAST Search Server 2010 for SharePoint document processing
pipelines. When one pipeline name is specified, a single pipeline is retrieved if it exists.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchDocumentProcessingPipeline

This example retrieves all FAST Search Server 2010 for SharePoint document processing pipelines.
---------------EXAMPLE 2-----------------

Get-FASTSearchDocumentProcessingPipeline -Name "Office14 (webcluster)"

This example retrieves a single FAST Search Server 2010 for SharePoint document processing pipeline named
"Office14 (webcluster)".

Parameters
-Name
The name of the document processing pipeline to retrieve.
Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-FASTSearchMetadataCategory
In ths Article

Retrieves a crawled property category.

Syntax
Get-FASTSearchMetadataCategory [[-Name] <String>] [<CommonParameters>]

Description
This cmdlet retrieves a category object from the installation. If no name is specified, it retrieves all categories in the
system.
A category contains several crawled properties that are grouped together for setting properties that are common
to them all.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchMetadataCategory

This example returns all available categories. This is the default behavior if you do not specify any parameters.
---------------EXAMPLE 2-----------------

Get-FASTSearchMetadataCategory -Name SharePoint

This example returns one specific category, the "SharePoint" category.


---------------EXAMPLE 3-----------------

Get-FASTSearchMetadataCategory -Name m*

This example returns all categories with a name that begins with "m". Matching is case-insensitive.
---------------EXAMPLE 4-----------------

$category = Get-FASTSearchMetadataCategory -Name "Enterprise Crawler"


$category.GetAllCrawledProperties()|ForEach-Object {$_.Name}
This example returns all crawled properties that are mapped to the category named "Enterprise Crawler". The
example first retrieves the category, and then calls the category's GetAllCrawledProperties() function to list its
crawled properties. It then iterates over the list of crawled properties and selects the name of each crawled
property.

Parameters
-Name
The name of the category to retrieve. If no category is specified, all categories are returned.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
Remove-FASTSearchMetadataCategory
Set-FASTSearchMetadataCategory
New -FASTSearchMetadataCategory
minutes to read • Edit Online

Get-FASTSearchMetadataCrawledProperty
In ths Article

Retrieves a crawled property from Microsoft FAST Search Server 2010 for SharePoint.

Syntax
Get-FASTSearchMetadataCrawledProperty [[-Name] <String>] [-Count <Int32>] [-Filter <String>] [-Offset <Int32>]
[<CommonParameters>]

Description
This cmdlet retrieves a crawled property from the FAST Search Server 2010 for SharePoint system. If the cmdlet is
called without any parameters, it returns all crawled properties in the system. The order of the returned crawled
property list is fixed, and multiple calls return the same ordered list as long as no new crawled properties have
been added.
Get-FASTSearchMetadataCrawledProperty supports several ways of looking up properties. Run with a single
parameter or with a named parameter (using Name), the cmdlet retrieves crawled properties with that exact name,
if any exist. The Name parameter supports wildcards. Alternatively, a filter can be specified (using the Filter
parameter) to search the crawled properties and to return any crawled property with a name that includes the filter
value. The filter option does not support wildcards.
Retrieving crawled properties with the Filter parameter is much more efficient than using the Name parameter.
To paginate a set of results from this cmdlet, use an Offset and Count to control the number of returned results.
Offset and Count are calculated before either filter or named matching is done. This means that if a crawled
property falls outside the [Offset,Offset+Count] range, it will not be returned.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchMetadataCrawledProperty

Calling Get-FASTSearchMetadataCrawledProperty without any parameters returns all known crawled properties
in the FAST Search Server 2010 for SharePoint system.
---------------EXAMPLE 2-----------------

Get-FASTSearchMetadataCrawledProperty -Name viewurl


This example retrieves a crawled property with the exact name "viewurl".
---------------EXAMPLE 3-----------------

Get-FASTSearchMetadataCrawledProperty -filter 4

This example retrieves and returns any crawled property that includes a "4" in its name.
---------------EXAMPLE 4-----------------

Get-FASTSearchMetadataCrawledproperty -filter url -count 2

This example retrieves the first two crawled properties with the name "url".
---------------EXAMPLE 5-----------------

Get-FASTSearchMetadataCrawledproperty |ForEach-Object{ if ($_.IsMappedToContents) {$_.Name} }

This example returns the names of all crawled properties that have the IsMappedToContents parameter set to
"true". The example first retrieves all configured crawled properties, and then iterates over them to find those with
IsMappedToContents set to "true"
---------------EXAMPLE 6-----------------

Get-FASTSearchMetadataCrawledproperty -offset 0 -count 2


Get-FASTSearchMetadataCrawledproperty -offset 2 -count 2
Get-FASTSearchMetadataCrawledproperty -offset 4 -count 2

This example generates a list of two crawled properties each time the cmdlet is run. The Offset is increased by the
Count value to start returning crawled properties where the last run ended.
---------------EXAMPLE 7----------------- (FAST Server for SharePoint 2010)

Get-FASTSearchMetadataCrawledProperty -filter url| where-object {($_.Name -eq "url") -and ($_.VariantType -eq
31) -and ($_.Propset -eq "63e90878-0292-490d-8b7c-f3905a8b65fd")}

This example lists all potential matches to a named crawled property, and then selects the exact crawled property
by iterating over the result set and picking out the result that also matches both the requested property set and
variant type. The command returns the "url" crawled property in the "Enterprise Crawler" category.

Parameters
-Count
The maximum number of crawled properties to return (starting from the first returned crawled property, or from
the index given by the Offset parameter).
If the Filter or Name parameter is specified, these will only be applied after the result set has been narrowed down
to the range [Offset, Offset + Count].
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
The term used to search for configured crawled properties.
The Filter parameter does not support wildcards. Matching is case-insensitive, and matches a string anywhere
within the name attribute of the crawled property.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of crawled property to retrieve.
The Name parameter supports wildcards. Combine the Name parameter with the Offset and Count parameters to
control the range that is searched.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Offset
The offset in the result set from which to start returning results.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataCrawledProperty
Set-FASTSearchMetadataCrawledProperty
minutes to read • Edit Online

Get-FASTSearchMetadataCrawledPropertyMapping
In ths Article

Retrieves a list of crawled properties mapped to a managed property.

Syntax
Get-FASTSearchMetadataCrawledPropertyMapping [-Name] <String> [<CommonParameters>]

Get-FASTSearchMetadataCrawledPropertyMapping -ManagedProperty <ManagedProperty> [<CommonParameters>]

Description
This cmdlet retrieves a list of the crawled properties that are mapped to a managed property. The managed
property can be specified with the Name parameter or by a ManagedPropertyImpl object as returned by Get-
FASTSearchMetadataManagedProperty (using the ManagedProperty parameter).
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

C:\PS>Get-FASTSearchMetadataCrawledPropertyMapping -Name title

This example returns a list of crawled properties that are mapped to the managed property named "title".
---------------EXAMPLE 2-----------------

$managedproperty = Get-FASTSearchMetadataManagedProperty -name title


Get-FASTSearchMetadataCrawledPropertyMapping -ManagedProperty $managedproperty

This example first retrieves a ManagedPropertyImpl object, and then uses it to look up the corresponding crawled
property mappings. It returns all crawled properties that are set up to map content into this managed property.
---------------EXAMPLE 3-----------------

$crawledproperty = Get-FASTSearchmetadataCrawledProperty -name title


$crawledproperty.GetMappedManagedProperties()

These commands are the opposite of Get-FASTSearchMetdataCrawledPropertyMapping; they find all managed
properties that have a mapping for a specific crawled property. This is useful when assessing how modifying a
crawled property will impact the search index.
Parameters
-ManagedProperty
The managed property object for finding crawled properties.

Type: ManagedProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
The name of a managed property for finding crawled properties.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataCrawledPropertyMapping
Remove-FASTSearchMetadataCrawledPropertyMapping
Set-FASTSearchMetadataCrawledPropertyMapping
Get-FASTSearchMetadataCrawledProperty
Get-FASTSearchMetadataManagedProperty
minutes to read • Edit Online

Get-FASTSearchMetadataFullTextIndex
In ths Article

Retrieves a full text index.

Syntax
Get-FASTSearchMetadataFullTextIndex [[-Name] <String>] [<CommonParameters>]

Description
This cmdlet retrieves a full text index object. The full text indexes are the searchable content of a Microsoft FAST
Search Server 2010 for SharePoint system. Although it is also possible to search on a specific managed property
without using a full text index, full relevancy calculation is only done when searching in full text indexes.
If no name is specified, all full text indexes are retrieved.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchMetadataFullTextIndex -Name content

This example retrieves the full text index named "content".

Parameters
-Name
The name of the full text index to retrieve.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataFullTextIndex
Remove-FASTSearchMetadataFullTextIndex
Set-FASTSearchMetadataFullTextIndex
minutes to read • Edit Online

Get-FASTSearchMetadataFullTextIndexMapping
In ths Article

Retrieves mappings between managed properties and the full text indexes.

Syntax
Get-FASTSearchMetadataFullTextIndexMapping [-FullTextIndex <FullTextIndex>]
[-ManagedProperty <ManagedProperty>] [<CommonParameters>]

Description
This cmdlet retrieves mappings from managed properties to full text indexes. These mappings control which
managed properties are included in each full text index.
Running Get-FASTSearchMetadataFullTextIndexMapping with only a managed property as a parameter (the
ManagedProperty parameter) returns all mappings to full text indexes in which the managed property is included.
Running Get-FASTSearchMetadataFullTextIndexMapping with only a full text index as a parameter (the
FullTextIndex parameter) returns all mappings from managed properties that are included in the full text index
Running Get-FASTSearchMetadataFullTextIndexMapping with both the ManagedProperty and the FullTextIndex
parameters returns a single FullTextIndexMappingImpl object for that exact mapping, if it exists in the Microsoft
FAST Search Server 2010 for SharePoint system.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

$fulltextindex = Get-FASTSearchMetadataFullTextIndex -name content


Get-FASTSearchMetadataFullTextIndexMapping -fulltextindex $fulltextindex| ForEach-Object
{$_.ManagedProperty.Name}

This example retrieves the full text index mappings for the full text index "content". It then iterates over the
mappings and outputs the names of the managed properties included in the full text index.
---------------EXAMPLE 2-----------------

$title = Get-FASTSearchMetadataManagedProperty -name title


Get-FASTSearchMetadataFullTextIndexMapping -managedproperty $title

This example retrieves all full text indexes where the managed property named "title" is included.
The specified managed property is mapped to both "content" and "thirdfulltextindex", showing that there is no limit
to how many full text indexes a managed property can be part of.

Parameters
-FullTextIndex
The full text index specified to retrieve mappings.

Type: FullTextIndex
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ManagedProperty
The managed property specified to retrieve mappings.

Type: ManagedProperty
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataFullTextIndexMapping
Remove-FASTSearchMetadataFullTextIndexMapping
Set-FASTSearchMetadataFullTextIndexMapping
Get-FASTSearchMetadataFullTextIndex
Get-FASTSearchMetadataManagedProperty
minutes to read • Edit Online

Get-FASTSearchMetadataManagedProperty
In ths Article

Retrieves a managed property with the specified name.

Syntax
Get-FASTSearchMetadataManagedProperty [[-Name] <String>] [<CommonParameters>]

Description
This command retrieves managed properties that match the input parameter. If wildcards are used, the command
may return more than one managed property.
A managed property is a piece of information (such as title, author, etc.) that is stored for each item in the index.
See Set-FASTSearchMetadataManagedProperty for details about the managed property parameters and how to
configure them.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchMetadataManagedProperty -name title

This example retrieves a managed property named "title". It returns an object representing the managed property.
---------------EXAMPLE 2-----------------

Get-FASTSearchMetadataManagedProperty -name content*

This example returns all managed properties with names starting with "content". It returns a list of managed
property objects.

Parameters
-Name
The name of the managed property to retrieve. This option supports wildcards, and the matching is case-
insensitive.
Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataManagedProperty
Set-FASTSearchMetadataManagedProperty
Remove-FASTSearchMetadataManagedProperty
minutes to read • Edit Online

Get-FASTSearchMetadataRankProfile
In ths Article

Retrieves rank profiles from the Microsoft FAST Search Server 2010 for SharePoint system.

Syntax
Get-FASTSearchMetadataRankProfile [[-Name] <String>] [<CommonParameters>]

Description
This cmdlet retrieves rank profiles which match the Name parameter. A rank profile is a weighting scheme for
calculating relevance, specifying how each relevance component should be weighted when calculating an item's
relevance.
See Set-FASTSearchMetadataRankProfile for details about rank profile parameters.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchMetadataRankProfile -Name newdefault

This example retrieves the rank profile named "newdefault".


---------------EXAMPLE 2-----------------

Get-FASTSearchMetadataRankProfile -Name *?default

This example retrieves all rank profiles that match the pattern "*?default". It will not match the default rankprofile
named "default".

Parameters
-Name
The name of the rank profile to retrieve. This option supports wildcards, and matching is case-insensitive.
Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataRankProfile
Remove-FASTSearchMetadataRankProfile
Set-FASTSearchMetadataRankProfile
minutes to read • Edit Online

Get-FASTSearchResource
In ths Article

Downloads a resource from the resource store.

Syntax
Get-FASTSearchResource [-Path] <String> [-FilePath] <String> [<CommonParameters>]

Description
This cmdlet downloads a specified file located in the Microsoft FAST Search Server 2010 for SharePoint resource
store to the local environment. The location of the resource store is typically specified in
%FASTSEARCH%/etc/Admin.config (where %FASTSEARCH% is the FAST Search Server 2010 for SharePoint
installation folder.)
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchResource dictionaries\spellcheck\check_en.aut c:\check_en.aut

This example downloads dictionaries\spellcheck\check_en.aut from the resource store to c:\check_en.aut.

Parameters
-FilePath
Path to download the resource.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Partial URI within the resource store where the file needs to be downloaded from.
Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-FASTSearchResource
Add-FASTSearchResource
minutes to read • Edit Online

Get-FASTSearchSearchSettingGroup
In ths Article

Retrieves Microsoft FAST Search Server 2010 for SharePoint search setting groups.

Syntax
Get-FASTSearchSearchSettingGroup [-Name <String>] [<CommonParameters>]

Description
This cmdlet retrieves one or all FAST Search Server 2010 for SharePoint search setting groups. When a group
name is specified, a single group is retrieved, if it exists.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSearchSettingGroup

This example retrieves all FAST Search Server 2010 for SharePoint search setting groups.
---------------EXAMPLE 2-----------------

Get-FASTSearchSearchSettingGroup -Name marketinggroup

This example retrieves the "marketinggroup" search setting group.

Parameters
-Name
The name of the search setting group to retrieve.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchSearchSettingGroup
Remove-FASTSearchSearchSettingGroup
minutes to read • Edit Online

Get-FASTSearchSecurityAliaser
In ths Article

Gets a security principal aliaser.

Syntax
Get-FASTSearchSecurityAliaser [[-Identity] <String>] [<CommonParameters>]

Description
This cmdlet gets a regular expression or XML principal aliaser. If the Identity parameter is not specified, it gets a list
of all aliasers.
A principal aliaser maps users from one user store into users in other user stores.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityAliaser

This example gets a list of all XML and regular expression principal aliasers.
---------------EXAMPLE 2-----------------

Get-FASTSearchSecurityAliaser -Identity xmlalias4

This example gets the principal aliaser with the ID "xmlalias4".

Parameters
-Identity
The identity of a regular expression or XML aliaser to get.
If not specified, the cmdlet gets a list of all aliasers.
Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-FASTSearchSecurityAliaser
minutes to read • Edit Online

Get-FASTSearchSecurityCCTKServer
In ths Article

Gets the CCTK server general setting.

Syntax
Get-FASTSearchSecurityCCTKServer [<CommonParameters>]

Description
This cmdlet gets the configuration setting for the server that handles CCTK requests.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityCCTKServer

This example retrieves the configuration setting for the server that handles CCTK requests.

Related Links
Set-FASTSearchSecurityCCTKServer
minutes to read • Edit Online

Get-FASTSearchSecurityClaimsUserStore
In ths Article

Get the claims security user store.

Syntax
Get-FASTSearchSecurityClaimsUserStore [[-Identity] <String>] [<CommonParameters>]

Description
This cmdlet retrieves a specific claims user store.
If the Identity parameter is not specified, the cmdlet gets a list of all claims user stores.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityClaimsUserStore -Identity clm

This example retrieves the claims user store with the identity "clm".

Parameters
-Identity
The identity of a claims user store to display.
If an Identity is not specified, all claims user stores are displayed.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-FASTSearchSecurityClaimsUserStore
New -FASTSearchSecurityClaimsUserStore
minutes to read • Edit Online

Get-FASTSearchSecurityCompleteGroupExpansion
In ths Article

Gets complete group expansion information for a user.

Syntax
Get-FASTSearchSecurityCompleteGroupExpansion [-Identity] <String> [-User] <String> [-ExtraProperties]
[[-XmlFile] <String>] [[-Worker] <WorkerPoolNode>] [<CommonParameters>]

Description
This cmdlet gets troubleshooting information for group expansions and aliaser processing performed to create the
user search security filter.
The group expansion information contains the user, expanded groups that contain the user (i.e., the user is a
member of the group), and all groups that contain other expanded groups.
The aliaser procession information contains all mapped to users and groups based on the regular expression and
XML aliaser mapping definitions.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityCompleteGroupExpansion -Identity ln1 -User user1

This example retrieves complete group expansion information for "user1" in the user store "ln1", showing all
equivalent users and groups in all user stores, by finding all parents and processing all aliaser mappings.

Parameters
-ExtraProperties
If specified, the command gets the extra properties for all principals (user and groups) returned by the resolve.

Type: SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Identity
The identity of the user store containing the user to expand.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-User
The user or group identifier to expand.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Worker
The optional Worker parameter specifies the WorkerPoolNode object for the security worker that is to handle the
request.

Type: WorkerPoolNode
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-XmlFile
The absolute path to an XML file which is accessible and writable from the security manager. If specified, complete
expansion information is written as XML to this file.

Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
minutes to read • Edit Online

Get-FASTSearchSecurityDecodedSid
In ths Article

Gets the user identifier and SID from the encoded security identifier.

Syntax
Get-FASTSearchSecurityDecodedSid [-EncodedSID] <String> [<CommonParameters>]

Description
This cmdlet decodes an encoded security identifier (SID ) and returns the user/group identifier (the common name)
and Windows SID.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityDecodedSid -EncodedSID aebaaaaaaaaakiaaaaaccaqaaa

This example retrieves the Windows SID and user or group identifier for an encoded security identifier.

Parameters
-EncodedSID
The encoded extended security identifier that will be decoded.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityEncodedSid
minutes to read • Edit Online

Get-FASTSearchSecurityDefaultUserStore
In ths Article

Gets the default user store general setting.

Syntax
Get-FASTSearchSecurityDefaultUserStore [[-Worker] <WorkerPoolNode>] [<CommonParameters>]

Description
This cmdlet gets the identity of the default user store that users and groups are looked up in. The purpose of the
command is to determine the user's or group's document access if the user store identity is not specified when
looking up the user or group.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityDefaultUserStore

This example gets the identity of the default user store.


---------------EXAMPLE 2-----------------

Get-FASTSearchSecurityWorkerNode workerserver | Get-FASTSearchSecurityDefaultUserStore

This example gets the default user store's general setting information for the security worker with a server name of
"workerserver".

Parameters
-Worker
The optional Worker parameter specifies the WorkerPoolNode object for the security worker that is to handle the
request.
Type: WorkerPoolNode
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-FASTSearchSecurityDefaultUserStore
minutes to read • Edit Online

Get-FASTSearchSecurityEncodedSid
In ths Article

Gets the encoded extended security identifier.

Syntax
Get-FASTSearchSecurityEncodedSid [[-SID] <String>] [[-User] <String>] [<CommonParameters>]

Description
This cmdlet returns a Base64 encoded security identifier for a user, group, or Windows SID (Windows security
identifier).
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityEncodedSid -SID S-1-5-7

This example returns an encoded security identifier and user name for the Windows SID, "5-1-5-7".
---------------EXAMPLE 2-----------------

Get-FASTSearchSecurityEncodedSid -User users

This example returns the encoded security identifier for the Windows built-in "Users" group.

Parameters
-SID
The Windows security identifier to encode.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-User
The user or group identifier to encode.

Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityDecodedSid
minutes to read • Edit Online

Get-FASTSearchSecurityGeneralSettings
In ths Article

Gets the security general settings.

Syntax
Get-FASTSearchSecurityGeneralSettings [[-Worker] <WorkerPoolNode>] [<CommonParameters>]

Description
This cmdlet retrieves configuration information for general security settings, such as:
-- Default user store ID
-- CCTK server port number
-- CCTK server enabled
-- Default log level
-- Log level namespaces
-- Public Filter FQL
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityGeneralSettings | fl

This example retrieves the configuration setting for all the general security settings and formats the information as
a list.

Parameters
-Worker
The optional Worker parameter specifies the WorkerPoolNode object for the security worker that is to handle the
request.
Type: WorkerPoolNode
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-FASTSearchSecurityLogLevel
In ths Article

Gets the log level general setting.

Syntax
Get-FASTSearchSecurityLogLevel [[-Worker] <WorkerPoolNode>] [<CommonParameters>]

Description
This cmdlet retrieves the configuration information for the log level general setting. The log level controls the type
of information that is logged by the security system.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityLogLevel

This example gets the configuration information for the log level's general setting, specifying the data logged by
the security system.

Parameters
-Worker
The optional Worker parameter specifies the WorkerPoolNode object for the security worker that is to handle the
request.

Type: WorkerPoolNode
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-FASTSearchSecurityLogLevel
minutes to read • Edit Online

Get-FASTSearchSecurityLotusNotesUserStore
In ths Article

Gets a Lotus Notes user store.

Syntax
Get-FASTSearchSecurityLotusNotesUserStore [[-Identity] <String>] [<CommonParameters>]

Description
This cmdlet retrieves a specific Lotus Notes user store. If the Identity parameter is not specified, the cmdlet gets a
list of all Lotus Notes user stores.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityLotusNotesUserStore -Identity ln1

This example gets the Lotus Notes user store with the identity "ln1".

Parameters
-Identity
The identity of the Lotus Notes user store to get. If not specified, a list of all Lotus Notes user stores is returned.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchSecurityLotusNotesUserStore
Set-FASTSearchSecurityLotusNotesUserStore
minutes to read • Edit Online

Get-FASTSearchSecurityPublicFilter
In ths Article

Gets the public filter general setting.

Syntax
Get-FASTSearchSecurityPublicFilter [[-Worker] <WorkerPoolNode>] [<CommonParameters>]

Description
This cmdlet retrieves the public filter general setting configuration information. The public filter is the search
security filter that is used to find documents that all users have access to.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityPublicFilter

This example gets the security public filter's general setting configuration information.
---------------EXAMPLE 2-----------------

Get-FASTSearchSecurityWorkerNode workerserver | Get-FASTSearchSecurityPublicFilter

This example gets the security public filter's general setting configuration information for a security worker with the
server name of "workerserver".

Parameters
-Worker
The optional Worker parameter specifies the WorkerPoolNode object for the security worker that is to handle the
request.

Type: WorkerPoolNode
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Related Links
Set-FASTSearchSecurityPublicFilter
minutes to read • Edit Online

Get-FASTSearchSecurityRegexAliaser
In ths Article

Gets a regular expression principal aliaser.

Syntax
Get-FASTSearchSecurityRegexAliaser [[-Identity] <String>] [<CommonParameters>]

Description
This cmdlet retrieves a regular expression aliaser. A regular expression aliaser maps users/groups from one user
store to users/groups in other user stores, based on a regular expression pattern.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityRegexAliaser -Identity regex1

This example retrieves a regular expression aliaser with an identity of "regex1".

Parameters
-Identity

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchSecurityRegexAliaser
Set-FASTSearchSecurityRegexAliaser
New -FASTSearchSecurityRegexAliaserPattern
minutes to read • Edit Online

Get-FASTSearchSecurityUserFilter
In ths Article

Gets a user's search security filter.

Syntax
Get-FASTSearchSecurityUserFilter [-Identity] <String> [-User] <String> [[-Worker] <WorkerPoolNode>]
[<CommonParameters>]

Description
This cmdlet retrieves the user search security filter containing all groups that the user has access to.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityUserFilter -Identity ln1 -User user1

This example gets the search security filter for user "user1" in user store "ln1".

Parameters
-Identity
The identity of the user store containing the user.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-User
The identifier of the user or group.
Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Worker
The optional Worker parameter specifies the WorkerPoolNode object for the security worker that is to handle the
request.

Type: WorkerPoolNode
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-FASTSearchSecurityUserStore
In ths Article

Gets a user store.

Syntax
Get-FASTSearchSecurityUserStore [[-Identity] <String>] [<CommonParameters>]

Description
This cmdlet retrieves a security user store. If the Identity parameter is not specified, it gets a list of all user stores.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityUserStore -Identity ln1

This example gets the user store with an identity of "ln1".


---------------EXAMPLE 2-----------------

Get-FASTSearchSecurityUserStore

This example gets a list of all user stores.

Parameters
-Identity
The identity of the user store to get. If not specified, the cmdlet gets a list of all user stores.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-FASTSearchSecurityUserStore
minutes to read • Edit Online

Get-FASTSearchSecurityUserStoreGroupExpansion
In ths Article

Gets all groups in a user store that the specified user is a member of.

Syntax
Get-FASTSearchSecurityUserStoreGroupExpansion [-Identity] <String> [-User] <String>
[[-Worker] <WorkerPoolNode>] [<CommonParameters>]

Description
This cmdlet gets all the groups in a user store that the user is a member of, and all the groups that any owning
group is a member of.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityUserStoreGroupExpansion -Identity ln1 -User user1

This example gets all the groups in the "ln1" user store that are parents, grand-parents, etc. of the "user1" user.
---------------EXAMPLE 2-----------------

Get-FASTSearchSecurityWorkerNode workerserver | Get-FASTSearchSecurityUserStoreGroupExpansion -Identity ln2 -


User user1

This example gets all the groups in the "ln2" user store from the worker with a server name of "workerserver" that
are parents, grand-parents, etc. of the "user1" user.

Parameters
-Identity
The identity of the user store to look in.
Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-User
The user or group identifier to look up.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Worker
The optional Worker parameter specifies the WorkerPoolNode object for the security worker that is to handle the
request.

Type: WorkerPoolNode
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-FASTSearchSecurityWorkerNode
In ths Article

Gets status information about a security worker or workers.

Syntax
Get-FASTSearchSecurityWorkerNode [[-Identity] <String>] [-Active] [-Dead] [<CommonParameters>]

Description
This cmdlet retrieves the URI and status for a security worker or a group of workers. A security worker is the
Windows service that generates user search security filters. The cmdlet's function changes depending upon the
parameter values:
-- If Identity is specified, the command gets the worker associated with the given URI.
-- If Active is specified, the command gets a list of all active workers.
-- If Dead is specified, the command gets a list of all inactive workers.
-- If none of these parameters are specified, the command returns a list of all workers.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityWorkerNode -Identity localhost

This example gets the status and complete URI for the worker with "localhost" in its URI.
---------------EXAMPLE 2-----------------

Get-FASTSearchSecurityWorkerNode

This example returns a list of all workers, both active and inactive.

Parameters
-Active
If specified, get a list of all active workers.
Type: SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Dead
If specified, get a list of all inactive workers. A worker is "dead" if it does not respond to requests from the security
manager. This may occur if a worker machine goes down, or if there are network problems.

Type: SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Identity
The identity of the worker to get. This is a URI or a partial URI, the server name for example.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-FASTSearchSecurityXMLAliaser
In ths Article

Gets a security principal aliaser.

Syntax
Get-FASTSearchSecurityXMLAliaser [[-Identity] <String>] [<CommonParameters>]

Description
This cmdlet gets a regular expression or XML principal aliaser. If the Identity parameter is not specified, it gets a list
of all aliasers.
A principal aliaser maps users from one user store into users in other user stores.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSecurityAliaser

This example gets a list of all XML and regular expression principal aliasers.
---------------EXAMPLE 2-----------------

Get-FASTSearchSecurityAliaser -Identity xmlalias4

This example gets the principal aliaser with the ID xmlalias4.

Parameters
-Identity
The identity of a regular expression or XML aliaser to get. If not specified, the cmdlet gets a list of all aliasers.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
New -FASTSearchSecurityXMLAliaser
Set-FASTSearchSecurityXMLAliaser
minutes to read • Edit Online

Get-FASTSearchSpelltuningStatus
In ths Article

Retrieves the status of spell tuning.

Syntax
Get-FASTSearchSpelltuningStatus [<CommonParameters>]

Description
This cmdlet returns the status of the automated alignment of the spell checking dictionary with the index; spell
tuning is either active or inactive.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1-----------------

Get-FASTSearchSpelltuningStatus

Related Links
Reset-FASTSearchSpelltuning
Add-FASTSearchSpelltuning
Remove-FASTSearchSpelltuning
minutes to read • Edit Online

Get-ProjectServerLicense
In ths Article

Retrieves the status of the license for Project Server. If the current license is a trial, it will also indicate the expiry
date and if it has expired.

Syntax
Get-ProjectServerLicense [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Retrieves the status of the license for Project Server. If the current license is a trial, it will also indicate the expiry
date and if it has expired.

Examples
Example 1

Get-ProjectServerLicense

Gets the status of the Project Server license and when it was activated.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPAccessServiceApplication
In ths Article

Returns an Access Services application or a collection of Access Services applications.

Syntax
Get-SPAccessServiceApplication [[-Identity] <SPAccessServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPAccessServiceApplication cmdlet retrieves an Access Services application. If an identity is not specified,
the cmdlet returns the collection of Access Services applications that are in the farm. The properties returned from
this cmdlet are read-only. If changes need to be made, use the Set-SPAccessServiceApplication cmdlet. These
changes affect all computers in the farm in which this Access Services application runs.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE 1----------------

Get-SPAccessServiceApplication -identity "MyAccessService"

This example displays an Access Services application named MyAccessService.


------------EXAMPLE 2----------------

Get-SPAccessServiceApplication | where {$_.recordsintablemax -gt 10000}

This example displays every Access Services application that run in the farm, which allows more than 10,000
records in a table.
------------EXAMPLE 3----------------

Get-SPAccessServiceApplication

This example displays every Access Services application in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the Access Services application to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid
SPAccessServiceApplication object.

Type: SPAccessServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPAccessServicesApplication
In ths Article

Gets an Access Services Service Application.

Syntax
Get-SPAccessServicesApplication [[-Identity] <SPServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Returns Access Services service applications available in the farm.

Examples
Example 1

$sa = Get-SPServiceApplication| ?{$_.TypeName -eq 'Access Services Web Service Application'}


Get-SPAccessServicesApplication -Identity $sa

Returns the Access Services application using a service application pipebind.


Example 2

Get-SPAccessServicesApplication -Identity 0d1da6e4-5cd6-4ccf-9ae1-ace2e964223a

Returns the Access Services application with the specified GUID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Must be in the form of a Service Application pipe bind or a GUID.

Type: SPServiceApplicationPipeBind
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPAccessServicesDatabase
In ths Article

Returns an Access Services database.

Syntax
Get-SPAccessServicesDatabase [[-Identity] <AccessServicesDatabasePipeBind>]
[[-ContentDb] <SPContentDatabasePipeBind>] [[-AccessAppsOnly] <Boolean>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Returns an Access Services database.

Examples
Example 1

Get-SPAccessServicesDatabase -Identity https://apps-eec88dc5f597c6.contoso-apps.com/sites/team/accessApp

Using the App Web, this example returns the Access database named 'accessApp'.
Example 2

Get-SPAccessServicesDatabase -ContentDb WSS_Content

This example returns all Access databases associated with sites in the content database, WSS_Content.

Parameters
-AccessAppsOnly
Returns only Access Apps.

Type: Boolean
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ContentDb
The Content Database to return Access Apps from.

Type: SPContentDatabasePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
The URL to the Access App. Must be the App Web URL.

Type: AccessServicesDatabasePipeBind
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Office.Access.Services.PowerShell.AccessServicesDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPContentDatabasePipeBind System.Boolean
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPAccessServicesDatabaseServer
In ths Article

Returns SQL Server instances associated with Access Services.

Syntax
Get-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] -DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> [<CommonParameters>]

Get-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>


[-AssignmentCollection <SPAssignmentCollection>]
[-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind>] [<CommonParameters>]

Description
Returns the SQL Server instances that are available for use with Access Services.

Examples
Example 1

Get-SPAccessServicesDatabaseServer

Returns all SQL Server instances available for use.


Example 2

Get-SPAccessServicesDatabaseServer -DatabaseServer ACCSQL -ServiceContext https://siteUrl -DatabaseServergroup


DEFAULT

Returns the database server ACCSQL from the DEFAULT database server group using the service context from
https://siteUrl.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseServer
Specifies an existing Database Server associated with Access Services.

Type: AccessServicesDatabaseServerPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerGroup
The name of the database server group.

Type: AccessServicesDatabaseServerGroupPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context to retrieve Access Services database server information from.

Type: SPServiceContextPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPAccessServicesDatabaseServerGroup
In ths Article

Returns a database server group.

Syntax
Get-SPAccessServicesDatabaseServerGroup [-ServiceContext] <SPServiceContextPipeBind>
[[-DatabaseServerGroup] <AccessServicesDatabaseServerGroupPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Returns a database server group associated with the given service context.

Examples
Example 1

Get-SPAccessServicesDatabaseServerGroup -ServiceContext http://siteUrl

Returns the database server group associated with the site, http://siteUrl.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseServerGroup
The name of the database server group.
Type: AccessServicesDatabaseServerGroupPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceContext
Specifies the service context to retrieve Access Services database server information from.

Type: SPServiceContextPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.Office.Access.Services.PowerShell.AccessServicesDatabaseServerGroupPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPAccessServicesDatabaseServerGroupMapping
In ths Article

Returns the mapping of the database server group.

Syntax
Get-SPAccessServicesDatabaseServerGroupMapping [-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet shows the current mapping of the database server group associated with a specific service context.

Examples
Example 1

Get-SPAccessServicesDatabaseServerGroupMapping -ServiceContext http://siteUrl

Outputs the database server group associated with the site, http://siteUrl.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context to retrieve Access Services database server information from.

Type: SPServiceContextPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPAlternateURL
In ths Article

Returns all alternate URLs that match a given set of criteria.

Syntax
Get-SPAlternateURL [[-Identity] <SPAlternateUrlPipeBind>] -ResourceName <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Zone <SPUrlZone>] [<CommonParameters>]

Get-SPAlternateURL [[-Identity] <SPAlternateUrlPipeBind>] -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Zone <SPUrlZone>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPAlternateURL cmdlet returns all alternate URLs that match the scope given by either the optional
Identity parameter or by a combination of the optional WebApplication, Zone, or Resource parameters. Each
criterion that is added narrows the scope. If no criteria are specified then all alternate URLs are returned.
If the Identity parameter is used, only the specific matching alternate URL is returned. If no alternate URL with the
given identity exists at the given scope, nothing is returned.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Get-SPAlternateURL -WebApplication https://sitename

This example displays all the alternate URLs on a given Web application.
--------------EXAMPLE 2-----------------

Get-SPAlternateURL -ResourceName "MyResource"

This example displays all the alternate URLs for a given resource.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the alternate URL to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, or a valid URL, in the
form https://server_name.

Type: SPAlternateUrlPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResourceName
Specifies the name of the resource from which to list alternate URLs.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the Web application from which to list alternate URLs.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies one of the five zones with which the alternate URLs is associated.
Must be a valid zone: Default, Intranet, Internet, Extranet, or Custom

Type: SPUrlZone
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPAppAcquisitionConfiguration
In ths Article

Returns app acquisition settings.

Syntax
Get-SPAppAcquisitionConfiguration -SiteSubscription <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPAppAcquisitionConfiguration [-AssignmentCollection <SPAssignmentCollection>]


-WebApplication <SPWebApplicationPipeBind> [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets https://go.microsoft.com/fwlink/?LinkID=187810.
Use the Get-SPAppAcquisitionConfiguration cmdlet to return app acquisition settings from the SharePoint Storeor
App Catalog.

Examples
------------EXAMPLE 1-------

Get-SPAppAcquisitionConfiguration -WebApplication https://localhost

This example returns app acquisition settings for the specified web application.
------------EXAMPLE 2-------

Get-SPAppAcquisitionConfiguration -SiteSubscription https://localhost/sites/SharePointOnlineAdmin

This example returns app acquisition settings for the specified tenant.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the site collection for which app acquisition settings are to be returned.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the web application for which app acquisition settings are to be returned.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPSiteSubscriptionPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Set-SPAppAcquisitionConfiguration
minutes to read • Edit Online

Get-SPAppAutoProvisionConnection
In ths Article

Returns provision connection settings for an app.

Syntax
Get-SPAppAutoProvisionConnection [-AssignmentCollection <SPAssignmentCollection>]
[-ConnectionType <ConnectionTypes>] [-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Description
Use the Get-SPAppAutoProvisionConnection cmdlet to return the provision connection settings for an app.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1----------

Get-SpAppAutoProvisionConnection

This example returns the entire app auto provisioning connection information for the default site subscription.
---------------EXAMPLE 2----------

$subscription = Get-SPSiteSubscription https://Contoso.com


Get-SPAppAutoProvisionConnection -SiteSubscription $subscription -ConnectionType RemoteWebHost

This example returns the remote web host app auto provisioning connection information for the site subscription
for Contoso.com site

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ConnectionType
Specifies the connection type to provision the app.

Type: ConnectionTypes
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the site collection from which to return the provision connection.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPAppAutoProvisionConnection
minutes to read • Edit Online

Get-SPAppDeniedEndpointList
In ths Article

Returns the app-denied endpoint list for the entire farm.

Syntax
Get-SPAppDeniedEndpointList [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAppEndpoint cmdlet to return the app-denied endpoint list for the entire farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE----------

Get-SPAppDeniedEndpoint

This example returns all the app-denied endpoints within the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Clear-SPAppDeniedEndpointList
minutes to read • Edit Online

Get-SPAppDisablingConfiguration
In ths Article

Returns the disable sync list state for an app.

Syntax
Get-SPAppDisablingConfiguration [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAppDisablingConfiguration cmdlet to return the disable sync list state for an app.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE-------

Get-SPAppDisablingConfiguration

This example returns disable list sync state of a pp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Set-SPAppDisablingConfiguration
minutes to read • Edit Online

Get-SPAppDomain
In ths Article

Returns the domain used to host apps.

Syntax
Get-SPAppDomain [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAppDomain cmdlet to return the domain used to host apps in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Get-SPAppDomain

This example returns the domain name that hosts apps in the entire farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPAppDomain
minutes to read • Edit Online

Get-SPAppHostingQuotaConfiguration
In ths Article

Returns the hosting quotas for an app.

Syntax
Get-SPAppHostingQuotaConfiguration [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
-SiteSubscription <SPSiteSubscriptionPipeBind> [<CommonParameters>]

Description
Use the Get-SPAppHostingQuotaConfiguration cmdlet to return the hosting quotas for a specified app by using the
Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
https://go.microsoft.com/fwlink/p/?LinkId=671715.

Examples
--------------EXAMPLE 1---------

Get-SPAppHostingQuotaConfiguration -Identity '586d4a32-98c3-42ce-80be-3c76c10c250c'

This example returns the hosted app quota associated to SiteSubscriptionID "586d4a32-98c3-42ce-80be-
3c76c10c250c".
--------------EXAMPLE 1---------

Get-SPSiteSubscription | Get-SPAppHostingQuotaConfiguration -Identity $_

This example returns the hosted app quota associated for all site subscriptions in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the site subscription from which to get site collections.
The type must be a valid URL, in the form, https://server_name or a valid GUID (for example, 12345678-90ab-
cdef-1234-567890bcdefgh).

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPSiteSubscriptionPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Set-SPAppHostingQuotaConfiguration
minutes to read • Edit Online

Get-SPAppInstance
In ths Article

Returns the metadata for an instance of an app.

Syntax
Get-SPAppInstance -Identity <SPAppInstance> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Get-SPAppInstance -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] -AppInstanceId <Guid>


[<CommonParameters>]

Get-SPAppInstance [-App <SPApp>] [-AssignmentCollection <SPAssignmentCollection>] -Web <SPWebPipeBind>


[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Get-AppInstance cmdlet to get a collection of app instances that are installed on an SPWeb object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE 1-----------

Get-SPAppInstance -Web https://localhost

This example returns a collection if more than one app is installed on https://localhost. If only one app is installed, a
single object is returned.
-----------EXAMPLE 2-----------

Get-SPAppInstance -AppInstanceId $instance.Id

This example returns the ID of an instance of an app.

Parameters
-App
Specifies the App.
This parameter returns metadata for all instances of an app.

Type: SPApp
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppInstanceId
Specifies the App Instance ID to display.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the App instance for which to find metadata.

Type: SPAppInstance
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Sets the query scope to a site.
Subsites are not included.
Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Web
Specifies the SPWeb object.

Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Restart-SPAppInstanceJobs
Uninstall-SPAppInstance
Update-SPAppInstance
minutes to read • Edit Online

Get-SPAppPrincipal
In ths Article

Displays a specific app principal object.

Syntax
Get-SPAppPrincipal -NameIdentifier <String> -Site <SPWebPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAppPrincipal cmdlet to display a specific app principal object from the SharePoint app registry.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE--------

Get-SPAppPrincipal -NameIdentifier "00000003-0000-0ff1-ce00-000000000000@f686d426-8d16-42db-81b7-cb578e110ccd"

This example returns the app principal for a specified ID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NameIdentifier
Specifies the app principal's name identifier to search for.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site

Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Register-SPAppPrincipal
minutes to read • Edit Online

Get-SPAppScaleProfile
In ths Article

Returns settings for an app profile.

Syntax
Get-SPAppScaleProfile [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAppScaleProfile cmdlet to return settings for an app profile.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Get-SPAppScaleProfile

This example returns the farm level app scale profile.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPAppScaleProfile
minutes to read • Edit Online

Get-SPAppSiteSubscriptionName
In ths Article

Returns the name of the specified site subscription.

Syntax
Get-SPAppSiteSubscriptionName [-AssignmentCollection <SPAssignmentCollection>]
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Description
Use the Get-SPAppSiteSubscriptionName cmdlet to return the name of the specified site subscription.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE 1-------

Get-SPAppSiteSubscriptionName

This example returns the name of the default site subscription.


------------EXAMPLE 2-------

Get-SPAppSiteSubscriptionName -SiteSubscription https://www.contoso.com

This example returns the name of the site subscription for SPSite https://www.contoso.com

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the SPSiteSubscription object or the SPSiteSubscription Id or the URL of an SPSite. If this parameter is
not specified, then the default site subscription is used. All SharePoint SPSites are members of the default site
subscription if they have not been specifically assigned a site subscription.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPAppSiteSubscriptionName
minutes to read • Edit Online

Get-SPAppStateSyncLastRunTime
In ths Article

Returns the latest time the app state update job was invoked.

Syntax
Get-SPAppStateSyncLastRunTime [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAppStateSyncLastRunTime cmdlet to return the latest time the app state update job was invoked.
The app state update job updates the app states in SharePoint from the marketplace including app updates.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE------------

Get-SPAppStateSyncLastRunTime

This example returns the latest time the app state update job was invoked.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPAppStateUpdateInterval
In ths Article

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

Syntax
Get-SPAppStateUpdateInterval [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAppStateUpdateInterval cmdlet to return the interval in hours between updates of the app state
update job. The app state update job updates the app states, including app updates, in SharePoint based on
information in the SharePoint Store.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE-------

Get-SPAppStateUpdateInterval

This example returns the app state update timer job invocation interval in hours.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Related Links
Set-SPAppStateUpdateInterval
minutes to read • Edit Online

Get-SPAppStoreConfiguration
In ths Article

Returns app SharePoint Store settings.

Syntax
Get-SPAppStoreConfiguration [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAppStoreConfiguration cmdlet to return all apps and their associated SharePoint Store settings.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE-------

Get-SPAppStoreConfiguration

This example returns the settings for all of the apps.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Set-SPAppStoreConfiguration
minutes to read • Edit Online

Get-SPAppStoreWebServiceConfiguration
In ths Article

Returns properties of a SharePoint Store app.

Syntax
Get-SPAppStoreWebServiceConfiguration [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAppStoreWebServiceConfiguration cmdlet to return property settings or SharePoint Store apps.
This cmdlet is not intended for the IT Pro audience.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
https://go.microsoft.com/fwlink/p/?LinkId=671715.

Examples
Example 1

Get-SPAppStoreWebServiceConfiguration

This example returns the product type and version for a SharePoint Store app.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPAuthenticationProvider
In ths Article

Returns an authentication provider.

Syntax
Get-SPAuthenticationProvider [[-Identity] <SPAuthenticationProviderPipeBind>]
[-WebApplication] <SPWebApplicationPipeBind> [-Zone] <SPUrlZone>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPAuthenticationProvider cmdlet returns an authentication provider on a specified Web application zone.
The following are the standard authentication providers available for SharePoint Products: NTLM, Classic NTLM,
Negotiate, and Classic Negotiate.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE 1-----------------

Get-SPAuthenticationProvider -WebApplication https://webAppUrl -Zone Default

This example retrieves the authentication provider in the Default zone of the Web Application 'https://webAppUrl'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the authentication provider to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint authentication provider (for example, NTLM ); or an instance of a valid SPAuthenticationProvider object.

Type: SPAuthenticationProviderPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Returns the content databases for the specified Web application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies the Web application zone or zones for which to return the authentication provider.
The type must be any one of the valid zones: Default, Intranet, Internet, Extranet, or Custom.

Type: SPUrlZone
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPAuthenticationRealm
In ths Article

Returns the authentication realms.

Syntax
Get-SPAuthenticationRealm [[-ServiceContext] <SPServiceContextPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPAuthenticationRealm cmdlet to display the authentication realms of the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE-------------

Get-SPAuthenticationRealm

This example displays the authentication realms in the entire farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceContext
Specifies the service context for which the realm needs to be displayed. For example, $root.web.

Type: SPServiceContextPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPAuthenticationRealm
minutes to read • Edit Online

Get-SPBackupHistory
In ths Article

Returns a history of backup and restore operations.

Syntax
Get-SPBackupHistory -Directory <String> [-AssignmentCollection <SPAssignmentCollection>] [-ShowBackup]
[-ShowRestore] [<CommonParameters>]

Description
The Get-SPBackupHistory cmdlet reads a history of backup and restore operations that have been run. Specifies
whether you want to display only the backup history, only the restore history, or all of the history.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------

Get-SPBackupHistory -Directory \\file_server\share\Backup

This example returns all farm backup and restore operations that have been run for the \\file_server\share\Backup
directory.
------------------EXAMPLE 2-----------------

Get-SPBackupHistory -Directory C:\Backup -ShowBackup

This example returns all of the farm backup operations that have been run for the C:\Backup directory.
------------------EXAMPLE 3-----------------

(Get-SPBackupHistory -Directory C:\Backup -ShowBackup)[0].SelfId | Restore-SPFarm -Directory C:\Backup -


RestoreMethod overwrite

This example gets all of the farm backup operations that have been run for the C:\Backup directory, finds the most
recent backup, and then passes its backup GUID to the Restore-SPFarm cmdlet. The Restore-SPFarm cmdlet will
then perform an overwrite restore from that backup package.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Directory
Specifies the path where the SharePoint Products backup packages generated from a farm backup have been
stored.
The type must be a valid path in either of the following forms:
C:\folder_name
\\server_name\folder_name

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowBackup
Filters the output so that the history of backup operations only is displayed. If both the ShowBackup and the
ShowRestore parameters are not specified, the history of both backup and restore operations is displayed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowRestore
Filters the output so that the history of restore operations only is displayed. If both the ShowBackup and the
ShowRestore parameters are absent, the history of both backup and restore operations is displayed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPBingMapsBlock
In ths Article

Returns Bing Maps blocked status.

Syntax
Get-SPBingMapsBlock [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPBingMapsBlock cmdlet to return true or false on whether Bing Maps are blocked in all locales. This
cmdlet will return an object, and "BlockBingMapsInAllLocales" property will return True or False.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE-----------

Get-SPBingMapsBlock

This example returns an object, and BlockBingMapsInAllLocales property will return True or False on whether Bing
Maps are blocked in all locales.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Related Links
Set-SPBingMapsBlock
Get-SPBingMapsKey
Set-SPBingMapskey
minutes to read • Edit Online

Get-SPBingMapsKey
In ths Article

Returns the Bing Maps key.

Syntax
Get-SPBingMapsKey [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPBingMapsKey cmdlet to return the current Bing Maps key for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE-----------

Get-SPBingMapsKey

This example returns the Bing Maps key for the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPBingMapskey
minutes to read • Edit Online

Get-SPBrowserCustomerExperienceImprovementProgram
In ths Article

Returns the current opt-in state for the browser Customer Experience Improvement Program.

Syntax
Get-SPBrowserCustomerExperienceImprovementProgram [-Farm] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Get-SPBrowserCustomerExperienceImprovementProgram -SiteSubscription <SPSiteSubscriptionPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPBrowserCustomerExperienceImprovementProgram -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPBrowserCustomerExperienceImprovementProgram cmdlet reads the current opt-in state for the
browser Customer Experience Improvement Program.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Get-SPBrowserCustomerExperienceImprovementProgram -WebApplication https://WebAppexample1

This example returns the current Customer Experience Improvement Program opt-in state for the Web application,
WebAppexample1.
------------------EXAMPLE 2-----------------------

Get-SPSiteSubscription https://SiteSubscription1 | Get-SPBrowserCustomerExperienceImprovementProgram

The following example returns the Customer Experience Improvement Program opt-in state for the site
subscription, SiteSubscription1.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Farm
Specifies that the opt-in state for the farm is returned by this cmdlet.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Returns the opt-in state for the specified site subscription.
The type must be a valid URL, in the form https://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid
SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Returns the opt-in state for the specified SharePoint Web application.
The type must be a valid URL, in the form https://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of SharePoint Web application (for example, MyOfficeApp1); or an instance of
a valid SPWebApplication object.
Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPBusinessDataCatalogEntityNotificationWeb
In ths Article

Returns the entity notification site.

Syntax
Get-SPBusinessDataCatalogEntityNotificationWeb -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPBusinessDataCatalogEntityNotificationWeb cmdlet to return the entity notification site that can
receive and forward external system notifications.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------EXAMPLE-----------

Get-SPBusinessDataCatalogEntityNotificationWeb -ServiceContext "http://contoso"

This example returns the entity notification site for the site collection at http://contoso.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-ServiceContext
Specifies the service context for which the entity notification web has to be returned.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Clear-SPBusinessDataCatalogEntityNotificationWeb
Set-SPBusinessDataCatalogEntityNotificationWeb
minutes to read • Edit Online

Get-SPBusinessDataCatalogMetadataObject
In ths Article

Returns a Business Data Connectivity Metadata Store metadata object.

Syntax
Get-SPBusinessDataCatalogMetadataObject -BdcObjectType <PSBdcObjectType>
-ServiceContext <SPServiceContextPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Name <String>]
[-Namespace <String>] [-ContainingLobSystem <String>] [<CommonParameters>]

Description
The Get-SPBusinessDataCatalogMetadataObject cmdlet reads a Business Data Connectivity Metadata Store
metadata object from a Business Data Connectivity Service application.
Output for this cmdlet can be a series of objects.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
------------------EXAMPLE------------------

Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Model" -Name "ContosoModel" -ServiceConext


http://contoso

This example gets a metadata object of type Model with the name ContosoModel from the Business Data
Connectivity Metadata Store on the given site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BdcObjectType
Specifies the type of the metadata object to return.
The type must be one of the following valid metadata object types: Catalog, Model, LobSystem,
LobSystemInstance, or Entity.

Type: PSBdcObjectType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContainingLobSystem
Specifies the name of the LobSystem.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the metadata object.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Namespace
Specifies the namespace of the metadata object.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context of the Business Data Connectivity Metadata Store metadata object to return.
Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPBusinessDataCatalogThrottleConfig
In ths Article

Returns the throttling configuration for a Business Data Connectivity Service application.

Syntax
Get-SPBusinessDataCatalogThrottleConfig [-FileBacked] -Scope <ThrottleScope> -ThrottleType <ThrottleType>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPBusinessDataCatalogThrottleConfig -Scope <ThrottleScope>


-ServiceApplicationProxy <SPServiceApplicationProxyPipeBind> -ThrottleType <ThrottleType>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPBusinessDataCatalogThrottleConfig cmdlet reads the throttling configuration for a Business Data
Connectivity Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items -ServiceApplicationProxy


$contosoServAppProxy

This example returns the throttling information that is related to database items for the given service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-FileBacked
Requests the throttling configuration for file backed metadata catalogs.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Returns the throttling configuration for the specified the scope.
The type must be one of the following: Wcf, WebService, Database, Global, or Custom.

Type: ThrottleScope
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplicationProxy
Specifies the Business Data Connectivity Service application proxy that contains the throttling configuration to get.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ThrottleType
Returns the throttling configuration for the specified throttle type.
The type must be one of the following: None, Items, Size, Connections, or Timeout.

Type: ThrottleType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPCertificateAuthority
In ths Article

Returns the SharePoint certificate authority (CA).

Syntax
Get-SPCertificateAuthority [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPCertificateAuthority cmdlet returns the SharePoint certificate authority (CA).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPCertificateAuthority

This example gets the certificate authority.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPClaimProvider
In ths Article

Returns a claim provider.

Syntax
Get-SPClaimProvider [[-Identity] <SPClaimProviderPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPClaimProvider cmdlet returns a claim provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPClaimProvider -Identity "MyClaimProvider" | Set-SPClaimProvider -Enabled $false

This example disables the claim provider MyClaimProvider.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the claim provider to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a claim
provider (for example, MyClaimProvider1); or an instance of a valid SPClaimProvider object.

Type: SPClaimProviderPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPClaimProviderManager
In ths Article

Returns a claim provider manager.

Syntax
Get-SPClaimProviderManager [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPClaimProviderManager cmdlet reads a claim provider manager.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE--------

Get-SPClaimProviderManager

This example returns a claim provider manager for the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPClaimTypeEncoding
In ths Article

Returns a list of all the types of claims.

Syntax
Get-SPClaimTypeEncoding [-AssignmentCollection <SPAssignmentCollection>] [-ClaimType <String>]
[-EncodingCharacter <Char>] [<CommonParameters>]

Description
Use the Get-SPClaimTypeEncoding cmdlet to return the following:
-- A list of all the types of claims that are registered in the farm
-- The Unicode character that will be encoded when the SPClaim.ToEncodedString method is invoked
-- The SPClaim.ClaimType property is set to a valid value
For additional information about the SPClaim methods and properties, see
M:Microsoft.SharePoint.Administration.Claims.SPClaim.ToEncodedString and
P:Microsoft.SharePoint.Administration.Claims.SPClaim.ClaimType respectively.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------

Get-SPClaimTypeEncoding

This example returns a list of all types of claima in the farm.


--------------EXAMPLE 2--------

Get-SPClaimTypeEncoding -ClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country"

This example returns a specific claim type by using the ClaimType parameter.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClaimType
Specifies an encoding character that is mapped to a type of input claim.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EncodingCharacter
Specifies a type of claim that is mapped to an input character.

Type: Char
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPClaimTypeEncoding
minutes to read • Edit Online

Get-SPConnectedServiceApplicationInformation
In ths Article

Returns the health of the service application proxy.

Syntax
Get-SPConnectedServiceApplicationInformation [[-ServiceApplicationProxy] <SPServiceApplicationProxyPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPConnectedServiceApplicationInformation cmdlet checks whether the proxy to a service application is in
good health.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
https://go.microsoft.com/fwlink/p/?LinkId=671715.

Examples
Example 1

$validProxy = $false
$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "User Profile Service Application Proxy"}
$proxyHealth = Get-SPConnectedServiceApplicationInformation -ServiceApplicationProxy $proxy
if(($proxyHealth -ne $null) -and ($proxyHealth.ApplicationAddressesState -eq "UpToDate")) {
$validProxy = $true
} else {
$validProxy = $false
}
$validProxy

This example checks the health of the service application proxy server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplicationProxy
Specifies the name of the service application proxy.

Type: SPServiceApplicationProxyPipeBind
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPContentDatabase
In ths Article

Returns one or more content databases.

Syntax
Get-SPContentDatabase [[-Identity] <SPContentDatabasePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-NoStatusFilter] [<CommonParameters>]

Get-SPContentDatabase -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]


[<CommonParameters>]

Get-SPContentDatabase -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-NoStatusFilter] [<CommonParameters>]

Get-SPContentDatabase -DaysSinceLastProfileSync <Int32> [-NoStatusFilter]


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPContentDatabase [-AssignmentCollection <SPAssignmentCollection>] [-ConnectAsUnattachedDatabase]


[-DatabaseCredentials <PSCredential>] -DatabaseName <String> -DatabaseServer <String> [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPContentDatabase cmdlet returns the specified content databases.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE 1------------

Get-SPContentDatabase -WebApplication https://webAppUrl

This example returns all content databases used by the sitename Web application.
----------------EXAMPLE 2------------
Get-SPContentDatabase -Site https://siteUrl

This example returns the content database that contains the site collection at https://siteUrl.
----------------EXAMPLE 3------------

PS C:\>Get-SPContentDatabase -DaysSinceLastProfileSync 7

This example returns all content databases that were last synchronized with the User Profile service 7 or more days
ago. Content databases that were last synchronized with the User Profile service less than 7 days ago would not be
returned.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ConnectAsUnattachedDatabase
Specifies that only unattached databases in the farm are returned.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL Server
Authentication.
The type must be a valid PSCredential object.
Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database in the farm.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the database server in the farm.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DaysSinceLastProfileSync
Specifies the minimum number of days since the User Profile service last synchronized the content database.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies a specific content database to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint content database (for example, SPContentDB1); or an instance of a valid SPContentDatabase object.

Type: SPContentDatabasePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoStatusFilter
Specifies whether a status filter is turned on.
The valid values are True or False. The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Returns the content database for the specified site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Returns the content databases for the specified Web application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPContentDatabaseOrphanedData
In ths Article

Gets orphaned data in content database.

Syntax
Get-SPContentDatabaseOrphanedData [-Identity] <SPContentDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPContentDatabaseOrphanedData to display orphaned objects.

Examples
EXAMPLE 1

Get-SPContentDatabase "WSS_Content" | Get-SPContentDatabaseOrphanedData

This example gets orphan objects in content database named "WSS_Content".

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the GUID of the content database to get.
Type: SPContentDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPContentDeploymentJob
In ths Article

Returns a content deployment job or a collection of content deployment jobs.

Syntax
Get-SPContentDeploymentJob [[-Identity] <SPContentDeploymentJobPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Path <SPContentDeploymentPathPipeBind>]
[<CommonParameters>]

Description
The Get-SPContentDeploymentJob cmdlet reads the specified content deployment job. If the Identity parameter is
not specified, this cmdlet returns the collection of content deployment jobs on the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Get-SPContentDeploymentJob -Identity 'Job 1'

This example returns the content deployment job called Job 1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the content deployment job to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a content
deployment job (for example, DeployJob1); or an instance of a valid SPContentDeploymentJob object.

Type: SPContentDeploymentJobPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path
Specifies that content deployment jobs for only the specified content deployment path are returned.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a content
deployment job (for example; DeployPath1); or an instance of a valid SPContentDeploymentPath object.

Type: SPContentDeploymentPathPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPContentDeploymentPath
In ths Article

Returns a content deployment path or a collection of content deployment paths.

Syntax
Get-SPContentDeploymentPath [[-Identity] <SPContentDeploymentPathPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPContentDeploymentPath cmdlet reads the specified content deployment path. If the Identity parameter
is not specified, this cmdlet returns the collection of content deployment paths on the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE--------------

Get-SPContentDeploymentPath -Identity 'Path 1'

This example returns the content deployment path named Path 1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the content deployment path to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a content
deployment path (for example, DeployPath1); or an instance of a valid SPContentDeploymentJob object.

Type: SPContentDeploymentPathPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPCustomLayoutsPage
In ths Article

Returns a mapping to a custom layout page.

Syntax
Get-SPCustomLayoutsPage -WebApplication <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Identity <SPCustomPage>] [-CompatibilityLevel <Int32>]
[<CommonParameters>]

Description
The Get-SPCustomLayoutsPagecmdlet cmdlet returns a mapping to a custom layout page in a Web application. If
the Identity parameter is not specified, this cmdlet returns the collection of mappings for all custom layout pages.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
------------------EXAMPLE-----------------------

Get-SPCustomLayoutsPage -Identity '_layouts/accessdenied.aspx' -WebApplication 'https://webAppUrl'

This example returns the mapping of the AccessDenied layout page in the Web application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial
CompatibilityLevel value for the site collection. When this parameter is not specified, the CompatibilityLevel will
default to the highest possible version for the web application depending on the CompatibilityRange setting.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the custom layout page to get.
The type must be one of the following: None, AccessDenied, Confirmation, Error, Login, RequestAccess, Signout, or
WebDeleted.

Type: SPCustomPage
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the SharePoint Web application that contains the custom layout page.
The type must be a valid URL, in the form https://webAppUrl; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of SharePoint Web application (for example, MyOfficeApp1); or an instance of
a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPDatabase
In ths Article

Retrieves all properties of a database.

Syntax
Get-SPDatabase [[-Identity] <SPDatabasePipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Get-SPDatabase -ServerInstance <SPDatabaseServiceInstancePipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPDatabase [-AssignmentCollection <SPAssignmentCollection>] -Name <String> [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPDatabase cmdlet displays all public properties of a database to the current window. If the Identity
parameter is specified, only properties of that ID are displayed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

Get-SPDatabase | ?{$_.TypeName -eq 'Microsoft.Office.Server.Administration.ProfileDatabase'}

This example gets the Profile database used by the User Profile Service Application.
--------------------EXAMPLE 2---------------------

Get-SPDatabase -Name 'Profile DB'

This example gets the Profile database by name. Applies to SharePoint Server 2016, SharePoint Server 2019 only.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the name of the database to display public properties.
The type must be a valid GUID, in the form 1234-3456-567kg.

Type: SPDatabasePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the database.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerInstance
Specifies the name of the SQL instance that contains the database in either the form "Server" for a default SQL
instance or "Server\Instance" for a named SQL instance.

Type: SPDatabaseServiceInstancePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPDataConnectionFile
In ths Article

Returns a data connection file or a collection of data connection files.

Syntax
Get-SPDataConnectionFile [[-Identity] <SPDataConnectionFilePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPDataConnectionFile cmdlet gets a specified data connection file or a collection of data connection files.
If the Identity parameter is not specified, the cmdlet returns the collection of data connection files for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1--------------

Get-SPDataConnectionFile

This example lists the Identity, DisplayName, and WebAccessible properties ofeach .udcx file.
---------------EXAMPLE 2--------------

C:\PS>"Sample.udcx" | Get-SPDataConnectionFile

This example lists the Identity, DisplayName, and WebAccessible properties of the specified file, named
Sample.udcx.
---------------EXAMPLE 3--------------

Get-SPDataConnectionFile | where {$_.Category -eq "Category1"}

This example lists the Identity, DisplayName, and WebAccessible properties of all .udcx files with the specified
Category.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the data file connection to get.
The type must be a valid GUID, in form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data
connection file (for example, DataConnectionFileName1.udcx); or an instance of a valid SPDataConnectionFile
object.

Type: SPDataConnectionFilePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPDataConnectionFileDependent
In ths Article

Returns deployed forms on the server dependent on a universal data connection.

Syntax
Get-SPDataConnectionFileDependent [-Identity] <SPDataConnectionFilePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPDataConnectionFileDependent returns all administrator deployed forms that depend on a specified
universal data connection (.udc) file located in the central data connection store.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPDataConnectionFileDependant -Identity 'FileName.udcx'

This example displays a list of deployed forms with a specified name.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the data connection file to get.
The type must be a valid GUID, in form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data
connection file (for example, DataConnectionFileName1.udcx); or an instance of a valid SPDataConnectionFile
object.

Type: SPDataConnectionFilePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPDeletedSite
In ths Article

Gets a list of deleted site collections.

Syntax
Get-SPDeletedSite [-Identity] <SPDeletedSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-ContentDatabase <SPContentDatabasePipeBind>] [-DateTimeFrom <String>] [-DateTimeTo <String>]
[-Limit <String>] [-SiteSubscription <SPSiteSubscriptionPipeBind>]
[-WebApplication <SPWebApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
This cmdlet was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).
Use the Get-SPDeletedSite cmdlet to display a list of deleted site collections by using the Identity parameter. If no
parameter is specified, then all deleted site collections in the farm are displayed. Deleted Sites are sites in the
process of gradual delete. For more information on gradual delete, see Remove-SPSite.
Unlike the Get-SPSite cmdlet that uses the host name and scheme for the Identity parameter (that is,
https://server_name), the value of the identity parameter for all SPDeletedSite cmdlets use a server-relative URL.
Typically, the forward slash character (/) begins the relative URL and also denotes the root site.
For additional information about a server-relative URL or understanding general concepts about absolute and
relative URLs, see Server-relative URL Property (https://msdn.microsoft.com/en-
us/library/microsoft.sharepoint.spsite.serverrelativeurl.aspx) or Understanding Absolute and Relative URL
Addresses (https://msdn.microsoft.com/en-us/library/bb208688(office.12).aspx).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1---------------------

Get-SPDeletedSite -Identity 610857cb-8414-4a89-8bf3-ad3628f6c86c

This example gets a specific deleted site collection by using a site ID.
------------------EXAMPLE 2---------------------
Get-SPDeletedSite "/"

This example gets a deleted site collection from the root site.
------------------EXAMPLE 3---------------------

Get-SPDeletedSite '/Site/cat*'

This example matches a deleted site collection that contains any combination with the string "cat". The asterisk (*)
wildcard character requests a match for multiple characters.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the GUID of the content database from which to list site collections.
The type must be a valid database name in the form SPContentDB01 or a valid GUID, for example, 12345678-
90ab-cdef-1234-567890bcdefgh.
Type: SPContentDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DateTimeFrom
The type must be a valid DateTime format that is culture-specific to the administrative language, such as
2/16/2007 12:15:12 for English-US.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DateTimeTo
The type must be a valid DateTime format that is culture-specific to the administrative language, such as
2/16/2007 12:15:12 for English-US.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the site collection to get.
The identity can be either a valid server-relative URL in the form /sites/site_name or a valid GUID, for example,
12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPDeletedSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Limit
Limits the maximum number of site collections to return. The default value is 1000.
The type must be a valid non-negative number. Specify ALL to return all site collections for the given scope.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SiteSubscription
Specifies the site subscription from which to get site collections.
The type must be a valid URL in the form https://server_name or a valid GUID, for example, 12345678-90ab-cdef-
1234-567890bcdefgh.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the URL, GUID, or name of the Web application from which to list sites.
The type must be a valid URL in the form https://server_name; a valid GUID, for example, 12345678-90ab-cdef-
1234-567890bcdefgh; or the Web application name, for example, WebApplication1212.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPDesignerSettings
In ths Article

Displays SharePoint Designer features.

Syntax
Get-SPDesignerSettings [-WebApplication] <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPDesignerSettings cmdlet determines whether SharePoint Designer features are enabled on the
specified Web application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE------------------------

Get-SPDesignerSettings -webapplication https://contoso

This example retrieves the SharePoint Designer settings for the Web application, https://contoso.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WebApplication
Specifies the Web application in which the settings apply.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPDiagnosticConfig
In ths Article

Retrieves ULS diagnostic configuration values of the farm.

Syntax
Get-SPDiagnosticConfig [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPDiagnoticConfig cmdlet retrieves ULS diagnostic configuration values of the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPDiagnosticConfig

This example returns all diagnostic configuration values.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPDiagnosticsPerformanceCounter
In ths Article

Returns a collection of performance counters.

Syntax
Get-SPDiagnosticsPerformanceCounter [-AssignmentCollection <SPAssignmentCollection>] [-DatabaseServer]
[-WebFrontEnd] [<CommonParameters>]

Description
The Get-SPDiagnosticsPerformanceCounter cmdlet returns the collection of performance counters that are read
and recorded in the usage database. If neither the DatabaseServer or WebFrontEnd parameters are specified, this
cmdlet returns the performance counters on the front end Web servers and database servers in the farm.
To distinguish counters that are collected on database servers and counters that are collected on front end Web
servers, note that counters that are collected on database servers have a Provider Name of job-diagnostics-
performance-counter-sql-provider, and counters that are collected on front end Web servers have a Provider Name
of job-diagnostics-performance-counter-wfe-provider.
The Get-SPDiagnosticsPerformanceCounter cmdlet is only available by using Windows PowerShell. There is no
user interface.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Get-SPDiagnosticsPerformanceCounter

This example gets the performance counter settings for front end Web servers and database servers.
------------------EXAMPLE 2------------------

Get-SPDiagnosticsPerformanceCounter -WebFrontEnd

This example gets the performance counter settings for front end Web servers.
------------------EXAMPLE 3------------------

Get-SPDiagnosticsPerformanceCounter -DatabaseServer
This example gets the performance counter settings for database servers.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseServer
Returns performance counters collected for the database servers in the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebFrontEnd
Returns performance counters collected for the front end Web servers in the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPDiagnosticsProvider
In ths Article

Returns a diagnostics provider.

Syntax
Get-SPDiagnosticsProvider [[-Identity] <SPDiagnosticsProviderPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPDiagnosticsProvider cmdlet reads the specified diagnostics provider. If the Identity parameter is not
specified, this cmdlet returns the collection diagnostics providers in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Get-SPDiagnosticsProvider

This example returns all the diagnostics providers in the farm.


------------------EXAMPLE 2-----------------------

Get-SPDiagnosticsProvider job-diagnostics-event-log-provider

This example returns the event log diagnostics provider.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the diagnostics provider to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
diagnostic provider (for example, DiagnosticsProv1); or an instance of a valid SPDiagnosticsProvider object.

Type: SPDiagnosticsProviderPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPDistributedCacheClientSetting
In ths Article

Returns distributed cache settings from usage.

Syntax
Get-SPDistributedCacheClientSetting [-ContainerType] <SPDistributedCacheContainerType>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPDistributedCacheClientSettings cmdlet to return distributed cache settings from usage. Usage can
be any type of cache that the ContainerType parameter specifies.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE--------

Get-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache

This example returns the Distributed Cache client settings for DistributedLogonTokenCache.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-ContainerType
Specifies the container type to clear.
The valid values are the following:
-DistributedDefaultCache
-DistributedAccessCache
-DistributedActivityFeedCache
-DistributedBouncerCache
-DistributedLogonTokenCache
-DistributedServerToAppServerAccessTokenCache
-DistributedSearchCache
-DistributedSecurityTrimmingCache
-DistributedActivityFeedLMTCache
-DistributedViewStateCache

Type: SPDistributedCacheContainerType
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPDistributedCacheClientSetting
minutes to read • Edit Online

Get-SPEduServiceSetting
In ths Article

Do not use

Syntax
Get-SPEduServiceSetting [-Service] <Services> [-AssignmentCollection <SPAssignmentCollection>]
-Site <SPSitePipeBind> [<CommonParameters>]

Description
Do not use

Examples
Example 1

Do not use

Parameters
-AssignmentCollection
Do not use

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Service
Do not use

Type: Services
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Do not use
Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPSitePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPEnterpriseSearchAdministrationComponent
In ths Article

Returns the administration component for a search service application.

Syntax
Get-SPEnterpriseSearchAdministrationComponent [-AssignmentCollection <SPAssignmentCollection>]
-SearchApplication <SearchServiceApplicationPipeBind> [<CommonParameters>]

Description
The Get-SPEnterpriseSearchAdmininstrationComponent cmdlet retrieves an administration component for a
search service application in order to update or delete it.
For permissions and the most current information about search cmdlets, see the online documentation,
https://go.microsoft.com/fwlink/?LinkId=163185.

Examples
Example 1

$ssa = Get-SPEnterpriseSearchServiceApplication 'Search Service Application'


Get-SPEnterpriseSearchAdministrationComponent -SearchApplication $ssa

This example obtains an object reference to the administration component of a search service application named
Search Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the administration component.
The type must be a valid name (GUID ), in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a
valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPEnterpriseSearchComponent
In ths Article

Retrieves one or all search components in a given search topology.

Syntax
Get-SPEnterpriseSearchComponent [[-Identity] <SearchComponentPipeBind>]
-SearchTopology <SearchTopologyPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [<CommonParameters>]

Description
This cmdlet retrieves the search component with the specified identity from the given search topology. If an identity
is not provided, all search components in the given search topology will be retrieved.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchComponent -SearchTopology '56e6651d-ecdd-4105-bb65-6a83b6155525' -Identity '06e6651d-
ecdd-4105-bb65-6a83b6155525' -SearchApplication $ssa

This example retrieves the search component with the identity 06e6651d-ecdd-4105-bb65-6a83b6155525 from
the search topology with identity 56e6651d-ecdd-4105-bb65-6a83b6155525 in the search service application
referenced by $ssa.
------------------EXAMPLE 2-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchComponent -SearchTopology '56e6651d-ecdd-4105-bb65-6a83b6155525' -SearchApplication $ssa

This example retrieves all search components from the search topology with the identity 56e6651d-ecdd-4105-
bb65-6a83b6155525 in the search service application referenced by $ssa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the identity for a search component.

Type: SearchComponentPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the search topology and search component/search
components.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchTopology
Specifies the search topology from which to retrieve the search component/search components.

Type: SearchTopologyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchContentEnrichmentConfiguration
In ths Article

Returns the content enrichment configuration for the specified search service application.

Syntax
Get-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet returns the ContentEnrichmentConfiguration object for the SearchServiceApplication.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication $ssa

This example retrieves the ContentEnrichmentConfiguration object from the default SearchServiecApplication.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-SearchApplication
Specifies the SearchServiceApplication that contains the ContentEnrichmentConfiguration.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPEnterpriseSearchContentEnrichmentConfiguration
New -SPEnterpriseSearchContentEnrichmentConfiguration
Remove-SPEnterpriseSearchContentEnrichmentConfiguration
minutes to read • Edit Online

Get-SPEnterpriseSearchCrawlContentSource
In ths Article

Returns a crawl content source.

Syntax
Get-SPEnterpriseSearchCrawlContentSource [[-Identity] <ContentSourcePipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchCrawlContentSource cmdlet reads the content source when the rules of content
source are created, updated, or deleted, or reads a CrawlContentSource object when the search functionality is
initially configured and after any new content source is added.
If the Identity parameter is not specified, this cmdlet returns the content source collection for the specified search
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication 'Search Service Application'


Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $ssa -Identity 'Local SharePoint Sites'

This example retrieves the default content source for the search service application, 'Search Service Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the content source to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
ContentSource object (for example, ContentSource1); or an instance of a valid ContentSource object.

Type: ContentSourcePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the content source.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchCrawlCustomConnector
In ths Article

Returns a CustomConnector object type.

Syntax
Get-SPEnterpriseSearchCrawlCustomConnector -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Protocol <String>] [<CommonParameters>]

Description
The Identity parameter displays a custom connector for a specified Web application. If no parameters are specified,
all the objects of the CustomConnector object type are returned.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE----------------------

$ssa = Get-SPEnterpriseSearchServiceApplication 'Search Service Application'


Get-SPEnterpriseSearchCrawlCustomConnector -SearchApplication $ssa -Protocol 'http://'

This example obtains a reference to all custom crawl connectors for the http:// protocol for a search service
application named 'Search Service Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Protocol
Specifies the string version of the protocol for which to return the CustomConnector object, for example, "dctm://"

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the Search application with which the CustomConnector objects are associated.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchCrawlDatabase
In ths Article

Returns a crawl store.

Syntax
Get-SPEnterpriseSearchCrawlDatabase [[-Identity] <CrawlStorePipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchCrawlDatabase cmdlet returns a CrawlStore object for use during configuration and
when a crawl database for a search service application is modified or deleted. A crawl database stores crawl history
data for a search service application.
If the Identity parameter is not specified, this cmdlet returns the crawl database collection for the specified search
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE-------------------

Get-SPEnterpriseSearchCrawlDatabase -SearchApplication 'Search Service Application' -Identity CrawlDB_1

This example gets a reference to the crawl database CrawlDB_1 from the search service application named 'Search
Service Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the crawl database to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
CrawlStore object, in the form CrawlStore1; or an instance of a valid CrawlStore object.

Type: CrawlStorePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl database.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchCrawlExtension
In ths Article

Returns the file types to be included in the content index.

Syntax
Get-SPEnterpriseSearchCrawlExtension [[-Identity] <ExtensionPipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchCrawlExtension cmdlet returns any or all file extensions in the index for a search
application.
Run this cmdlet at the initial search configuration, and after any new IFilter interface is added to read the rule when
you create, update, or delete the extension rule. If the Identity parameter is not specified, this cmdlet returns the
crawl extension collection for the specified search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
Add code example.

$ssa = Get-SPEnterpriseSearchServiceApplication 'Search Service Application'


Get-SPEnterpriseSearchCrawlExtension -Identity 'pdf' -SearchApplication $ssa

This example checks whether the pdf file type is included in the file types to be included in the content index.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the file name extension to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid file name
extension (for example, .xml); or an instance of a valid CrawlExtension object.

Type: ExtensionPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the extension collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchCrawlLogReadPermission
In ths Article

Retrieves the list of users with permission to access the crawl log information.

Syntax
Get-SPEnterpriseSearchCrawlLogReadPermission -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Tenant <Guid>] [<CommonParameters>]

Description
Only the Search Service Application administrator can use the Get-SPEnterpriseSearchCrawlLogReadPermission
cmdlet.
The Search Service Application administrator uses the cmdlet to retrieve a list of users with permission to view the
crawl log information. The administrator can choose to limit this list to users with permission to view crawl log
information from a particular tenant.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------EXAMPLE--------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchCrawlLogReadPermission -SearchApplication $ssa -Tenant '00000000-0000-0000-0000-
000000000001'

This example retrieves a list of users who have permission to view the crawl log information for a tenant with id
'00000000-0000-0000-0000-000000000001' on the search application referenced by $ssa .

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the name of the search application for which to list crawl log permissions. The type must be a valid GUID,
of the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example,
SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Tenant
Specifies that the list of users shall be within the scope of this tenant. The type must be a valid GUID of the form
12345678-90ab-cdef-1234-567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPEnterpriseSearchCrawlLogReadPermission
Remove-SPEnterpriseSearchCrawlLogReadPermission
minutes to read • Edit Online

Get-SPEnterpriseSearchCrawlMapping
In ths Article

Returns a crawl mapping for the search application.

Syntax
Get-SPEnterpriseSearchCrawlMapping [[-Identity] <CrawlMappingPipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchCrawlMapping cmdlet reads a CrawlMapping object when one of the crawl mapping
rules is created, updated, or deleted. Run this cmdlet when the search is initially configured, and when access is
changed through a different mechanism to create the crawl mapping rule; for example, when a rule is changed to
use file:\\ rather than http://.
If the Identity parameter is not specified, this cmdlet returns the crawl mapping collection for the specified search
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------ EXAMPLE ------

$ssa = Get-SPEnterpriseSearchServiceApplication 'Search Service Application'


Get-SPEnterpriseSearchCrawlMapping -SearchApplication $ssa

This example returns the crawl mappings for the search application 'Search Service Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the crawl mapping to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://crawlmap1; or an instance of a valid CrawlMapping object.

Type: CrawlMappingPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl mapping collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchCrawlRule
In ths Article

Accesses crawl rules.

Syntax
Get-SPEnterpriseSearchCrawlRule [[-Identity] <CrawlRulePipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Use the Get-SPEnterpriseSearchCrawlRule cmdlet for a search administrator to run this procedure to retrieve the
crawl rule when the crawl rule is updated or deleted.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication 'Search Service Application'


Get-SPEnterpriseSearchCrawlRule -SearchApplication $ssa -Identity https://webAppUrl

This example uses the Get-SPEnterpriseSearchCrawlRule cmdlet to retrieve a crawl rule.


---------------EXAMPLE 2---------------

$ssa = Get-SPEnterpriseSearchServiceApplication 'Search Service Application'


Get-SPEnterpriseSearchCrawlRule -SearchApplication $searchApp | ?{$_.Path -like '*example*'}

This example returns a list of crawl rules with paths that contain the word example from the search service
application named 'Search Service Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the search crawl rule path.
A valid URL, such as "https://webAppUrl", or an instance of a valid CrawlRule object

Type: CrawlRulePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl rule.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchFileFormat
In ths Article

Retrieves all parseable file formats.

Syntax
Get-SPEnterpriseSearchFileFormat [[-Identity] <DocumentParserFileFormatPipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchFileFormat cmdlet returns the file format information for a given format ID. If no
format ID is provided, the cmdlet returns all the parseable file formats.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE 1-------------

C:\PS>$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchFileFormat -SearchApplication $ssa

This example uses the Get-SPEnterpriseSearchFileFormat to retrieve all parseable file formats in the search service
application referenced by $ssa.
-------------EXAMPLE 2-------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchFileFormat -SearchApplication $ssa -Identity DOCX

This example uses the Get-SPEnterpriseSearchFileFormat cmdlet to retrieve information about the file format
DOCX in the search service application referenced by $ssa .

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the format ID for which to retrieve file format information.

Type: DocumentParserFileFormatPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application for which to retrieve file format information.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchFileFormat
Set-SPEnterpriseSearchFileFormatState
Remove-SPEnterpriseSearchFileFormat
minutes to read • Edit Online

Get-SPEnterpriseSearchHostController
In ths Article

Lists the specified or all search host controllers in the farm.

Syntax
Get-SPEnterpriseSearchHostController [-AssignmentCollection <SPAssignmentCollection>]
[-SearchServiceInstance <SearchServiceInstancePipeBind>] [<CommonParameters>]

Description
This cmdlet lists the specified or all SearchHostControllers in the farm. The SearchHostController is related to the
SearchServiceInstance, where the SearchHostController manages the search components that run on a server, and
maintains a local repository for linguistic dictionaries. The search components retrieve the linguistic dictionaries
from the PrimaryHostController.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Get-SPEnterpriseSearchHostController

This example retrieves a list of all HostControllers in the farm with their status (primary/secondary) and repository
version.
------------------EXAMPLE 2------------------

$ssi = Get-SPEnterpriseSearchServiceInstance -Local


Get-SPEnterpriseSearchHostController -SearchServiceInstance $ssi

This example retrieves the status information for the SearchHostController on the local server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchServiceInstance
The Search Service instance of the server from where the SearchHostController object is returned.

Type: SearchServiceInstancePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchLanguageResourcePhrase
In ths Article

Returns a language resource phrase.

Syntax
Get-SPEnterpriseSearchLanguageResourcePhrase [-AssignmentCollection <SPAssignmentCollection>]
[-Identity <LanguageResourcePhrasePipeBind>] [-Language <String>] [-Mapping <String>]
-Owner <SearchObjectOwner> -SearchApplication <SearchServiceApplicationPipeBind> [-SourceId <Guid>]
[-Type <LanguageResourceType>] [<CommonParameters>]

Description
The Get-SPEnterpriseSearchLanguageResourcePhrase cmdlet reads a LanguageResourcePhrase object when the
language resource phrase is created or deleted.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication 'Search Service Application'


Get-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $ssa -Language 'en-us' -Type
QuerySuggestionBlockList

This example returns all language resource entries for the en-us language in the QuerySuggestionBlockList type.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the language resource phrase to get.
The type must be a string; a valid name of a language resource phrase (for example, LanguageResourcePhrase1);
or an instance of a valid LanguageResourcePhrase object.

Type: LanguageResourcePhrasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Language
Filters to return phrases of a specified source language.
The type must be a valid name of a language; for example, en-us or ja-jp.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mapping
Allows a term or phrase to be mapped to another term or phrase. For example, the nickname "John" could be
mapped to "Jonathan".
This parameter only applies to nicknames and substitutions.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding LanguageResourcePhrase is
created.
The owner must be one of the following valid levels:
Search Service Application
Site Subscription
Site Collection
Site

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the language resources.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SourceId
Identifies the search result source for which the LanguageResourcePhrase applies to.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Filters to return phrases of a specified type.
The type must be one of the following valid types of phrases:
QuerySuggestionBlockList
QuerySuggestionAlwaysSuggest
Nickname
QuerySuggestionSubstitution

Type: LanguageResourceType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchLinguisticComponentsStatus
In ths Article

Returns the status of the linguistic query and document processing components.

Syntax
Get-SPEnterpriseSearchLinguisticComponentsStatus [[-Identity] <LinguisticComponentsStatusPipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
This cmdlet returns an object that represents the operational status of the linguistic query and document
processing components.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SpEnterpriseSearchLinguisticComponentsStatus -SearchApplication $ssa

This example gets the current status of the linguistic query and document processing components from the default
SearchServiceApplication.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
An object that represents the current status of the linguistic components.

Type: LinguisticComponentsStatusPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the linguistic processing components.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPEnterpriseSearchLinguisticComponentsStatus
minutes to read • Edit Online

Get-SPEnterpriseSearchLinksDatabase
In ths Article

Retrieves a reference to a links database.

Syntax
Get-SPEnterpriseSearchLinksDatabase [[-Identity] <LinksStorePipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchLinksDatabase cmdlet returns a LinksStore object for use during configuration and
when a links database for a search service application is modified or deleted. A links database stores query logging
and search analytics data for a search service application. If the Identity parameter is not specified, this cmdlet
returns all links databases for the specified search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------EXAMPLE---------

Get-SPEnterpriseSearchLinksDatabase -Identity LinksDB_1 -SearchApplication 'Search Service Application'

This example gets a reference to the links database LinksDB_1 from the search service application 'Search Service
Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the links database to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
LinksStore object, in the form LinksStore1; or an instance of a valid LinksStore object.

Type: LinksStorePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the links database.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchLinksDatabase
Set-SPEnterpriseSearchLinksDatabase
Remove-SPEnterpriseSearchLinksDatabase
Move-SPEnterpriseSearchLinksDatabases
minutes to read • Edit Online

Get-SPEnterpriseSearchMetadataCategory
In ths Article

Returns a crawled property category.

Syntax
Get-SPEnterpriseSearchMetadataCategory [[-Identity] <CategoryPipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-SiteCollection <Guid>] [-Tenant <Guid>] [<CommonParameters>]

Description
This cmdlet reads a MetadataCategory object when the category is created, updated, or deleted. You should run
this cmdlet when the initial search is configured, and after a new crawled property category is discovered during a
crawl. SPEnterpriseSearchMetadataCategory represents a category in the enterprise search metadata property
schema.
If the Identity parameter is not specified, this cmdlet returns the metadata category collection for the specified
search service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa

This example retrieves the metadata category collection of a search service application for the default search
service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the metadata category to retrieve.
The type must a valid search application name, for example, MetadataCategory1, or an instance of a valid Category
object.

Type: CategoryPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the enterprise search metadata categories.
The type must a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteCollection
Specifies that the metadata categories returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
Specifies that the metadata categories returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchMetadataCrawledProperty
In ths Article

Returns a crawled property.

Syntax
Get-SPEnterpriseSearchMetadataCrawledProperty [-AssignmentCollection <SPAssignmentCollection>]
[-Category <CategoryPipeBind>] [-Limit <String>] [-Name <String>] [-PropSet <Guid>]
-SearchApplication <SearchServiceApplicationPipeBind> [-SiteCollection <Guid>] [-Tenant <Guid>]
[-VariantType <Int32>] [<CommonParameters>]

Description
This cmdlet reads a CrawledProperty object for a crawled property that was created or updated. You should run
this cmdlet when the search functionality is configured for the first time, and after new crawled properties are
discovered during a crawl. If the Name parameter is not specified, this cmdlet returns all crawled properties for the
specified category for the specified search application. If neither the Name nor the Category parameter is specified,
this cmdlet returns all crawled properties for the specified search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa -Identity People
Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Category $cat -Limit 1

This example returns the first crawled property in the PeopleSearch_Scope metadata category for the default
search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Category
Specifies the metadata category of the crawled property to return.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid name of a
metadata category, for example, MetadataCategory1, or an instance of a valid Category object.

Type: CategoryPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Limit
Specifies the maximum number of items to return.
Specify ALL to return all possible results.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the crawled property to retrieve.
The type must be a valid crawled property name, for example "urn:schemas-microsoft-
com:sharepoint:portal:profile:UserName"

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropSet
Specifies to return crawled properties that use the specified property set. A property set belongs to one crawled
property category.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawled property.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteCollection
Specifies that the crawled properties returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
Specifies that the crawled properties returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VariantType
Specifies to return crawled properties that use the specified variant type.
The type must be an integer that specifies the variant data type of the property set.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchMetadataManagedProperty
In ths Article

Returns a managed property.

Syntax
Get-SPEnterpriseSearchMetadataManagedProperty [[-Identity] <ManagedPropertyPipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Limit <String>] [-SiteCollection <Guid>] [-Tenant <Guid>] [<CommonParameters>]

Description
This cmdlet reads a ManagedProperty object for managed properties that are created or updated.
If the Identity parameter is not specified, this cmdlet returns the managed property collection for the specified
search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity UserName

This example retrieves the managed property UserName from the default search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the managed property to retrieve.
The type must be a valid name of metadata property, for example MetadataProperty1, or an instance of a valid
ManagedProperty object.

Type: ManagedPropertyPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Limit
Specifies the maximum number of managed properties to return. Specify ALL to return all possible results.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the managed property collection.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteCollection
Specifies that the managed properties returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
Specifies that the managed properties returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchMetadataMapping
In ths Article

Returns the current status of a managed property mapping.

Syntax
Get-SPEnterpriseSearchMetadataMapping -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-CrawledProperty <CrawledPropertyPipeBind>]
[-ManagedProperty <ManagedPropertyPipeBind>] [-SiteCollection <Guid>] [-Tenant <Guid>] [<CommonParameters>]

Description
This cmdlet reads a Mapping object when a managed property mapping is created, updated, or deleted.
SPEnterpriseSearchMetadataMapping represents a category of a mapping between a managed property and one
or more crawled properties in the enterprise search metadata property schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity UserName
Get-SPEnterpriseSearchMetadataMapping -SearchApplication $ssa -ManagedProperty $mp

This example lists all crawled properties mapped to the managed property UserName for the default search
service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CrawledProperty
Specifies the crawled property from which to return mappings.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid URL in the form
https://server_name, or an instance of a valid CrawledProperty object.

Type: CrawledPropertyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedProperty
Specifies the managed property from which to return mappings.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid name of a
managed property, for example, ManagedProperty1, or an instance of a valid ManagedProperty object.

Type: ManagedPropertyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the metadata mapping.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteCollection
Specifies that the metadata mappings returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
Specifies that the metadata mappings returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchOwner
In ths Article

Retrieves the search object owner.

Syntax
Get-SPEnterpriseSearchOwner [[-Identity] <SearchObjectOwner>] -Level <SearchObjectLevel>
[-AssignmentCollection <SPAssignmentCollection>] [-SPWeb <SPWebPipeBind>] [<CommonParameters>]

Description
The Get-SPEnterpriseSearchOwner cmdlet retrieves the search object owner. Get-SPEnterpriseSearchOwner
provides scoping context to other cmdlets such as SPEnterpriseSearchResultItemType.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------EXAMPLE--------

Get-SPEnterpriseSearchOwner -Level SPSite

This example shows how to retrieve the tenant owner of a search object at the SPSite level.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the search object owner to retrieve.

Type: SearchObjectOwner
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Level
Specifies whether the owner object resides at the SPWeb, SPSite, SPSite Subscription, or SSA level.

Type: SearchObjectLevel
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SPWeb
Specifies the SPWeb or SPSite in which this object resides. It is only needed if Level is equal to SPWeb or SPSite.

Type: SPWebPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchPropertyRule
In ths Article

Returns a property rule instance, which can be used in result item types.

Syntax
Get-SPEnterpriseSearchPropertyRule [-PropertyName] <String> [-Operator] <DefaultOperator>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPEnterpriseSearchPropertyRule cmdlet returns an instance of a property rule, given the specified
condition. The value for the condition is set in a separate step. Such a rule can be used in result item types, to group
the results based on the condition of a result property.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------EXAMPLE--------

$rule = Get-SPEnterpriseSearchPropertyRule -PropertyName 'ContentTypeId' -Operator 'StartsWith'


$rule.AddValue('0x010063C2F478ACC511DFB869B5BFDFD720851252')

This example returns a rule for the property "ContentTypeId", where the condition is that the property shall start
with a specific value.
The second step specifies the value that the property shall start with.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Operator
Specifies the operation to apply to the property, for example "Starts with".

Type: DefaultOperator
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertyName
Specifies the name of the property that the rule concerns.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchPropertyRuleCollection
minutes to read • Edit Online

Get-SPEnterpriseSearchPropertyRuleCollection
In ths Article

Returns the collection of rules that are applied to search results.

Syntax
Get-SPEnterpriseSearchPropertyRuleCollection [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchPropertyRuleCollection cmdlet returns the collection of rules that are applied to
search results. Rules can be added and removed from the rule collection.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------EXAMPLE--------

$rule = Get-SPEnterpriseSearchPropertyRule -PropertyName 'ContentTypeId' -Operator 'StartsWith'


$rule.AddValue('0x010063C2F478ACC511DFB869B5BFDFD720851252')
$ruleCollection = Get-SPEnterpriseSearchPropertyRuleCollection
$ruleCollection.Add($rule)

This example returns a rule for the result property "ContentTypeId", the rule specifies that this property must start
with the value "0x010063C2F478ACC511DFB869B5BFDFD720851252".
Thereafter the example returns the rule collection, and adds the rule to the rule collection.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchPropertyRule
minutes to read • Edit Online

Get-SPEnterpriseSearchQueryAndSiteSettingsService
In ths Article

Returns the search manager service.

Syntax
Get-SPEnterpriseSearchQueryAndSiteSettingsService [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchQueryAndSiteSettingsService cmdlet returns a manager service. A manager service is
the endpoint for the search service application to process queries and site administration requests from the search
service application proxy.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$qssService = Get-SPEnterpriseSearchQUeryAndSiteSettingsService

This example obtains a reference to the query and site settings service.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-
SPEnterpriseSearchQueryAndSiteSettingsServiceInstance
In ths Article

Returns the service manager service instance.

Syntax
Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance
[[-Identity] <SearchQueryAndSiteSettingsServiceInstancePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Local] [<CommonParameters>]

Description
The Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance cmdlet returns the service manager service
instance when a search manager service is started or stopped.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

C:\PS>$qqssSvcInstance = Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance -Local

This example obtain a reference to the query and site setting service instance on the local farm.
------------------EXAMPLE 2------------------

C:\PS>$qssSvcInstance = Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance -Identity myServer

This example obtain a reference to the query and site setting service instance from a specific server name.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the search manager service instance to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid server name on
which search manager service instance runs; or an instance of a valid SearchManagerServiceInstance object.

Type: SearchQueryAndSiteSettingsServiceInstancePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Local
Specifies that the service manager service instance for the current search server is returned.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchQueryAndSiteSettingsServiceProxy
In ths Article

Returns the search manager service proxy.

Syntax
Get-SPEnterpriseSearchQueryAndSiteSettingsServiceProxy [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchQueryAndSiteSettingsServiceProxy cmdlet reads the
SearchQueryAndSiteSettingsServiceProxy object when a search Web service manager service is started or
stopped.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$qssSvcProxy = Get-SPEnterpriseSearchQueryAndSiteSettingsServiceProxy

This example obtains a reference to the query and site settings service proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchQueryAuthority
In ths Article

Returns an authoritative page.

Syntax
Get-SPEnterpriseSearchQueryAuthority [[-Identity] <AuthorityPagePipeBind>] -Owner <SearchObjectOwner>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchQueryAuthority cmdlet reads a QueryAuthority object when the authoritative page is
created or deleted or when the query rank is modified.
If the Identity parameter is not specified, this cmdlet returns the authority page collection for the specified search
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity 'Search Service Application'


Get-SPEnterpriseSearchQueryAuthority -Identity 'https://contoso.com' -SearchApplication $ssa

This example obtains the authoritative page for the URL https://contoso.com from the search service application
named 'Search Service Application'.
------------------EXAMPLE 2------------------

Get-SPEnterpriseSearchQueryAuthority -SearchApplication 'Search Service Application'

This example obtains the collection of query authority pages from a search service application named 'Search
Service Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the query authority to get.
The type must be a valid URL, in the form https://server_name; or an instance of a valid AuthorityPage object.

Type: AuthorityPagePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding Query Authority is created.The
owner must be one of the following valid levels:- Search Service Application- Site Subscription

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the authority page to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchQueryDemoted
In ths Article

Returns a demoted site rule.

Syntax
Get-SPEnterpriseSearchQueryDemoted [[-Identity] <DemotedPipeBind>] -Owner <SearchObjectOwner>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchQueryDemoted cmdlet reads the DemotedSite object when a demoted site rule is
created or deleted, or when the demoted site rule is updated to modify the query rank.
If the Identity parameter is not specified, this cmdlet returns the demoted site rule collection for the specified
search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$demotedRule = Get-SPEnterpriseSearchQueryDemoted -Identity https://somesite.com -SearchApplication 'Search


Service Application'
Remove-SPEnterpriseSearchQueryDemoted -Identity $demotedRule -SearchApplication 'Search Service Application'

This example obtains a reference to a site demotion rule for the URL https://somesite.com, and removes it.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the demoted site rule to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance a valid Demoted object.

Type: DemotedPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding Demoted object is created.The
owner must be one of the following valid levels:- Search Service Application- Site Subscription

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the demoted site rule collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchQueryKeyword
In ths Article

Returns a keyword term.

Syntax
Get-SPEnterpriseSearchQueryKeyword [[-Identity] <KeywordPipeBind>] -Site <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPEnterpriseSearchQueryKeyword cmdlet reads a QueryKeyword object when the keyword rule is
created, updated, or deleted.
If the Identity parameter is not specified, this cmdlet returns the query keyword collection from the specified search
application.
You can use this cmdlet for keywords in site collections that are in SharePoint Server mode. You cannot use this
cmdlet after a site collection is upgraded to SharePoint Server mode because keywords and Best Bets are
automatically migrated to query rules.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPEnterpriseSearchQueryKeyword -Identity Engineering -Site https://myserver/sites/engineering | Set-


SPEnterpriseSearchQueryKeyword -StartDate "12/25/2009" -EndDate "12/24/2010" -Site
https://myserver/sites/engineering

This example gets a reference to the keyword with the term Engineering from the site
https://myserver/sites/engineering and sets the start dates and end dates for the keyword.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the keyword term to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid string that contains
a keyword term (for example, KeywordTerm1); or an instance of a valid Keyword object.

Type: KeywordPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Filters to return keywords with the specified results URL.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchQueryScope
In ths Article

Returns a query results scope.

Syntax
Get-SPEnterpriseSearchQueryScope [[-Identity] <ScopePipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Url <Uri>] [<CommonParameters>]

Description
The Get-SPEnterpriseSearchQueryScope cmdlet reads a QueryScope object when the shared scope is created or
deleted, or when the definition of the shared scope is updated.
If the Identity parameter is not specified, this cmdlet returns the query scope collection from the specified search
application.
In SharePoint Server, result sources provide the functionality that scopes provided in SharePoint Server.
During an upgrade from SharePoint Server, to retain legacy settings, shared scopes are automatically migrated.
However, these scopes are read-only after the migration. This cmdlet can be used to read a shared scope that has
been migrated.
During an upgrade from SharePoint Server, to preserve legacy settings, local scopes are also automatically
migrated when the corresponding sites or site collections are migrated. In a SharePoint Server farm, the scopes of
a site or site collection that is in SharePoint Server mode are read-write, whereas the scopes of a site or site
collection after upgrade to SharePoint Server mode are read-only. This cmdlet can be used to read a migrated local
scope in either situation.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPenterpriseSearchServiceApplication -Identity 'Search service Application'


Get-SPEnterpriseSearchQueryScope -Identity MustCrawl -SearchApplication $ssa | Set-SPEnterpriseSearchQueryScope
-Description "Business critical sites to index" -CompilationType 1 -AlternateResultsPage https://altServer

This example obtains a reference to the scope named MustCrawl on the search application named MySSA, and
changes the description, compilation type, and alternate access URL.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the results scope to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a scope
(for example, Scope1); or an instance of a valid Scope object.

Type: ScopePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the query scope.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Filters to return scopes for the specified results URL.
The type must be a valid URL, in the form https://server_name.
Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchQueryScopeRule
In ths Article

Returns a shared scope rule.

Syntax
Get-SPEnterpriseSearchQueryScopeRule [[-Identity] <ScopeRulePipeBind>] -Scope <ScopePipeBind> [-Url <Uri>]
[-AssignmentCollection <SPAssignmentCollection>] [-SearchApplication <SearchServiceApplicationPipeBind>]
[<CommonParameters>]

Description
The Get-SPEnterpriseSearchQueryScopeRule cmdlet reads a QueryScopeRule object when the shared scope rule
is created, updated, or deleted. SPEnterpriseSearchQueryScopeRule represents a query result scope rule that can
be applied to a scope.
In SharePoint Server, result sources provide the functionality that scopes provided in SharePoint Server.
During an upgrade from SharePoint Server, to retain legacy settings, shared scopes are automatically migrated.
However, these scopes are read-only after the migration. This cmdlet can be used to read a scope rule of a shared
scope that has been migrated.
During an upgrade from SharePoint Server, to preserve legacy settings, local scopes are also automatically
migrated when the corresponding sites or site collections are migrated. In a SharePoint Server farm, the scopes of
a site or site collection that is in SharePoint Server mode are read-write, whereas the scopes of a site or site
collection after upgrade to SharePoint Server mode are read-only. This cmdlet can be used to read a scope rule of a
migrated local scope in either situation.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity 'Search Service Application'


$scope = Get-SPEnterpriseSearchQueryScope -Identity MustCrawl -SearchApplication $ssa
Get-SPEnterpriseSearchQueryScopeRule -Scope $scope -Url https://criticalSite | Set-
SPEnterpriseSearchQueryScopeRule -Url https://criticalSite -UrlScopeRuleType Url

This example gets a reference to a scope rule for the URL https://criticalSite, and sets its rule type to URL.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the scope rule to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a scope
rule (for example, ScopeRule1); or an instance of a valid ScopeRule object.

Type: ScopeRulePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Returns query scope rules for the specified scope.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a scope
(for example, Scope1); or an instance of a valid Scope object.

Type: ScopePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the query scope rule collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Url
The type must be a valid URL, in the form https://server_name.
Returns query scope rules for the specified results URL.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchQuerySpellingCorrection
In ths Article

Returns the object that exposes the Query Spelling Correction (QSC ) configuration.

Syntax
Get-SPEnterpriseSearchQuerySpellingCorrection [[-Identity] <QuerySpellingCorrectionPipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
This cmdlet returns the object that exposes the QSC configuration parameters.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchQuerySpellingCorrection -SearchApplication $ssa

Returns the current configuration for the Query Spelling Correction component for the default search service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies an object that represents the current status for the query spelling correction.

Type: QuerySpellingCorrectionPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the query spelling correction parameters.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchQuerySuggestionCandidates
In ths Article

Returns a list of queries.

Syntax
Get-SPEnterpriseSearchQuerySuggestionCandidates -Owner <SearchObjectOwner>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-SourceId <Guid>] [<CommonParameters>]

Description
Use the Get-SPEnterpriseSearchQuerySuggestionCandidates cmdlet to return a list of popular queries that can be
displayed in a related queries Web Part. The list gives the administrator a chance to review potential queries and
add some of them to the related queries list.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE------------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchQuerySuggestionCandidates -SearchApplication $ssa

This example returns popular search queries by using the search application contained in the variable $searchapp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding LanguageResourcePhrase is
created.
The owner must be one of the following valid levels:
Search Service Application
Site Subscription
Site Collection
Site

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the query topology.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SourceId
Identifies the search result source for which the LanguageResourcePhrase applies to.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchRankingModel
In ths Article

Returns a ranking model.

Syntax
Get-SPEnterpriseSearchRankingModel [[-Identity] <RankingModelPipeBind>] -Owner <SearchObjectOwner>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
This cmdlet reads the RankingModel object when a ranking model is created, removed, or updated.
If the Identity parameter is not specified or the identity does not match any of the ranking models in the collection,
all rank models for the search application are returned.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity 'Search Service Application'


$owner = Get-SPEnterpriseSearchOwner -Level ssa
Get-SPEnterpriseSearchRankingModel -Identity '8f6fd0bc-06f9-43cf-bbab-08c377e083f4' -SearchApplication $ssa -
Owner $owner

This example retrieves the ranking model on the search service application level with the identity 8f6fd0bc-06f9-
43cf-bbab-08c377e083f4 for the search application Search Service Application.
------------------EXAMPLE 2------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"


$owner = Get-SPEnterpriseSearchOwner -Level ssa
Get-SPEnterpriseSearchRankingModel -SearchApplication $ssa -Owner $owner

This example retrieves all ranking models defined on the search service application level for the search application
Search Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the ranking model to retrieve.
The type must be a valid GUID in the form 8f6fd0bc-06f9-43cf-bbab-08c377e083f4, or an instance of a valid
RankingModel object.

Type: RankingModelPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the scope where the ranking model is available. The available scopes are: SSA, Tenant, Site Collection or
Site. A ranking model can be available in multiple scopes.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the ranking model.
The type must be a valid GUID in the form 9bf36458-fc99-4f7b-b060-867e5a63adce, a valid search application
name, for example, SearchApp1, or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchResultItemType
In ths Article

Retrieves result item types.

Syntax
Get-SPEnterpriseSearchResultItemType [[-Identity] <ResultItemTypePipeBind>] -Owner <SearchObjectOwner>
[-AssignmentCollection <SPAssignmentCollection>] [-SearchApplication <SearchServiceApplicationPipeBind>]
[-SearchApplicationProxy <SearchServiceApplicationProxyPipeBind>] [<CommonParameters>]

Description
The Get-SPEnterpriseSearchResultItemType cmdlet retrieves the result item types that exist for the specified
owner.
Result item types enable you to change the look of search results based on the type of result. You start by defining
a collection of rules, which will be evaluated against the properties of results. Then you define the display template
to use for rendering that type of result. Once you have created the result item type, results matching the rules of
the result item type will render using the specified display template.
Example use cases:
Change the look of results for a particular file name extension, for example Word documents.
Change the look of a particular content type in search results.
Change the look of results from a particular author.
Add a result action to results from a particular result source as part of a custom search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------EXAMPLE--------

$ssa = Get-SPEnterpriseSearchServiceApplication
$tenantOwner = Get-SPEnterpriseSearchOwner -Level SPSite
Get-SPEnterpriseSearchResultItemType -Owner $tenantOwner -SearchApplication $ssa

This example retrieves the result item types that are defined for the owner referenced by $tenantowner for the
search application referenced by $ssa.
Although SearchApplication and SearchApplicationProxy are optional parameters, this cmdlet requires use of one
of them.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the result item type to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: ResultItemTypePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the result item type is created.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the name of the search application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplicationProxy
Specifies the proxy of the search application that contains the result item type.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
proxy name (for example, SearchAppProxy1); or an instance of a valid SearchServiceApplicationProxy object.

Type: SearchServiceApplicationProxyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchResultItemType
Set-SPEnterpriseSearchResultItemType
Remove-SPEnterpriseSearchResultItemType
Get-SPEnterpriseSearchOwner
minutes to read • Edit Online

Get-SPEnterpriseSearchResultSource
In ths Article

Retrieves a result source.

Syntax
Get-SPEnterpriseSearchResultSource [[-Identity] <ResultSourcePipeBind>] -Owner <SearchObjectOwner>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
This cmdlet retrieves a result source object.
If the Identity parameter is not specified, this cmdlet returns the result source collection for the specified search
object owner. For permissions and the most current information about Windows PowerShell for SharePoint
Products, see the online documentation at [https://go.microsoft.com/fwlink/p/?LinkId=251831]
(https://go.microsoft.com/fwlink/p/?LinkId=251831).

Examples
-------------- Example 1: Get result source by name --------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity 'Search Service Application'


$owner = Get-SPEnterpriseSearchOwner -Level SSA
Get-SPEnterpriseSearchResultSource -Identity "Local SharePoint Results" -SearchApplication $ssa -Owner $owner

This example retrieves the search service application level result source with the name "Local SharePoint Results".
-------------- Example 2: Get result source by id --------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity 'Search Service Application'


$owner = Get-SPEnterpriseSearchOwner -Level SSA
Get-SPEnterpriseSearchResultSource -Identity 8413cd39-2156-4e00-b54d-11efd9abdB89 -SearchApplication $ssa -
Owner $owner

This example retrieves the search service application level result source with the id 8413cd39-2156-4e00-b54d-
11efd9abdB89.
-------------- Example 3: Get all result sources under SSA --------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity 'Search Service Application'


$owner = Get-SPEnterpriseSearchOwner -Level SSA
Get-SPEnterpriseSearchResultSource -SearchApplication $ssa -Owner $owner

This example retrieves all the search service application level result sources.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the result source to retrieve.
The type must be a valid GUID string, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
result source (for example, "Local SharePoint Results"); or an instance of a valid Source object.
If not specified, the result source collection for the specified search object owner is returned.

Type: ResultSourcePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding result source is available.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name, for example, SearchApp1, or an instance of a valid SearchServiceApplication object.
Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchResultSource
Set-SPEnterpriseSearchResultSource
Remove-SPEnterpriseSearchResultSource
Get-SPEnterpriseSearchOwner
minutes to read • Edit Online

Get-SPEnterpriseSearchSecurityTrimmer
In ths Article

Returns a custom security trimmer.

Syntax
Get-SPEnterpriseSearchSecurityTrimmer [[-Identity] <SecurityTrimmerPipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
This cmdlet returns the SecurityTrimmer. A custom security trimmer trims search results before the results are
returned to the user.
If the Identity parameter is not specified, this cmdlet returns the security trimmer collection for the specified search
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity 'Search Service Application'


Get-SPEnterpriseSearchSecurityTrimmer -SearchApplication $ssa

This example obtains the pluggable security trimmers registered in the search service application MySSA.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the pluggable security trimmer used for the specified search application.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, or an instance of a valid
SecurityTrimmer object.

Type: SecurityTrimmerPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the security trimmer.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name, for example, SearchApp1, or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchService
In ths Article

Returns the search service for the farm.

Syntax
Get-SPEnterpriseSearchService [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet returns the SearchService object when the search service is updated or deleted.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPEnterpriseSearchService

This example obtains a reference to the search service of the current farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchServiceApplication
In ths Article

Returns the search service application for a farm.

Syntax
Get-SPEnterpriseSearchServiceApplication [[-Identity] <SearchServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet retrieves the SearchServiceApplication object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPEnterpriseSearchServiceApplication -Identity 'Search Service Application'

This example obtains a reference to a search service application named 'Search Service Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the search service application to retrieve.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid name of a search
service application (for example, MySearchApp); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchServiceApplicationBackupStore
In ths Article

Retrieves information about the search service application backup files.

Syntax
Get-SPEnterpriseSearchServiceApplicationBackupStore [-BackupFolder] <String> [-Name] <String>
[[-BackupId] <String>] [-UseMostRecent] [-IsVerbose] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet returns information about the search databases and index files in a specified search service application
backup location.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------

Get-SPEnterpriseSearchServiceApplicationBackupStore -BackupFolder \\sample\backup -Name "Search Service


Application" -BackupId 3222ad97-91ad-471f-a764-780ec1f05f74

This example retrieves the backup of the search databases and index files that are located at \\sample\backup with
the backup id 3222ad97-91ad-471f-a764-780ec1f05f74 from the search service application Search Service
Application.
------------------EXAMPLE 2-----------------

Get-SPEnterpriseSearchServiceApplicationBackupStore -BackupFolder \\sample\backup -Name "Search Service


Application" -UseMostRecent

This example retrieves the most recently taken backup of the search databases and index files that are located at
\\sample\backup from the search service application Search Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackupFolder
Specifies the full file path of the backup files.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BackupId
Specifies the GUID of the backup in the referred package.

Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsVerbose
A switch to specify if messages should be printed out when the cmdlet is running.

Type: SwitchParameter
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Specifies the name of the search service application from which to retrieve the related backup information.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseMostRecent
A switch to specify if the most recent backup should be used.

Type: SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchServiceApplicationProxy
In ths Article

Returns the search service application proxy.

Syntax
Get-SPEnterpriseSearchServiceApplicationProxy [[-Identity] <SearchServiceApplicationProxyPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet reads the SearchServiceApplicationProxy object when the search service application proxy is created
updated or deleted. If the Identity parameter is not specified, this cmdlet returns the search service application
proxy collection for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$proxy = Get-SPEnterpriseSearchServiceApplicationProxy -Identity 'Search Service Application Proxy'

This example obtains a reference to a search service application proxy with the name 'Search Service Application
Proxy'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the search service application proxy to retrieve.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a search
service application proxy (for example, SearchServiceAppProxy1); or an instance of a valid
SearchServiceApplicationProxy object.

Type: SearchServiceApplicationProxyPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchServiceInstance
In ths Article

Returns the search service instance for a farm.

Syntax
Get-SPEnterpriseSearchServiceInstance [[-Identity] <SearchServiceInstancePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Local] [<CommonParameters>]

Description
This cmdlet returns the SearchServiceInstance object when the object is created, updated, or deleted.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Get-SPEnterpriseSearchServiceInstance -Local

This example obtains a reference to the local search service instance.


------------------EXAMPLE 2------------------

Get-SPEnterpriseSearchServiceInstance | ?{$_.Server -match 'SP01'}

This example obtains a reference to the search service instance on the SharePoint server named 'SP01'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the search service instance to return.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a query
server (for example, MyQueryServer); or an instance of a valid SearchServiceInstance object.

Type: SearchServiceInstancePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Local
Returns the search service instance for the current search server.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchSiteHitRule
In ths Article

Returns the shared site hit rule.

Syntax
Get-SPEnterpriseSearchSiteHitRule [[-Identity] <SiteHitRulePipeBind>] [-SearchService <SearchServicePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPEnterpriseSearchSiteHitRule cmdlet reads a SiteHitRule object when the site hit rule is created,
updated, or deleted. A SiteHitRule object sets how many crawler sessions (threads) can simultaneously crawl the
given site.
If the Identity parameter is not specified, this cmdlet returns the site hit rule collection for the specified search
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$shRule = Get-SPEnterpriseSearchSiteHitRule -Identity MySiteHitRule

The following example obtains a reference to the site hit rule with the name MySiteHitRule.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the site hit rule to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, or an instance of a valid
SiteHitRule object.

Type: SiteHitRulePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchService
Specifies the search service that hosts the crawler with the specified shared site search rules.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchStatus
In ths Article

Retrieves diagnostics information for the search components.

Syntax
Get-SPEnterpriseSearchStatus -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Component <String>] [-Constellation] [-Detailed]
[-DetailSearchRuntime] [-HealthReport] [-JobStatus] [-Primary] [-Text] [<CommonParameters>]

Description
This cmdlet retrieves diagnostic information for all or specified search components in the active topology of a
Search Service Application.
If you don't specify any of the optional parameters, the cmdlet will retrieve the health status of all the search
components within the Search Service Application. Each search component will have one of the following states:
Active: The search component is running OK
Degraded: The search component is in a status where it cannot perform all operations correctly. The reason for the
degraded status is typically a transient situation related to a restart or network issues.
Failed: The search component is not running. This status indicated that the component cannot perform operations
correctly.
Unknown: The component can't be reached. The reason for the unknown status is typically hardware or
communication issues.
If you have defined more than one Index component for a partition in your search topology, this cmdlet will
indicate which index component that has the Primary role for this partition.
You can use the cmdlet to output the following additional information:
List the status of background activities (batch jobs) initiated by the search components
List the status of background activities (batch jobs) initiated by the search components
List detailed diagnostic information for the index component
Debug information that may be used by Microsoft for detailed issue resolution
If you don't want to iterate over the output in a script, use the Text parameter. If you do not use the Text parameter,
the cmdlet will output a set of objects that have the following properties:
string Name: the name of a search component, a health report item or a constellation property
string State: the status of the search component
string Level: when you are using the HealthReport parameter, this property indicates the importance level of each
health report item (Error, Warning, Info, Verbose)
string Message: additional information that is provided as a text string
ReadOnlyDictionary<string,string>Details: dictionary name/value pairs that provide additional diagnostic
information
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
------------------EXAMPLE 1------------------

Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchStatus -Text

This example retrieves a list that has diagnostics information about all search components of the default Search
Service Application.
------------------EXAMPLE 2------------------

Get-SPEnterpriseSearchStatus -SearchApplication 'Search Service Application' -JobStatus -Text

This example retrieves the background activity job status for the search analytics timer jobs.
------------------EXAMPLE 3------------------

Get-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchStatus -HealthReport -Component


IndexComponent1 -Text

This example retrieves the diagnostic information for the index component named IndexComponent1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Component
Specifies the name of the search component. This parameter is only used in association with the HealthReport and
Primary parameter.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Constellation
Specifies if internal diagnostic information for the search topology should be provided. This parameter should only
be used for debugging.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Detailed
Specifies the level of detail for the HealthReport parameter. When this parameter is used, the cmdlet will also
output verbose diagnostic information.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DetailSearchRuntime
Specifies if internal diagnostic information for the search runtime should be provided. This parameter should only
be used for debugging.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HealthReport
Specifies if diagnostic information for the search component should be provided. When using this parameter, you
must specify the component name using the Component parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobStatus
Specifies if status information for the Search Analytics and Usage Analytics timer jobs should be provided.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Primary
Specifies if the Admin component has the Primary role. When using this parameter, you must specify the
component name using the Component parameter. Returns true if the Admin Component has the Primary role.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the search components.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Text
Specifies if the print output from this cmdlet should be outputted in a format that is convenient for reading. If not
used, this cmdlet outputs a SearchStatusInfo object.
When using this parameter, the output is printed to the console and cannot be piped to a file or another program.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPEnterpriseSearchTopology
In ths Article

Retrieves one or all search topologies that belong to a given search service application.

Syntax
Get-SPEnterpriseSearchTopology [[-Identity] <SearchTopologyPipeBind>]
-SearchApplication <SearchServiceApplicationPipeBind> [-Active]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet retrieves a given search topology, the active search topology, or all search topologies that belong to a
given search service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchTopology -SearchApplication $ssa

This example retrieves all search topologies of the search service application referenced by $ssa.
------------------EXAMPLE 2------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active

This example retrieves the active search topology of the search service application referenced by $ssa.
------------------EXAMPLE 3------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Identity '10fa59cb-4b32-4fe6-8f8d-065388df201e'

This example retrieves search topology with the identity 10fa59cb-4b32-4fe6-8f8d-065388df201e of the search
service application referenced by $ssa.

Parameters
-Active
Specifies that the active search topology should be returned.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the search topology to retrieve.

Type: SearchTopologyPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application to which the search topology belongs.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchTopology
Set-SPEnterpriseSearchTopology
Remove-SPEnterpriseSearchTopology
minutes to read • Edit Online

Get-SPEnterpriseSearchVssDataPath
In ths Article

Retrieves the index paths for all active search index components on the current server.

Syntax
Get-SPEnterpriseSearchVssDataPath [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet retrieves the index paths for all active index components on the current server. This list is required as
input by the Search VSS Writer in order to perform VSS backup of the current server. This cmdlet will typically be
called from a VSS script, and rarely used directly.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

Get-SPEnterpriseSearchVssDataPath

This example gets the index paths for all active index components on the current server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPExcelBIServer
In ths Article

Returns the server ID of the instance of Analysis Services.

Syntax
Get-SPExcelBIServer [[-Identity] <SPExcelBIServerPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [<CommonParameters>]

Description
Use the Get-SPExcelBIServer cmdlet to return the server ID of the instance of Analysis Servicesthat has been
configured as a data model server in Excel Services.

Examples
Example 1

Get-SPExcelBIServer -ExcelServiceApplication 'Excel Service Application'

This example displays the name of the Excel Service application named 'Excel Service Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelFileLocation list
object.The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
Excel Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a
valid SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the ExcelServiceApplication identity.

Type: SPExcelBIServerPipeBind
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Office.Excel.Server.Cmdlet.SPExcelServiceApplicationPipeBind
Microsoft.Office.Excel.Server.Cmdlet.SPExcelBIServerPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPExcelBlockedFileType
In ths Article

Returns a file type or list of file types that are prevented from loading.

Syntax
Get-SPExcelBlockedFileType [[-Identity] <SPExcelBlockedFileTypePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] -ExcelServiceApplication <SPExcelServiceApplicationPipeBind>
[<CommonParameters>]

Description
The Get-SPExcelBlockedFileType cmdlet reads a file type or a list of file types that cannot be loaded in Excel
Services Application. Excel Services Application does not load any files that correspond to a file type in this list.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
Example 1

Get-SPExcelBlockedFileType -ExcelServiceApplication 'Excel Service Application'

This example retrieves all blocked file types for the service application named 'Excel Service Application'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPBlockedExcelFileType list
object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the Excel Services Application Web service application that contains the SPBlockedExcelFileType list
object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelBlockedFileTypePipeBind
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Office.Excel.Server.Cmdlet.SPExcelBlockedFileTypePipeBind
Microsoft.Office.Excel.Server.Cmdlet.SPExcelServiceApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPExcelDataConnectionLibrary
In ths Article

Returns a trusted data connection library or a list of trusted data connection libraries.

Syntax
Get-SPExcelDataConnectionLibrary [[-Identity] <SPExcelDCLPipeBind>]
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPExcelDataConnectionLibrary cmdlet gets a library of data connection files that Excel Services
Application and the Excel client use to connect to an external data source. Excel Services Application loads data
connection files only if they are stored in a data connection library that is in the list of trusted data connection
libraries.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------------

Get-SPExcelserviceapplication -Identity "MyExcelService" | Get-SPExcelDataConnectionLibrary

This example displays all the data connection libraries that connection files can be loaded by an Excel Services
Application Web service application.
--------------EXAMPLE 2--------------

Get-SPExcelserviceapplication -identity "MyExcelService" | Get-SPExcelDataConnectionLibrary | where


{$_.Description.Contains("Sales Cube")}

This example displays all the data connection libraries that have descriptions containing the words Sales Cube from
the specified Excel Services Application Web service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelDataConnectionLibrary
list object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the DataConnectionLibrary object to return. If the identity parameter is not specified, this cmdlet returns
all the data connection libraries that have connection files that can be loaded by Excel Services Application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data
connection library (for example, DataConnectionLib1); a valid URL, in the form https://server_name; or an instance
of a valid SPExcelDCL object.

Type: SPExcelDCLPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPExcelDataProvider
In ths Article

Returns a safe data provider or a list of safe data providers.

Syntax
Get-SPExcelDataProvider -ExcelServiceApplication <SPExcelServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPExcelDataProvider cmdlet reads a safe data provider or a list of safe data providers for an Excel
Services Application. Excel Services Application refreshes external data connections only if the data provider for the
connection is on the list of safe data providers. Excel Services Application includes a set of common data providers
on this list. Therefore, using cmdlets to modify safe data providers is typically done only in custom data connection
scenarios.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE---------------------

Get-SPExcelServiceApplication -Identity "ExcelServices" | Get-SPExcelDataProvider | where {$_.ProviderID -eq


"SQLOLEDB"}

This example displays the data provider with the provider identifier (ID ) SQLOLEDB from the list of data providers
that is on the MyExcelService application. To select a specific provider from the list of safe providers, you must pipe
a where clause that can filter the list of providers.
--------------EXAMPLE--------------

Get-SPExcelDataProvider -ExcelServiceApplication "Excel Services" | format-table

This example displays a list of safe data providers for the specific Excel Services Application Web service
application, and then formats the results of the data providers in a table.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelDataProvider list object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPExcelFileLocation
In ths Article

Returns a trusted file location or a list of trusted file locations.

Syntax
Get-SPExcelFileLocation [[-Identity] <SPExcelFileLocationPipeBind>]
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPExcelFileLocation cmdlet gets locations from which Excel Services Application loads workbooks. Excel
Services Application loads only workbooks that are stored in a trusted file location. Properties of trusted file
locations control how workbooks can be used when loaded by Excel Services Application. Excel Services
Application always enforces the properties that are defined by the trusted file location from which a workbook was
loaded. The properties of the trusted file location to use are determined through comparison of the file path for the
workbook with the address of the trusted file location.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------------

Get-SPExcelServiceApplication -Identity "MyExcelService" | Get-SPExcelFileLocation

This example displays a list of trusted file locations for the Excel Services Application Web service application
named MyExcelService.
--------------EXAMPLE 2--------------

Get-SPExcelServiceApplication -Identity "MyExcelService" | Get-SPExcelFileLocation | Format-list *

This example displays a list of trusted file locations for the Excel Services Application Web service application
named MyExcelService, and then formats the list of properties into a table.
--------------EXAMPLE 3--------------

Get-SPExcelServiceApplication -Identity "MyExcelService" | Get-SPExcelFileLocation | where


{$_.ExternalDataAllowed -ne "None"}

This example displays a list of trusted file locations that allow external data connectivity for the Excel Services
Application Web service application named MyExcelService.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelFileLocation list object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the SPExcelFileLocation object to return. If the Identity parameter is not specified, the cmdlet returns all
the file locations in the specified. Excel Services Application Web service application.
The type must be a valid string that identifies the file location, in the form https://myPortal/myTeam; a valid string
that identifies the path, in the form C:\folder_name; a valid UNC path to a trusted location in the form,
\\computer_name\share; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a
valid SPExcelFileLocation object.

Type: SPExcelFileLocationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPExcelServiceApplication
In ths Article

Returns an SPExcelServiceApplication object.

Syntax
Get-SPExcelServiceApplication [[-Identity] <SPExcelServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPExcelServiceApplication cmdlet retrieves an SPExcelServiceApplication object. If the object returned by
this cmdlet is changed, the change affects all instances of the specified Excel Services Application Web service
application in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------------

Get-SPExcelServiceApplication "MyExcelServices"

This example displays the Excel Services Application Web service application named MyExcelServices.
--------------EXAMPLE 2--------------

Get-SPExcelServiceApplication

This example displays every Excel Services Application Web service application that runs in the farm.
--------------EXAMPLE 3--------------

Get-SPExcelServiceApplication -Identity "MyExcelService" | format-list *

This example displays Excel Services Application Web service application named MyExcelService, and then displays
all of its settings in a list format.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the ExcelServiceApplication object to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPExcelUserDefinedFunction
In ths Article

Returns a user-defined function or a collection of user-defined functions.

Syntax
Get-SPExcelUserDefinedFunction [[-Identity] <SPExcelUDFPipeBind>]
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPExcelUserDefinedFunction cmdlet reads a user-defined function and its properties, or returns the
collection of user-defined functions for an Excel Services Application Web service application. Excel Services
Application uses only user-defined functions that are in the list of user-defined functions. User-defined functions
are managed code assemblies that can be called from an Excel Services Application workbook by using standard
Excel Services Application formula syntax. The assemblies can perform custom logic or other actions, such as
refreshing data. Windows PowerShell cmdlets operate on the entries in the user-defined function list, but do not
operate on the assemblies.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------------

Get-SPExcelServiceApplication -Identity "MyExcelService" | Get-SPExcelUserDefinedFunction -Identity


SampleCompany.SampleApplication.SampleUdf

This example displays the user-defined function named SampleCompany.SampleApplication.SampleUdf from the
list of user-defined functions that is in the Excel Services Application Web service application named
MyExcelService.
--------------EXAMPLE 2--------------

Get-SPExcelServiceApplication | Get-SPExcelUserDefinedFunction | format-list

This example displays every user-defined function for every Excel Services Application Web service application in
the farm, and then displays the results in a list.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelUserDefinedFunction list
object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the UserDefinedFunction object to get. If the Identity parameter is not specified, the cmdlet returns all of
the functions in the user defined functions list.
The type must be a valid name of the code assembly (for example,
SampleCompany.SampleApplication.SampleUdf); or an instance of a valid SPExcelUDF object.

Type: SPExcelUDFPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPFarm
In ths Article

Returns the local SharePoint farm.

Syntax
Get-SPFarm [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPFarm cmdlet returns the local SharePoint farm. No parameters are used.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
C:\PS>$f = Get-SPFarm

This example stores the local farm in a variable.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPFarmConfig
In ths Article

Returns a global property or a collection of global properties for the local farm.

Syntax
Get-SPFarmConfig [-AssignmentCollection <SPAssignmentCollection>] [-ServiceConnectionPoint]
[<CommonParameters>]

Description
The Get-SPFarmConfig cmdlet retrieves global settings for the local farm that are not members of the SPFarm
object. This cmdlet creates a new PSCustomObject object from the collection of properties returned from the local
farm, and then adds this object to the pipeline.
The PSCustomObject object can be read, or modified and passed to the Set-SPFarmConfig cmdlet to change
parameter values.
The properties collected in the PSCustomObject object must be farm-wide settings, and must be configurable only
once for the entire farm.
The parameter name added to the PSCustomObject object must match exactly the input parameter name for the
Set-SPFarmConfig cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
-------------EXAMPLE----------------

$a = Get-SPFarmConfig
$a.AjaxTimeout = 200
$a | Set-SPFarmConfig

This example uses the Get-SPFarmConfig cmdlet to add the Ajax Timeout setting to the PSCustomObject object,
sets the value for Ajax Timeout, and then passes PSCustomObject to the Set-SPFarmConfig cmdlet to change the
Ajax Timeout setting. Ajax Timeout, a farm-wide setting, is a member of the SPWebService object and cannot be
accessed with a Windows PowerShell cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceConnectionPoint
Gets the information stored in the current farm's service connection point in Active Directory.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPFeature
In ths Article

Returns the SharePoint Features based on a given scope.

Syntax
Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Farm] [-Limit <String>] [<CommonParameters>]

Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]


[-Limit <String>] [-Site <SPSitePipeBind>] [-Sandboxed] [<CommonParameters>]

Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]


[-Limit <String>] [-Web <SPWebPipeBind>] [<CommonParameters>]

Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]


[-Limit <String>] [-WebApplication <SPWebApplicationPipeBind>] [<CommonParameters>]

Get-SPFeature [[-Identity] <SPFeatureDefinitionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]


[-Limit <String>] [-CompatibilityLevel <Int32>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set.
You may only use parameters from one parameter set, and you may not combine parameters from different
parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets
https://go.microsoft.com/fwlink/?LinkID=18781.
All parameter sets take the Identity parameter, which can be either the relative path of the SharePoint Feature
(considered the feature name) or the GUID of a Feature definition.

If the Identity parameter is provided, the cmdlets attempt to find the given Feature definition or instance for the
given scope. If no parameters are specified, all installed features are returned.
The Get-SPFeature cmdlet behaves differently at each scope, returning the enabled Features at each level. If no
scope is provided, all installed Features are returned.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
--------------EXAMPLE 1-----------------

Get-SPFeature -Limit ALL | Where-Object {$_.Scope -eq "SITE"}

This example returns a list of all installed SITE scoped Features.


--------------EXAMPLE 2-----------------

Get-SPSite https://somesite | Get-SPWeb -Limit ALL |%{ Get-SPFeature -Web $_ } | Select DisplayName,ID -Unique

This example returns the name and identifier (ID ) of each uniquely enabled Feature on every SPWeb object in the
site collection at https://somesite.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial
CompatibilityLevel value for the site collection. When this parameter is not specified, the CompatibilityLevel will
default to the highest possible version for the web application depending on the CompatibilityRange setting.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Farm
Specifies that if this parameter is used, only enabled farm Features are displayed.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the Feature to retrieve.
The type must be the full or partial name, in the form Feature1, or a GUID, in the form 1234-4567-9879, of the
Feature to get.

Type: SPFeatureDefinitionPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Limit
Limits the display results. If "All" is specified, all Features are displayed.
The type must be a valid number greater than 0. The default value is 200.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Sandboxed
Specifies to retrieve Sandbox features.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the name of the site collection from which to get enabled Features.
The type must be a valid URL for a site collection, in the form https://server_name .

Type: SPSitePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Web
Specifies the URL or GUID of the Web.
The type must be a valid URL, in the form https://server_name , or a GUID, in the form 1234-5678-9876-0987.

Type: SPWebPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the name of the Web application from which to get enabled Features.
The type must be a valid URL to the Web application in the form https://server_name .

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPHealthAnalysisRule
In ths Article

Gets a health analyzer rule.

Syntax
Get-SPHealthAnalysisRule [-Identity] <SPHealthAnalysisRuleInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Get-SPHealthAnalysisRule cmdlet to return a list of a health analyzer rules. To return a specify health
analyzer rule, use the Identity parameter; otherwise, all health analyzer rules will be returned.
The SPHealthAnalysisRule cmdlets were first introduced in the February 2011 Cumulative Update, which is
available for download as follows:
--Description of the SharePoint Foundation Cumulative Update Server Hotfix Package (SharePoint Foundation
server-package) (https://support.microsoft.com/kb/2475880) --Description of the SharePoint Server Cumulative
Update Server Hotfix Package (MOSS server-package (https://support.microsoft.com/kb/2475878)
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE 1---------------------------

Get-SPHealthAnalysisRule -Identity "CustomRule"

This example returns the health analyzer rule named CustomRule.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the name or GUID of the health analyzer rule to get.
The type must be a valid name, an instance of a valid SPHealthAnalysisRule object, or a valid GUID (for example,
12345678-90ab-cdef-1234-567890bcdefgh).

Type: SPHealthAnalysisRuleInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPHelpCollection
In ths Article

Returns Help collection files.

Syntax
Get-SPHelpCollection [-AssignmentCollection <SPAssignmentCollection>] [-Name <String>] [<CommonParameters>]

Description
The Get-SPHelpCollection cmdlet reads the specified Help collection files. If the Name parameter is not specified,
this cmdlet returns all installed Help collection files.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPHelpCollection

This example gets all installed Help collection files.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the Help collection files to get.
The type must be a valid name of a Help collection folder; for example, HelpDocs1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPInfoPathFormsService
In ths Article

Returns the InfoPath Forms Services in SharePoint Server settings that are in the farm.

Syntax
Get-SPInfoPathFormsService [-AssignmentCollection <SPAssignmentCollection>]
[-Identity <SPFormsServicePipeBind>] [<CommonParameters>]

Description
The Get-SPInfoPathFormsService cmdlet reads the settings for the InfoPath Forms Services in SharePoint Server.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE----------------

Get-SPInfoPathFormsService

This example displays the InfoPath Forms Services settings for the entire farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the InfoPath Forms Services settings to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a forms
service (for example, FormsService1); or an instance of a valid SPFormsService object.

Type: SPFormsServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPInfoPathFormTemplate
In ths Article

Returns a InfoPath form template.

Syntax
Get-SPInfoPathFormTemplate [[-Identity] <SPFormTemplatePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPInfoPathFormTemplate cmdlet reads a specific InfoPath form template or the collection of templates. If
the Identity parameter is not specified, the cmdlet returns the collection of InfoPath form templates for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1--------------

Get-SPInfoPathFormTemplate

This example lists the Identity, DisplayName, and FormTemplateStatus property for each admininstrator-deployed
InfoPath form template.
---------------EXAMPLE 2--------------

C:\PS>"SomeFormTemplate.xsn" | Get-SPInfoPathFormTemplate | format-list

This example lists all the properties of the specified InfoPath form template.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the InfoPath form template to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form
template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example,
FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

Type: SPFormTemplatePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPInfoPathUserAgent
In ths Article

Returns a user agent or all the currently defined user agents for the farm.

Syntax
Get-SPInfoPathUserAgent [[-Identity] <SPUserAgentPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPInfoPathUserAgent cmdlet reads the user agent specified in Identity. If the Identity parameter is not
specified, this cmdlet returns the collection of user agents for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPInfoPathUserAgent

This example displays a list of user agents in the entire farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the user agent to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a user
agent (for example, UserAgent1; or an instance of a valid SPUserAgent object.

Type: SPUserAgentPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPInfoPathWebServiceProxy
In ths Article

Returns the Web proxy settings for the Web application.

Syntax
Get-SPInfoPathWebServiceProxy [-Identity] <SPWebServiceProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPInfoPathWebServiceProxy cmdlet reads the Web proxy settings for the SharePoint Web application
specified in Identity.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPInfoPathWebServiceProxy -Identity "https://server_name"

This example displays the Web service proxy settings for a specified Web application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the SharePoint Web application to get.
The type must be a valid URL, in the form https://server_name, or a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh.

Type: SPWebServiceProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPInsightsConfig
In ths Article

Returns the uploader.xml and Microsoft.Office.BigData.DataLoader.exe.config files from the Configuration


database.

Syntax
Get-SPInsightsConfig [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Returns the uploader.xml and Microsoft.Office.BigData.DataLoader.exe.config files from the Configuration
database.

Examples
Example 1

$config = Get-SPInsightsConfig
$xml = $config.UploaderXml
$config.UploaderXml = $xml
$config.Update()
Stop-SPService -Identity "Microsoft SharePoint Insights"
Start-SPService -Identity "Microsoft SharePoint Insights"

This example returns and modifies the config.uploader.xml file. It then restarts the SharePoint Insights service on
all servers in order to commit the changes.
Example 2

$config = Get-SPInsightsConfig
$odlExeConfig = $config.OdlExeConfig
$config.OdlExeConfig = $odlExeConfig
$config.Update()
Stop-SPService -Identity "Microsoft SharePoint Insights"
Start-SPService -Identity "Microsoft SharePoint Insights"

This example returns and modifies the config.uploader.xml file. It then restarts the SharePoint Insights service on
all servers in order to commit the changes.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPInternalAppStateSyncLastRunTime
In ths Article

Returns the latest time the internal app state update job was invoked.

Syntax
Get-SPInternalAppStateSyncLastRunTime [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPInternalAppStateSyncLastRunTime cmdlet to return the latest time the internal app state update
job was invoked. The internal app state update job gets app upgrades from the internal app directory and sets
them on app instances.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE-----------

Get-SPInternalAppStateSyncLastRunTime

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

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPInternalAppStateUpdateInterval
In ths Article

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

Syntax
Get-SPInternalAppStateUpdateInterval [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPInternalAppStateUpdateInterval cmdlet to return the interval in hours between updates of the
internal app state update job. The internal app state update job gets app upgrades from the internal app directory
and sets them on app instances.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE-----------

Get-SPInternalAppStateUpdateInterval

This example returns the interval in hours between updates of the internal app state update job.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Related Links
Set-SPInternalAppStateUpdateInterval
minutes to read • Edit Online

Get-SPIRMSettings
In ths Article

Returns the Information Rights Management (IRM ) settings.

Syntax
Get-SPIRMSettings [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPIRMSettings cmdlet to display IRM settings for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE----------------

Get-SPIRMSettings

This example returns IRM settings for the entire farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPIRMSettings
minutes to read • Edit Online

Get-SPLogEvent
In ths Article

Returns results from a Unified Logging Service (ULS ) trace log.

Syntax
Get-SPLogEvent [-AssignmentCollection <SPAssignmentCollection>] [-AsString] [-ContextKey <String[]>]
[-Directory <String>] [-MinimumLevel <String>] [-EndTime <DateTime>] [-StartTime <DateTime>]
[<CommonParameters>]

Get-SPLogEvent [-AssignmentCollection <SPAssignmentCollection>] [-AsString] [-ContextKey <String[]>]


[-MinimumLevel <String>] [-EndTime <DateTime>] [-File <String>] [-StartTime <DateTime>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPLogEvent cmdlet returns records from a ULS trace log file that match the criteria. If no parameters are
specified, all records from all log files are returned. Use the StartTime and EndTime parameters to filter on a time
range. The use of these parameters is recommended to optimize performance of this cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Get-SPLogEvent -MinimumLevel "Warning"

This example returns all log entries equal to or more severe than Warning from the default log directory.
--------------EXAMPLE 2-----------------

Get-SPLogEvent -Directory "C:\Logs" | Where-Object {$_.Level -eq "Warning"}

This example returns all warning entries from log files in the C:\Logs directory.
--------------EXAMPLE 3-----------------

Get-SPLogEvent -StartTime "12/04/2007 17:00" -EndTime "12/04/2007 18:00"


This example returns error entries that occurred during a particular time range, which is culture-specific to the
United States.
--------------EXAMPLE 4-----------------

Get-SPLogEvent -ContextKey @("UserName" ,"SiteName")

This example returns the contents of the most recent log file and adds the specified context key data.
--------------EXAMPLE 5-----------------

Get-SPLogEvent | Where-Object {$_.Level -eq "Error" -and {$_.Area -eq "SharePoint Foundation "}

This example returns all error entries related to SharePoint Foundation.


--------------EXAMPLE 6-----------------

Get-SPLogEvent -ContextKey @("Name") | %{$_.ToString() + "'t" + $_.Context["Name"]}

This example returns the contents of the log file and adds context data.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AsString
Returns each record as a separate string

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContextKey
Specifies that context data should be added to the results for the specified Context Keys, for example:
-ContextKey @("UserName", "SiteName") .

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Directory
Lists log files from an alternate directory (any directory other than the configured LogLocation directory).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
The type must be a valid DateTime format that is culture-specific to the administrative language, such as
2/16/2007 12:15:12 for English-US.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File
Specifies a specific file to query records from.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinimumLevel
Returns records at or above the specified level. The valid values are Error or Warning.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
The type must be a valid DateTime format that is culture-specific to the administrative language, such as
2/16/2007 12:15:12 for English-US.
Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPLogLevel
In ths Article

Returns a list of objects or diagnostic levels.

Syntax
Get-SPLogLevel [-AssignmentCollection <SPAssignmentCollection>] [-Identity <String[]>] [<CommonParameters>]

Description
The Get-SPLogLevel cmdlet displays a list of objects or diagnostic levels based on the criteria specified. If no
parameter is specified, a list of all diagnostic levels for all categories is returned.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Get-SPLogLevel

This example displays throttle levels for all categories.


--------------EXAMPLE 2-----------------

Get-SPLogLevel -Identity "Category1"

This example displays the throttle level for the Category1 category.
--------------EXAMPLE 3-----------------

C:\PS>"Cat1", "Cat2", "Cat3" | Get-SpLogLevel

This example displays the throttle level for multiple categories.


--------------EXAMPLE 4-----------------

Get-SPLogLevel -Identity "Area:*"

This example displays the throttle level for all categories in one area.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies a valid category name; for example, Backup and Restore, or Administration.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPManagedAccount
In ths Article

Retrieves accounts registered in the configuration database.

Syntax
Get-SPManagedAccount [[-Identity] <SPManagedAccountPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Server <SPServerPipeBind>] [<CommonParameters>]

Get-SPManagedAccount [[-Identity] <SPManagedAccountPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]


[-Service <SPServicePipeBind>] [<CommonParameters>]

Get-SPManagedAccount [[-Identity] <SPManagedAccountPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]


[-WebApplication <SPWebApplicationPipeBind>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPManagedAccount cmdlet returns the managed accounts that match the given scope. The scope can be
any one of the following values: Web application, service, or server.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPManagedAccount

This example displays all the managed accounts in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the full name or partial name of the managed accounts to retrieve.
The type must be a valid account name, in the form Domain\User, or a GUID, in the form 1234-3456-09876.

Type: SPManagedAccountPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Server
Specifies the scope to a server.

Type: SPServerPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Service
Specifies the scope to a service.

Type: SPServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the scope to a Web application.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPManagedPath
In ths Article

Returns all managed paths that match the given criteria.

Syntax
Get-SPManagedPath [[-Identity] <SPPrefixPipeBind>] [-HostHeader]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPManagedPath [[-Identity] <SPPrefixPipeBind>] -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPManagedPath cmdlet returns the SharePoint managed path that matches the provided Identity for
either a Web application, site collection or for all host-named site collections. If an Identity parameter is not
provided, all managed paths for the given scope are returned.
Host-named sites (no matter the Web application in which they are contained) share a single set of managed paths.
Use the HostHeader parameter to return host-named site collections-scoped managed paths.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Get-SPManagedPath -WebApplication https://sitename

This example returns all managed paths for the specified Web application.
--------------EXAMPLE 2-----------------

Get-SPManagedPath -identity "Sites" -HostHeader

This example gets the Sites managed path from the host-named site collections-scoped managed paths.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-HostHeader
If provided, the managed paths returned are for the host-named sites in the farm.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the managed path to return.
The type must be a valid URL, in the https://server_name or a valid GUID (for example, 12345678-90ab-cdef-
1234-567890bcdefgh).

Type: SPPrefixPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the URL or GUID of the Web application from which to get the managed path.
The type must be a valid URL, in the form https://server_name, or a valid GUID (for example, 12345678-90ab-
cdef-1234-567890bcdefgh).

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPMetadataServiceApplication
In ths Article

Returns a managed metadata service application.

Syntax
Get-SPMetadataServiceApplication [-Identity] <SPMetadataServiceCmdletPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPMetadataServiceApplication cmdlet to retrieve a specified managed metadata service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE-----------------

Get-SPMetadataServiceApplication -Identity "ManagedMetadataServiceApp1"

This example retrieves an existing managed metadata service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the managed metadata service application to get.
The type must be a valid GUID or the name of a valid managed metadata service application.

Type: SPMetadataServiceCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPMetadataServiceApplicationProxy
In ths Article

Returns an existing connection to a managed metadata service application, which is also known as a proxy, to the
managed metadata service application.

Syntax
Get-SPMetadataServiceApplicationProxy [-Identity] <SPMetadataServiceProxyCmdletPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPMetadataServiceApplicationProxy cmdlet to get a specified connection to a managed metadata
service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE-------------

Get-SPMetadataServiceApplicationProxy -Identity "MetadataServiceProxy1"

This example retrieves an existing connection to a managed metadata service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the service application proxy to read.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of the
service application proxy (for example, ServiceAppProxy1); or an instance of a valid SPMetadataServiceProxy
object.

Type: SPMetadataServiceProxyCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPMicrofeedOptions
In ths Article

Returns the feed cache settings for the current user profile application.

Syntax
Get-SPMicrofeedOptions [-AssignmentCollection <SPAssignmentCollection>]
-ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Description
Returns the feed cache settings for the current user profile application.

Examples
Example 1

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Get-SPMicrofeedOptions -ProfileServiceApplicationProxy $proxy

This example returns cache feed settings from the specified User Profile Service Application Proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the unique identifier for the proxy.
Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run. This parameter is mandatory in a hosted-environment
and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyPipeBind
Microsoft.SharePoint.PowerShell.SPSiteSubscriptionPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPMobileMessagingAccount
In ths Article

Retrieves mobile messaging accounts for the specified Web application.

Syntax
Get-SPMobileMessagingAccount [[-Identity] <SPMobileMessagingAccountPipeBind>]
-WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPMobileMessagingAccount cmdlet retrieves the specified mobile messaging accounts for the specified
Web application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPMobileMessagingAccount -WebApplication https://sitename

This example retrieves the current mobile account settings information of the Web application https://sitename.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies whether to return either Short Message Service (SMS ) or Multimedia Messaging Service (MMS ) account
information. Valid values are:SMS and MMS. If you do not specify this parameter, account information is returned
for both SMS and MMS.

Type: SPMobileMessagingAccountPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the identity of the Web application to delete. The type must be a valid GUID, in the form 12345678-90ab-
cdef-1234-567890bcdefgh; a valid Web application name (for example, WebApplication1212); or a valid name (for
example, WebApp2423).
You either must specify WebApplication or must use the HostHeader switch and specify the full URL in the Identity
parameter.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPO365LinkSettings
In ths Article

Gets hybrid configurations.

Syntax
Get-SPO365LinkSettings [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPO365LinkSettings cmdlet to display current hybrid configurations in the farm.

Examples
EXAMPLE 1

$gc = Start-SPAssignment
Get-SPO365LinkSettings -AssignmentCollection $gc
Stop-SPAssignment $gc

This example returns all hybrid configurations.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPO365LinkSettings
Test-SPO365LinkSettings
minutes to read • Edit Online

Get-SPODataConnectionSetting
In ths Article

Returns Business Connectivity Services OData connection properties.

Syntax
Get-SPODataConnectionSetting -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Name <String>] [<CommonParameters>]

Description
Use the Get-SPODataConnectionSetting cmdlet to display Business Connectivity Services OData connection
properties for a specified Business Connectivity Services connection.
If the name of the connection is not specified by using the Name parameter, this cmdlet will return the list of the
connections for the specified BDC service context.
This cmdlet applies to an on-premises environment only. You cannot use this command in the SharePoint Online
Management Shell.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPODataConnectionSetting -ServiceContext "http://contoso" -Name "ContosoServiceApp"

This example returns properties of the BCS connection named ContosoServiceApp


-----------------------EXAMPLE 2-----------------------------

Get-SPODataConnectionSetting -ServiceContext "http://contoso"

This example returns a list of BCS connections for the service context named http://contoso

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the Business Connectivity Services connection object.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context which is in the form of an instance of an SPServiceContext object, an
SPSiteAdministration object identifier, or a SPSite object. An example of a service context value is an identifier
from the ID field, a string identifier, a URI, or a string representation of a GUID.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPODataConnectionSetting
Remove-SPODataConnectionSetting
Set-SPODataConnectionSetting
minutes to read • Edit Online

Get-SPODataConnectionSettingMetadata
In ths Article

Returns a Business Data Connectivity service metadata object.

Syntax
Get-SPODataConnectionSettingMetadata -ServiceContext <SPServiceContextPipeBind> -Name <String>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPODataConnectionSettingMetaData cmdlet to return a Business Data Connectivity service metadata
object for a specific Business Connectivity Services service application.
This cmdlet applies to an on-premises environment only. You cannot use this command in the SharePoint Online
Management Shell.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831 (https://go.microsoft.com/fwlink/p/?
LinkId=251831).

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPODataConnectionSettingMetadata -ServiceContext "http://contoso" -Name "ContosoServiceApp"

This example displays metadata properties of BCS connection named ContosoServiceApp

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the Business Connectivity Services connection whose metadata properties the user wants to
see displayed.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context which is in the form of an instance of an SPServiceContext object, an
SPSiteAdministration object identifier, or a SPSite object. An example of a service context value is an identifier
from the ID field, a string identifier, a URI, or a string representation of a GUID.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPODataConnectionSettingMetaData
minutes to read • Edit Online

Get-SPOfficeStoreAppsDefaultActivation
In ths Article

Returns the properties of apps for Office.

Syntax
Get-SPOfficeStoreAppsDefaultActivation -SiteSubscription <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPOfficeStoreAppsDefaultActivation -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Get-SPOfficeStoreAppsDefaultActivation cmdlet to return settings for apps for Office that run in a specific
web application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831 (https://go.microsoft.com/fwlink/p/?
LinkId=251831).

Examples
-----------------------EXAMPLE 1-----------------------------

Get-SPOfficeStoreAppsDefaultActivation -WebApplication https://sphvm-8044

This examples returns the setting for the web application https://sphvm-8044.
-----------------------EXAMPLE 2-----------------------------

Get-SPOfficeStoreAppsDefaultActivation -SiteSubscription efca5b88-b3a3-448d-afbc-ef620f4744f1

This examples returns the Subscription ID setting for the tenant

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the Site Group to which the settings apply.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the URL, GUID, or name of the web application to which the setting applies.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPOfficeStoreAppsDefaultActivation
minutes to read • Edit Online

Get-SPPendingUpgradeActions
In ths Article

Displays pending upgrade actions.

Syntax
Get-SPPendingUpgradeActions [-RootObject] <IUpgradable> [-AssignmentCollection <SPAssignmentCollection>]
[-Recursive] [-SkipSiteUpgradeActionInfo] [<CommonParameters>]

Description
Use the Get-SPPendingUpgradeActions cmdlet to display the current pending upgrade actions for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE-------

Get-SPFarm | Get-SPPendingUpgradeActions -Recursive

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Recursive
Specifies whether to perform the same pending upgrade action checks on each IUpgradable object that occurs
under the RootObject parameter that is specified.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RootObject
Specifies a SharePoint object where you check for which upgrade actions are outstanding for that object based on
its current upgrade status.
This object must be inherited from IUpgradable.

Type: IUpgradable
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SkipSiteUpgradeActionInfo
Specifies to not include pending upgrade actions for all child objects of a content database.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPPerformancePointServiceApplication
In ths Article

Returns a PerformancePoint Service application object and properties.

Syntax
Get-SPPerformancePointServiceApplication [[-Identity] <SPPerformancePointMonitoringServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPPerformancePointServiceApplication cmdlet to read a PerformancePoint Service application object
and properties. If the Identity parameter is not specified, the cmdlet returns the collection of PerformancePoint
Service applications in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE------------------

Get-SPPerformancePointServiceApplication "PPSApp_01"

This example gets a PerformancePoint Service application named PPSApp_01.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the PerformancePoint Service application to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
PerformancePoint Service application (for example, PerfPointApp1); or an instance of a valid
SPPerformancePointMonitoringServiceApplication object.

Type: SPPerformancePointMonitoringServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPPerformancePointServiceApplicationTrustedLocation
In ths Article

Returns a trusted location object and properties for a PerformancePoint Service application.

Syntax
Get-SPPerformancePointServiceApplicationTrustedLocation [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Identity <SPPerformancePointMonitoringServiceApplicationTrustedLocationPipeBind>]
[-ServiceApplication <SPPerformancePointMonitoringServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPPerformancePointMonitoringServiceApplicationTrustedLocation cmdlet to read a trusted location
object and properties. If the Identity parameter is not specified, this cmdlet returns the list of all trusted locations
and their properties for a PerformancePoint Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE----------------------

Get-SPPerformancePointServiceApplication PPSApp_01 | Get-SPPerformancePointServiceApplicationTrustedLocation -


Identity $_.ID | select *

This example retrieves TrustedLocation information for the PPSApp_01 PerformancePoint Service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the trusted location to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid
SPPerformancePointMonitoringServiceApplicationTrustedLocation object.

Type: SPPerformancePointMonitoringServiceApplicationTrustedLocationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplication
Specifies the PerformancePoint Service application that contains the trusted location.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
PerformancePoint Service application (for example, PerfPointApp1); or an instance of a valid
SPPerformancePointMonitoringServiceApplication object.

Type: SPPerformancePointMonitoringServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPPluggableSecurityTrimmer
In ths Article

Gets pluggable security trimmers added to a profile service application proxy.

Syntax
Get-SPPluggableSecurityTrimmer -UserProfileApplicationProxyId <Guid>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPPluggableSecurityTrimmer cmdlet to list the pluggable security trimmers that have been added to a
User Profile service application proxy.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE---------------------

$pr = Get-SPServiceApplicationProxy | ? {$_.TypeName -eq 'User Profile Service Application Proxy'}


Get-SPPluggableSecurityTrimmer -UserProfileApplicationProxyId $pr.Id

This example gets a list of the pluggable security trimmers that are associated with the User Profile service
application proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UserProfileApplicationProxyId
Specifies the ID of the User Profile service application proxy to which the pluggable security trimmers have been
added.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPProcessAccount
In ths Article

Returns a system account or a managed account.

Syntax
Get-SPProcessAccount [-AssignmentCollection <SPAssignmentCollection>] [-LocalService] [<CommonParameters>]

Get-SPProcessAccount [-AssignmentCollection <SPAssignmentCollection>] [-LocalSystem] [<CommonParameters>]

Get-SPProcessAccount [-AssignmentCollection <SPAssignmentCollection>] [-NetworkService] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPProcessAccount cmdlet returns a system account or a managed account and creates the
SPProcessAccountPipeBind object. All operations that can accept an account can accept the
SPProcessAccountPipeBind in place of the SPManagedAccountPipeBind.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Get-SPProcessAccount -NetworkService

This example creates the SPProcessAccountPipeBind type by using the NetworkService account.
------------------EXAMPLE 2-----------------------

Get-SPProcessAccount -NetworkService | New-SPServiceApplicationPool -Account $_

This example creates an SPServiceApplicationPool account by using the NetworkService account returned by the
Get-SPProcessAccount cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LocalService
Returns the LocalService account.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocalSystem
Returns the LocalSystem account.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NetworkService
Returns the NetworkService account.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPProduct
In ths Article

Returns a list of the SharePoint-related products installed in the farm and the versions of all updates installed for
each product.

Syntax
Get-SPProduct [-AssignmentCollection <SPAssignmentCollection>] [-Local] [<CommonParameters>]

Get-SPProduct [-AssignmentCollection <SPAssignmentCollection>] [-Server <SPServerPipeBind>]


[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPProduct cmdlet returns a list of the SharePoint-related products installed in the farm and the versions
of all updates installed for each product. By default this cmdlet returns the list of SharePoint-related products
installed in the farm. Use the Local parameter to get only information about the local server or for a specific server
to get the list, use the Server parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPProduct -Local

This example displays the SharePoint-related products installed on the local server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Local
Returns product and update information for only the local computer. If you use the Local parameter, you cannot use
the Server parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Server
Returns product and update information for a specified server. If you use the Server parameter, you cannot use the
Local parameter.

Type: SPServerPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPProfileLeader
In ths Article

Returns the current company leaders.

Syntax
Get-SPProfileLeader [-ProfileServiceApplicationProxy] <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-SiteSubscription <SPSiteSubscriptionPipeBind>]
[<CommonParameters>]

Description
This cmdlet was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).
Use the Get-SPProfileLeader cmdlet to display the current company leaders.
For additional information about SPProfileLeader cmdlets, see The *-SPProfileLeader Windows PowerShell
cmdlets in SharePoint Server SP1 (https://go.microsoft.com/fwlink/p/?LinkId=226295)
(https://go.microsoft.com/fwlink/p/?LinkId=226295).

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------EXAMPLE-----------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Get-SPProfileLeader -ProfileServiceApplicationProxy $proxy

This example returns a company leader from the specific user profile service application as indicated by the
variable, $upaProxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the name of the User Profile Service Application Proxy to use.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run. This parameter is mandatory in a hosted-environment
and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPProfileServiceApplicationSecurity
In ths Article

Returns permission and identity information.

Syntax
Get-SPProfileServiceApplicationSecurity -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-SiteSubscription <SPSiteSubscriptionPipeBind>]
[-Type <String>] [<CommonParameters>]

Description
Use the Get-SPProfileServiceApplicationSecurity cmdlet to display permission and identity information for the
following User Profile objects:
Read individual My Sites
Use Personal Features
Use Social Features
Create Personal Site
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE--------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


PS Get-SPProfileServiceApplicationSecurity -ProfileServiceApplicationProxy $proxy -Type MySiteReaderACL

This example displays MySite information on UPA Proxy 1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the unique identifier for the proxy.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run. This parameter is mandatory in a hosted-environment
and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Type
Specifies the type of object to display.
The type is any one of the following values:
MySiteReaderACL
MySiteHostReaderACL
UserACL

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPProjectDatabaseQuota
In ths Article

Microsoft internal use only.

Syntax
Get-SPProjectDatabaseQuota -Url <Uri> [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Microsoft internal use only.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
------------ Example 1 --------------------

Parameters
-AssignmentCollection
Microsoft internal use only.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Microsoft internal use only.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPProjectDatabaseUsage
In ths Article

Returns an approximate size, in megabytes (MB ) of the Project Web App data used in the content database.

Syntax
Get-SPProjectDatabaseUsage [-AssignmentCollection <SPAssignmentCollection>] -Url <Uri> [<CommonParameters>]

Description
Returns an approximate size, in megabytes (MB ) of the Project Web App data used in the content database.

Examples
Example 1

Get-SPProjectDatabaseUsage -Url https://contoso.com/sites/pwa

This example shows the size of the Project Web App data in the content data for the Project Web App site at
https://contoso.com/sites/pwa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
The URL of the Project Web App site collection.
Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPProjectEnterpriseProjectTaskSync
In ths Article

Returns whether the task list sync between Project Web App and project sites is enabled or disabled. This cmdlet
returns a value only if the feature has previously been enabled or disabled.

Syntax
Get-SPProjectEnterpriseProjectTaskSync [-AssignmentCollection <SPAssignmentCollection>] -Url <Uri>
[<CommonParameters>]

Description
Returns whether the task list sync between Project Web App and project sites is enabled or disabled. This cmdlet
returns a value only if the feature has previously been enabled or disabled.

Examples
Example 1

Get-SPProjectEnterpriseProjectTaskSync -Url https://contoso/sites/PWA

This example shows the syntax for getting the task sync status for the Project Web App site at
https://contoso/sites/PWA.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
The URL of the PWA site.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPProjectEventServiceSettings
In ths Article

Returns the settings for the Microsoft Project Server Events Service. There is currently only one setting which is the
port that the service listens on for requests.

Syntax
Get-SPProjectEventServiceSettings [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Returns the settings for the Microsoft Project Server Events Service. There is currently only one setting which is the
port that the service listens on for requests.

Examples
Example 1

Get-SPProjectEventServiceSettings

This example shows what port the service is listening on.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPProjectIsEmailNotificationEnabled
In ths Article

Returns the Project Web App site level setting for email notifications. True if notifications is turned on, False
otherwise.

Syntax
Get-SPProjectIsEmailNotificationEnabled [-Url] <Uri> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Returns the Project Web App site level setting for email notifications. True if notifications is turned on, False
otherwise.

Examples
Example 1

Get-SPProjectIsEmailNotificationEnabled -Url https://contoso/sites/pwa

Returns the status of email notifications for the PWA site https://contoso/sites/pwa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
The URL of the Project Web App site.

Type: Uri
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPProjectOdataConfiguration
In ths Article

Returns the settings for how the OData service is configured for an instance of Project Web App.

Syntax
Get-SPProjectOdataConfiguration [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPProjectOdataConfiguration cmdlet returns the settings for how the OData service is configured for an
instance of Project Web App. It returns the current settings for a list of parameters that specify paging, the enabling
of various querying functionality, whether MaxResultsPerCollection has been enabled, and whether verbose errors
are enabled. The cmdlet can also be used to return an itemized list of entities that have an override specified for
their maximum page size.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE 1-----------------------

Get-SPProjectOdataConfiguration

This example returns the OData configuration for the instance of Project Web App.
----------------------EXAMPLE 2-----------------------

C:\PS>(Get-SPProjectOdataConfiguration).EntitySetsWithMaxPAgeSizeOverride

This example returns the list of entities that have the MaxPageSizeOverride option configured.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPProjectPCSSettings
In ths Article

Gets the settings for the Project Calculation Engine on the Project Server.

Syntax
Get-SPProjectPCSSettings [-ServiceApplication <PsiServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPProjectPCSSettings cmdlet lets users read the settings that control the operations of the Project
Calculation Engine on Project Server. The cmdlet requires you to identify the Project Server Service Application.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE-----------------------

Get-SPProjectPCSSettings -sa "Project Service Application"

This example reads the settings for the Project Calculation Engine running on the "Project Service Application"
service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplication
The Project Server Service Application for which the settings are to be read.

Type: PsiServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPProjectPermissionMode
In ths Article

Returns the permission mode for a Project Web App (PWA) instance.

Syntax
Get-SPProjectPermissionMode [-Url] <Uri> [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPProjectPermissionMode cmdlet returns the presently configured permission mode for the provided
PWA instance.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------EXAMPLE 1-------------------

Get-SPProjectPermissionMode -Url https://AppServer/pwa

This example returns the permission mode setting for a PWA instance.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Url
Specifies the URL of the PWA instance for which you want to retrieve the permission mode.
The type must be a valid URL, in the form https://<ServerName>/<PWASite>.

Type: Uri
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPProjectPermissionMode
Invoke-SPProjectActiveDirectoryGroupSync
minutes to read • Edit Online

Get-SPProjectQueueSettings
In ths Article

Returns a list of all Project Server Queue settings and their current values for the specified Project Server Service
Application.

Syntax
Get-SPProjectQueueSettings [-ServiceApplication <PsiServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Returns a list of all Project Server Queue settings and their current values for a specific Project Server Service
Application. Settings returned include the following:
MaxDegreeOfConcurrency
MsgRetryInterval
MsgRetryLimit
SqlRetryInterval
SqlRetryLimit
SqlCommandTimeout
CleanupSuccessAgeLimit
CleanupNonSuccessAgeLimit
PeriodicTasksInterval
QueueTimeout
MaxConnections
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------------EXAMPLE---------------------

Get-SPProjectQueueSettings -ServiceApplication "Project Service Application"

This example retrieves the queue settings for the "Project Service Application" service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplication
Specifies the Project Server service application to target.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefg; a valid name of a Project
Server Service Application (for example, ProjectServiceApp1); or an instance of a valid PsiServiceApplication
object.

Type: PsiServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPProjectWebInstance
In ths Article

Returns an instance of a Project Web App site.

Syntax
Get-SPProjectWebInstance [-ServiceApplication <PsiServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Url <Uri>] [<CommonParameters>]

Description
The Get-SPProjectWebInstance cmdlet returns an instance of a Project Web App site, including the following
information:
ID (GUID )
Service application name
Parent web app
Project Web App URL
Locale identifier (LCID )
Admin account
Project Web App database server
Database name for the Project Web App database
Provisioning status
Report center status
Site ID (GUID )
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE-----------------------

Get-SPProjectWebInstance -Url https://server/pwa

This example returns the properties for a Project Web App instance at https://server/pwa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplication
Specifies the name of the Project Server service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Project
Web App instance (for example, ProjectWebApp1); or an instance of a valid PsiServiceApplication object.

Type: PsiServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the URL of the Project Web App instance to get.
The type must be a valid URL, in the form https://<server_name>/<PWA_name>.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPRequestManagementSettings
In ths Article

Returns a Request Manager object.

Syntax
Get-SPRequestManagementSettings [-Identity] <SPRequestManagementSettingsPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPRequestManagementSettings cmdlet returns a Request Manager object which is base for performing
any request manager management operation.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE-------

Get-SPRequestManagementSettings -Identity

This example returns a request manager object for a specified identity.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the web-application for which a user wants to enable routing or throttling.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPRequestManagementSettings
New -SPRequestManagementRuleCriteria
minutes to read • Edit Online

Get-SPRoutingMachineInfo
In ths Article

Returns all the routing targets.

Syntax
Get-SPRoutingMachineInfo [-RequestManagementSettings] <SPRequestManagementSettingsPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Availability <SPRoutingMachineAvailability>]
[-Name <String>] [<CommonParameters>]

Description
Use the Get-SPRoutingMachineInfo cmdlet to return all the routing targets that are being used by the Request
Manager object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE------------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

Get-SPRoutingMachineInfo -RequestManagementSettings $rm

This example returns a routing target for a specified identity.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Availability
Specifies whether or not the specified computer will be available for routing. If no value is specified, all computers
are returned.
The values for this parameter are filtered based on availability.
The valid values are:
--Available --Unavailable

Type: SPRoutingMachineAvailability
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the computer for which you want to return routing information.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestManagementSettings
Specifies the name of the request management settings object to return.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Add-SPRoutingMachineInfo
Remove-SPRoutingMachineInfo
Set-SPRoutingMachineInfo
minutes to read • Edit Online

Get-SPRoutingMachinePool
In ths Article

Returns all available routing pools.

Syntax
Get-SPRoutingMachinePool [-RequestManagementSettings] <SPRequestManagementSettingsPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Name <String>] [<CommonParameters>]

Description
Use the Get-SPRoutingMachinePool cmdlet to return all available routing pools by using the
RequestManagementSettings parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE---------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

Get-SPRoutingMachinePool -RequestManagementSettings $rm

This example returns a routing pool for the specified identity.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the machine pool to return.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestManagementSettings
Specifies the name of the request management settings object to return.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Add-SPRoutingMachinePool
Remove-SPRoutingMachinePool
Set-SPRoutingMachinePool
minutes to read • Edit Online

Get-SPRoutingRule
In ths Article

Returns all routing rules.

Syntax
Get-SPRoutingRule [-RequestManagementSettings] <SPRequestManagementSettingsPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Name <String>] [<CommonParameters>]

Description
Use the Get-SPRoutingRule cmdlet to return routing rules for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE------------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

Get-SPRoutingRule -RequestManagementSettings $rm

This example returns a routing rule for the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the rule to return.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestManagementSettings
Specifies the name of the request management settings object to return.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Add-SPRoutingRule
Remove-SPRoutingRule
Set-SPRoutingRule
minutes to read • Edit Online

Get-SPScaleOutDatabase
In ths Article

Returns all scale-out database objects.

Syntax
Get-SPScaleOutDatabase -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPScaleOutDatabase cmdlet to returns all scale-out database objects for the specified service
application.
A scale-out database is a database which implements the Shared Service Database Scale Out Generic Protocol. For
additional information about the Database Scale Out Generic Protocol, see SharePoint Shared Service Database
Scale Out Generic Protocol Specification (https://msdn.microsoft.com/en-us/library/hh656675(office.12).aspx)
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------EXAMPLE--------------

C:\PS>$serviceApplication = Get-SPServiceApplication -Name "AppManagement"

Get-SPScaleOutDatabase -ServiceApplication $serviceApplication

This example gets all scale-out databases for the given service application by using the $serviceApplication
variable.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application of the scale-out databases.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPScaleOutDatabase
Remove-SPScaleOutDatabase
Split-SPScaleOutDatabase
minutes to read • Edit Online

Get-SPScaleOutDatabaseDataState
In ths Article

Returns the state information about the specified scale-out database.

Syntax
Get-SPScaleOutDatabaseDataState -ConnectionString <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-IsAzureDatabase] [-WhatIf] [<CommonParameters>]

Get-SPScaleOutDatabaseDataState -Database <SPDatabasePipeBind> [-AssignmentCollection <SPAssignmentCollection>]


[-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Get-SPScaleOutDatabaseDataState cmdlet to return state information about the specified scale-out
database or about the database which will be connected with the specified connection string. The database state
information includes total count of partitions, total weight of the partitions, the range and the subranges of the
database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE--------------

C:\PS>$databases = Get-SPScaleOutDatabase -ServiceApplication $serviceApplication

C:\PS>$database = $databases[0]

Get-SPScaleOutDatabaseDataState -Database $database

This example gets the data state of the scale-out database for the first scale-out database of the given service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionString
Specifies the connection string for the scale-out database from which to return the state information.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database to return the state information about.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsAzureDatabase
Specifies whether the state information of the scale-out database is in the form of a Microsoft SQL Azure
Database.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPScaleOutDatabaseInconsistency
In ths Article

Displays all inconsistencies related to scale-out databases' ranges.

Syntax
Get-SPScaleOutDatabaseInconsistency -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPScaleOutDatabaseInconsistency cmdlet to return all inconsistencies related to scale out databases'
ranges and subranges for a specified service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE--------------

C:\PS>$serviceApplication = Get-SPServiceApplication -Name "AppManagement"

Get-SPScaleOutDatabaseInconsistency -ServiceApplication $serviceApplication

This example gets all the scale-out inconsistencies for the given service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application for which to return the scale-out inconsistencies.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPScaleOutDatabaseLogEntry
In ths Article

Queries a scale-out database for scale-out logs.

Syntax
Get-SPScaleOutDatabaseLogEntry -Count <Int32> -Database <SPDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-CorrelationId <Guid>]
[-MajorAction <SPScaleOutDatabaseMajorAction>] [-RangeLimitPoint <Byte[]>] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPScaleOutDatabaseLogEntry cmdlet to query a scale-out database for scale-out logs that include
specified criteria.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE-----------

C:\PS>$databases = Get-SPScaleOutDatabase -ServiceApplication $serviceApplication

C:\PS>$database = $databases[0]

Get-SPScaleOutDatabaseLogEntry -Database $database -Count 10 -MajorAction DataMove

This example gets the 10 most recent scale-out log entries from the first scale-out database of the given service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CorrelationId
Specifies the correlation id of the scale-out logs to be returned. Correlation id of the log entries that belong to the
same major action are the same.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Count
Specifies the number of scale-out log entries to return.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database from which to return the scale-out logs

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MajorAction
Specifies the major action of the scale-out log entries to be returned. The values are the following:
DataMove -A data migration operation between two scale-out databases.
Recovery -Any data recovery operation that is performed to recover from a failure.

Type: SPScaleOutDatabaseMajorAction
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RangeLimitPoint
Specifies the range limit point of the scale-out log entries to be returned.
The range limit point has different meaning depending on the action that records the log entry.
--If the action is to create, change or delete a data subrange, the range limit point represents the following: --If the
action targets a lower data subrange, the range limit point represents the start point of that lower data subrange. --
If the action targets an upper data subrange, the range limit point represents the end point of that upper data
subrange. --If the action is to extend a data range, the range limit point represents the following: --If the action
extends the start point of the data range, range limit point represents the new start point of the data range. --If the
action extends the end point of the data range, range limit point represents the new end point of the data range.

Type: Byte[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSecureStoreApplication
In ths Article

Returns a Secure Store application.

Syntax
Get-SPSecureStoreApplication -Name <String> -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPSecureStoreApplication -ServiceContext <SPServiceContextPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-All] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPSecureStoreApplication cmdlet returns a Secure Store application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssApp = Get-SPSecureStoreApplication -ServiceContext http://contoso -Name "ContosoTargetApplication"

This example gets the Secure Store application for the target application with the name ContosoTargetApplication.
------------------EXAMPLE 2------------------

Get-SPSecureStoreApplication -ServiceContext http://contoso -All

This example returns all of the Secure Store applications http://contoso.

Parameters
-All
Returns all secure store applications for the given Service Context.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the Secure Store application to get.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context for the local Secure Store application to connect to.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSecureStoreSystemAccount
In ths Article

Returns a list of users from a designated list.

Syntax
Get-SPSecureStoreSystemAccount [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPSecureStoreSystemAccount cmdlet to return a list of user accounts which are considered to be a
system account.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE----------

Get-SPSecureStoreSystemAccount

This example returns a list of user accounts for the secure store system.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Related Links
Add-SPSecureStoreSystemAccount
Remove-SPSecureStoreSystemAccount
minutes to read • Edit Online

Get-SPSecurityTokenServiceConfig
In ths Article

Returns the security token service (STS ) for the farm.

Syntax
Get-SPSecurityTokenServiceConfig [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPSecurityTokenServiceConfig cmdlet reads the security token service (STS ) for the farm. An STS
authenticates security tokens in incoming SOAP messages.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Set-SPSecurityTokenServiceConfig -ServiceTokenLifetime 1000

This example gets the security token service (STS ) for the farm and sets the expiration for the service token cache
to 1000 minutes.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServer
In ths Article

Returns the server or servers in the farm that match the given identity.

Syntax
Get-SPServer [[-Identity] <SPServerPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPServer cmdlet returns the SPServer object for the given identity (if it exists in the farm). If no
parameters are specified, the cmdlet returns all servers in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Get-SPServer

This example returns all servers in the local farm in a list.


--------------EXAMPLE 2-----------------

Get-SPServer | Where{ $_.NeedsUpgrade -eq $TRUE}

This example returns a list of all servers in the farm that need an upgrade.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the address of the server to return.

Type: SPServerPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServerScaleOutDatabase
In ths Article

Returns all scale-out database objects.

Syntax
Get-SPServerScaleOutDatabase -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPServerScaleOutDatabase cmdlet to return all scale-out database objects for the specified service
application.
A scale-out database is a database which implements the Shared Service Database Scale Out Generic Protocol. For
more information, see SharePoint Shared Service Database Scale Out Generic Protocol Specification
(https://go.microsoft.com/fwlink/p/?LinkId=273867)

Examples
----------EXAMPLE--------------

C:\PS>$serviceApplication = Get-SPServiceApplication -Name "AppManagement"

Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication

This example gets all scale-out databases for the given service application by using the $serviceApplication
variable.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application of the scale-out databases.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Add-SPServerScaleOutDatabase
Remove-SPServerScaleOutDatabase
Split-SPServerScaleOutDatabase
minutes to read • Edit Online

Get-SPServerScaleOutDatabaseDataState
In ths Article

Returns the state information about the specified scale-out database.

Syntax
Get-SPServerScaleOutDatabaseDataState -ConnectionString <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-IsAzureDatabase] [-WhatIf] [<CommonParameters>]

Get-SPServerScaleOutDatabaseDataState -Database <SPDatabasePipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Get-SPServerScaleOutDatabaseDataState cmdlet to return state information about the specified scale-out
database or about the database which will be connected with the specified connection string. The database state
information includes total count of partitions, total weight of the partitions, the range and the subranges of the
database.

Examples
----------------EXAMPLE--------------

C:\PS>$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication

C:\PS>$database = $databases[0]

Get-SPServerScaleOutDatabaseDataState -Database $database

This example gets the data state of the scale-out database for the first scale-out database of the given service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionString
Specifies the connection string for the scale-out database from which to return the state information.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database for which the command returns state information.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsAzureDatabase
Specifies whether the state information of the scale-out database is in the form of a Microsoft Windows Azure SQL
Database.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPServerScaleOutDatabaseInconsistency
In ths Article

Displays all inconsistencies related to scale-out databases' ranges.

Syntax
Get-SPServerScaleOutDatabaseInconsistency -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPServerScaleOutDatabaseInconsistency cmdlet to return all inconsistencies related to scale out
databases' ranges and subranges for a specified service application.

Examples
-------------EXAMPLE--------------

C:\PS>$serviceApplication = Get-SPServiceApplication -Name "AppManagement"

Get-SPServerScaleOutDatabaseInconsistency -ServiceApplication $serviceApplication

This example gets all the scale-out inconsistencies for the given service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application for which to return the scale-out inconsistencies.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPServerScaleOutDatabaseLogEntry
In ths Article

Queries a scale-out database for scale-out logs.

Syntax
Get-SPServerScaleOutDatabaseLogEntry -Count <Int32> -Database <SPDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-CorrelationId <Guid>]
[-MajorAction <SPScaleOutDatabaseMajorAction>] [-RangeLimitPoint <Byte[]>] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPServerScaleOutDatabaseLogEntry cmdlet to query a scale-out database for scale-out logs that
include specified criteria.

Examples
-------------EXAMPLE-----------

C:\PS>$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication

C:\PS>$database = $databases[0]

Get-SPServerScaleOutDatabaseLogEntry -Database $database -Count 10 -MajorAction DataMove

This example gets the 10 most recent scale-out log entries from the first scale-out database of the given service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CorrelationId
Specifies the correlation id of the scale-out logs to be returned. Correlation id of the log entries that belong to the
same major action are the same.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Count
Specifies the number of scale-out log entries to return.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database from which to return the scale-out logs

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MajorAction
Specifies the major action of the scale-out log entries to be returned. The values are the following:
DataMove -A data migration operation between two scale-out databases.
Recovery -Any data recovery operation that is performed to recover from a failure.

Type: SPScaleOutDatabaseMajorAction
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RangeLimitPoint
Specifies the range limit point of the scale-out log entries to be returned.
The range limit point has different meaning depending on the action that records the log entry.

Type: Byte[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPService
In ths Article

Gets a service in the farm.

Syntax
Get-SPService [[-Identity] <SPServicePipeBind>] [-All] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPService cmdlet gets a service in the farm.

Examples
Example 1

Get-SPService -Identity 'Microsoft SharePoint Server Diagnostics Service'

This example gets the Microsoft SharePoint Server Diagnostics Service in the farm.

Parameters
-All
Specifies all services in the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the name of the service to get.

Type: SPServicePipeBind
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServicePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPServiceApplication
In ths Article

Returns the specified service application.

Syntax
Get-SPServiceApplication [[-Identity] <SPServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Name <String>] [<CommonParameters>]

Description
The Get-SPServiceApplication cmdlet returns the service application specified by the Identity parameter. If no
parameter is specified, the cmdlet returns all service applications in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1----------------------

Get-SPServiceApplication

This example returns all service applications in the farm.


------------------EXAMPLE 2----------------------

Get-SPServiceApplication -Identity e2c2be70-6382-4ce7-8a44-ae7dadff5597

This example returns the service application that has the Identity "e2c2be70-6382-4ce7-8a44-ae7dadff5597".
------------------EXAMPLE 3----------------------

Get-SPServiceApplication -Name AccountingServiceApp

This example returns the service application that has the friendly name "AccountingServiceApp".
You can use either the Identity or the Name parameter but if you use both, the command will process the Identity
first and ignore the Name.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the GUID of the service application to get.

Type: SPServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the friendly name of the new usage application.The type must be a valid name of a usage application; for
example, UsageApplication1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServiceApplicationEndpoint
In ths Article

Returns the endpoint of a service application.

Syntax
Get-SPServiceApplicationEndpoint [-Identity] <SPServiceEndpointPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPServiceApplicationEndpoint -ServiceApplication <SPServiceApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Name <String>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPServiceApplicationEndpoint cmdlet sets the host of a service endpoint. Use the second parameter set
and do not specify the Name parameter to return a collection of all endpoints for the specified service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE--------------------

Get-SPServiceApplicationEndpoint -ServiceApplication "ServiceSubApp1"

This example returns the SPServiceEndpoint object based on the specified service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the service endpoint to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URI of an endpoint
address, in the form https://sitename:8003/servicemodelsamples/service; or an instance of a valid
SPServiceEndpoint object.

Type: SPServiceEndpointPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the service application endpoint.
The type must be a valid name of an service application endpoint; for example, SvcAppEndpoint1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription settings service application (for example, SubscriptionSettingsApp1); or an instance of a valid
SPServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServiceApplicationPool
In ths Article

Returns the specified Internet Information Services (IIS ) application pool.

Syntax
Get-SPServiceApplicationPool [[-Identity] <SPIisWebServiceApplicationPoolPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPServiceApplicationPool cmdlet returns the IIS application pool specified by the Identity parameter, or
returns all application pools if the Identity parameter is not specified.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPServiceApplicationPool

This example returns all the service application pools in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the name or identifier (ID ) of the application pool to get.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServiceApplicationProxy
In ths Article

Returns an instance of the specified service application proxy.

Syntax
Get-SPServiceApplicationProxy [[-Identity] <SPServiceApplicationProxyPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPServiceApplicationProxy cmdlet returns an instance of the service application proxy specified by the
Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPServiceApplicationProxy

This example retrieves all the service application proxies in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the GUID of the service application proxy to return.

Type: SPServiceApplicationProxyPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServiceApplicationProxyGroup
In ths Article

Returns the proxy group for the specified service application.

Syntax
Get-SPServiceApplicationProxyGroup [[-Identity] <SPServiceApplicationProxyGroupPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPServiceApplicationProxyGroup [-Default] [-AssignmentCollection <SPAssignmentCollection>]


[<CommonParameters>]

Description
The Get-SPServiceApplicationProxyGroup cmdlet displays a list of the proxy groups in the farm. To display a
specific proxy group, use the Identity parameter. If no parameter value is specified, a list of all proxy groups is
displayed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPServiceApplicationProxyGroup

This example retrieves all of the service application proxy groups in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Default
Returns the default service proxy group for the farm.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name or the GUID of the proxy group.

Type: SPServiceApplicationProxyGroupPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServiceApplicationSecurity
In ths Article

Returns the SPObjectSecurity object for a service application.

Syntax
Get-SPServiceApplicationSecurity [-Identity] <SPServiceApplicationPipeBind> [-Admin]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPServiceApplicationSecurity cmdlet returns a security object for the specified service application. Use
this cmdlet with the Grant-SPObjectSecurity and Set-SPServiceApplicationSecurity cmdlets to manage security for
a service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$security = Get-SPServiceApplicationSecurity $serviceApp -Admin


Grant-SPObjectSecurity $security $principal "Full Control"
Set-SPServiceApplicationSecurity $serviceApp -Admin $security

This example retrieves the SPObjectSecurity object corresponding to the administrator ACL on a service
application, and adds a new user principal to that ACL. The new user is an administrator for the service application
$serviceApp.

Parameters
-Admin
Returns the access control list (ACL ) that contains the administrators list of the service application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the service application to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
application (for example, SearchServiceApp1); or an instance of a valid SPServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServiceContext
In ths Article

Returns a service context.

Syntax
Get-SPServiceContext [-Site] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Get-SPServiceContext -SiteSubscription <SPSiteSubscriptionPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPServiceContext cmdlet returns a service context or a collection of service contexts. Specify the Site
parameter to return an individual service context, or specify the SiteSubscription parameter to return a collection of
service contexts.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE---------------

C:\PS>$sitesub = Get-SPSiteSubscription https://my.contoso.com/

Get-SPServiceContext $sitesub

This example returns the service context for a site in a hosted environment.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Returns the service context for only the Web application that contains the specified site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Returns all of the service contexts for all Web applications in which the specified site subscription has site
collections.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site
subscription (for example, SiteSubscriptionConfig1); or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServiceHostConfig
In ths Article

Returns the common Web service settings.

Syntax
Get-SPServiceHostConfig [-AssignmentCollection <SPAssignmentCollection>] [-Default] [<CommonParameters>]

Description
The Get-SPServiceHostConfig returns the common Web service settings.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-------------------

Get-SPServiceHostConfig

This example displays the Web service settings.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Default
This parameter has no effect.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPServiceInstance
In ths Article

Returns the services instance for a specific server or the entire farm.

Syntax
Get-SPServiceInstance [[-Identity] <SPServiceInstancePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-All] [<CommonParameters>]

Get-SPServiceInstance -Server <SPServerPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-All]


[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPServiceInstance cmdlet returns the services instance specified by the Identity parameter for a specific
server. If the Server parameter is not specified, the Get-SPServiceInstance cmdlet returns results for the entire
farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPServiceInstance -Server ServerA

This example displays the service instances from a given server.

Parameters
-All
Returns all services instance in the farm.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the GUID of the service instance.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPServiceInstancePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Server
Specifies the server from which to return the service instance.

Type: SPServerPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSessionStateService
In ths Article

Returns the properties of the session state service, including time-out and database settings.

Syntax
Get-SPSessionStateService [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPSessionStateService cmdlet reads the properties of the session state service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPSessionStateService

This example returns the current configuration of the session state service.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPShellAdmin
In ths Article

Returns the names of all users who have the SharePoint_Shell_Access role.

Syntax
Get-SPShellAdmin [[-database] <SPDatabasePipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Use the Get-SPShellAdmin cmdlet to return the names of all users who have the SharePoint_Shell_Access role in a
database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE----------------------

Get-SPShellAdmin -database 4251d855-3c15-4501-8dd1-98f960359fa6

This example returns the name of each user who has the SharePoint_Shell_Access role in the database specified.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-database
Specifies the GUID of the database or the Database Object that includes the SharePoint_Shell_Access role whose
user names you want to display. If the database parameter is not specified, the configuration database is used.

Type: SPDatabasePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSite
In ths Article

Returns all site collections that match the specified criteria.

Syntax
Get-SPSite [-Identity] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-CompatibilityLevel <Int32>] [-Confirm] [-Filter <ScriptBlock>] [-Limit <String>] [-Regex] [-WhatIf]
[<CommonParameters>]

Get-SPSite -ContentDatabase <SPContentDatabasePipeBind> [-AssignmentCollection <SPAssignmentCollection>]


[-CompatibilityLevel <Int32>] [-Confirm] [-Filter <ScriptBlock>] [-Limit <String>] [-WhatIf]
[-NeedsB2BUpgrade] [<CommonParameters>]

Get-SPSite -SiteSubscription <SPSiteSubscriptionPipeBind> [-AssignmentCollection <SPAssignmentCollection>]


[-CompatibilityLevel <Int32>] [-Confirm] [-Filter <ScriptBlock>] [-Limit <String>] [-WhatIf]
[<CommonParameters>]

Get-SPSite [-AssignmentCollection <SPAssignmentCollection>] [-CompatibilityLevel <Int32>] [-Confirm]


[-Filter <ScriptBlock>] [-Limit <String>] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPSite cmdlet returns either a single site that matches the Identity parameter, or all the sites that match
the Filter parameter for the specified scope. The scopes are the WebApplication, ContentDatabase , and
SiteSubscription parameters. If none of these scopes is provided, the scope is the farm. If the scope is specified with
no Filter parameter, all sites in that scope are returned.
The Identity parameter supports providing a partial URL that ends in a wildcard character (*). All site collections
that match this partial URL for the specified scope are returned. Additionally, if the Regex parameter is provided,
the Identity parameter is treated as a regular expression and any site collection with a URL provided in the given
scope that matches the expression is returned.
The Filter parameter is a server-side filter for certain site collection properties that are stored in the content
database; without the Filter parameter, filtering on these properties is a slow process. These site collection
properties are Owner, SecondaryOwner, and LockState. The Filter parameter is a script block that uses the same
syntax as a Where-Object statement, but is run on the server for faster results.
Valid values for LockState are: Unlock, NoAdditions, ReadOnly, NoAccess.
It is important to note that every site collection that the Get-SPSite cmdlet returns is automatically destroyed at the
end of the pipeline. To store the results of Get-SPSite in a local variable, use the Start-SPAssignment and Stop-
SPAssignment cmdlets to avoid memory leaks.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1---------------------

Get-SPSite 'https://' | Get-SPWeb -Limit All | Select Title

This example gets the collection of subweb titles in site collection at https://<site name>.
------------------EXAMPLE 2---------------------

Get-SPSite -ContentDatabase "b399a366-d899-4cff-8a9b-8c0594ee755f" | Format-Table -Property Url, Owner,


SecondaryOwner

This example gets a subset of data from all sites in the content database b399a366-d899-4cff-8a9b-8c0594ee755f.
------------------EXAMPLE 3---------------------

Start-SPAssignment -Global

$s = Get-SPSite -Identity https:///Sites/Site1

$s.Url

Stop-SPAssignment -Global

This example gets the sites specified by the Identity parameter and inserts the results in the variable s
The previous example uses the Global method of assignment collection. The Global method is easy to use but the
contents of this object grows quickly. Be careful not to run a Get-SPSite command that returns many results while
global assignment is enabled.
------------------EXAMPLE 4---------------------

$GC = Start-SPAssignment
$Sites = $GC | Get-SPSite -Filter {$_.Owner -eq "DOMAIN\JDow"} -Limit 50
Stop-SPAssignment $GC

This example gets the first 50 sites owned by user DOMAIN\JDow by using a server-side query, and assigns them
to a local variable.
This example uses advanced assignment collection methods.
------------------EXAMPLE 5---------------------

Get-SPWebApplication https:// | Get-SPSite -Limit All |ForEach-Object {$sum=0}{ $sum+=$_.Usage.Storage }{$sum}

This example shows a command that returns the sum of the disk space usage for all sites in a given web
application.
------------------EXAMPLE 6---------------------

Get-SPSite -Identity "https://localserver/(my|personal)/sites" -Regex

This example returns all sites that match the given regular expression.
The Quotes on the Identity parameter are required when the Regex parameter is used.
------------------EXAMPLE 7---------------------

Get-SPSite https:///sites/teams/* -Limit 100

This example gets up to 100 of the sites under the URL https://sitename/sites/teams.
------------------EXAMPLE 8---------------------

Get-SPSite | select url, @{Expression={$_.Usage.Storage}}

This example gets the amount of storage used by a site collection, by using the storage field of the .UsageInfo
property.
------------------EXAMPLE 9---------------------

Get-SPSite -Limit all -CompatibilityLevel 14

This example returns all SharePoint Server mode site collections.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial
CompatibilityLevel value for the site collection. The values for this parameter can be either SharePoint Server or
SharePoint Server. When this parameter is not specified, the CompatibilityLevel will default to the highest possible
version for the web application depending on the SiteCreationMode setting.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the GUID of the content database from which to list site collections.
The type must be a valid database name, in the form, SPContentDB01, or a valid GUID (for example, 12345678-
90ab-cdef-1234-567890bcdefgh).

Type: SPContentDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Filter
Specifies the script block of the server-side filter to apply.
The type must be a valid filter name and value in the form {$_PropertyName <operator> "filterValue"}.
Valid operators are: EQ, NE, LIKE, NOTLIKE.

Type: ScriptBlock
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the site collection to get.
The type must be a valid URL, in the form, https://server_name or https://server_name/sites/sitename, or a valid
GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh).
Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Limit
Limits the maximum number of site collections to return. The default value is 200.
The type must be a valid non-negative number. Specify ALL to return all site collections for the given scope.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NeedsB2BUpgrade
Specifies whether the site needs to be upgraded.
The valid values are True and False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Regex
When used, the URL provided for the Identity parameter is treated as a regular expression.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the site subscription from which to get site collections.
The type must be a valid URL, in the form, https://server_name or a valid GUID (for example, 12345678-90ab-
cdef-1234-567890bcdefgh).

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WebApplication
Specifies the URL, GUID, or name of the web application from which to list sites.
The type must be a valid URL, in the form, https://server_name, a valid GUID (for example, 12345678-90ab-cdef-
1234-567890bcdefgh); or the name of the web application (for example, WebApplication1212).

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSiteAdministration
In ths Article

Returns a site administration object that allows farm administrators to view certain information about site
collections to which they might not have access.

Syntax
Get-SPSiteAdministration [-Identity] <SPSiteAdministrationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Filter <ScriptBlock>] [-Limit <String>] [-Regex]
[-WhatIf] [<CommonParameters>]

Get-SPSiteAdministration -ContentDatabase <SPContentDatabasePipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Filter <ScriptBlock>] [-Limit <String>]
[-WhatIf] [<CommonParameters>]

Get-SPSiteAdministration -SiteSubscription <SPSiteSubscriptionPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Filter <ScriptBlock>] [-Limit <String>]
[-WhatIf] [<CommonParameters>]

Get-SPSiteAdministration [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Filter <ScriptBlock>]


[-Limit <String>] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPSiteAdminitration cmdlet returns a site administration object that allows farm administrators to view
certain information about site collections to which they might not have access.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Get-SPSiteAdministration | Select -Property Url, OwnerLoginName, @{Name="Storage";Expression=


{$_.Quota.StorageMaximumLevel}}

This example gets a subset of data from all of the sites in the content database with the URL b399a366-d899-4cff-
8a9b-8c0594ee755f (farm administrator does not require access). This command uses the calculated property
Storage to display the maximum storage value for the content database.
------------------EXAMPLE 2------------------

Start-SPAssignment -Global
$s = Get-SPSiteAdministration -Identity https://MyApp/Sites/Site1
$s.Url
Stop-SPAssignment -Global

This example gets the site collections specified by the Identity parameter and inserts the results into the variable s.
This example uses the Global method of garbage collection. This method is easier to use but grows quickly. Do not
run a Get-SPSite command that returns many results while global assignment is on.
------------------EXAMPLE 3-------------------

C:\PS>$GC = Start-SPAssignment
$Sites = $GC | Get-SPSiteAdministration -Filter {$_.Owner -eq "DOMAIN\JDoe"} -Limit 50
Stop-SPAssignment $GC

This example gets the first 50 sites owned by user DOMAIN\JDoe by using a server-side query, and assigns the
returned sites to a local variable. This command uses advanced assignment collection methods.
------------------EXAMPLE 4------------------

Get-SPWebApplication https://sitename | Get-SPSiteAdministration -Limit All |ForEach-Object {$sum=0}{


$sum+=$_.DiskUsed }{$sum}

This command returns the sum of the disk space usage for all sites in the specified Web application.
------------------EXAMPLE 5------------------

Get-SPWebApplication https://sitename | Get-SPSiteAdministration -Limit ALL | Select URL

This example gets the URLs for all site collections in a Web application.
------------------EXAMPLE 6------------------

Get-SPSiteAdministration -identity "https://localserver/(my|personal)/sites" -Regex

This example returns all sites that match the given regular expression. The quotation marks around the value
specified for the Identity parameter are required when using the Regex flag.
------------------EXAMPLE 7------------------

Get-SPSite "https://sitename/sites/teams/*" -Limit 100

This example gets up to 100 of the sites under the URL https://sitename/sites/teams.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the URL (full or partial) or GUID of the site collection to retrieve.
The type must be a valid URL, in the form https://server_name, or a GUID, in the form, 1234-456-987fg.

Type: SPContentDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Filter
Specifies the script block of the server-side filter to apply.
The type must be a valid filter name and a value in the form { $_ PropertyName <operator > "filterValue"}}

Type: ScriptBlock
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL (full or partial) or GUID of the site collection to retrieve.
The type must be a valid URL, in the form https://server_name, or a GUID, in the form 1234-456-987fg.
Type: SPSiteAdministrationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Limit
Limits the maximum number of site collections to return. The default value is 200.
The type must be a valid non-negative number. Provide ALL to return all site collections for the given scope.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Regex
Enabling this switch causes the URL provided for the Identity parameter to be treated as a regular expression.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the site group from which to get site collections.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; an SPSite (object or URL )
of a site collection that is a member of the site subscription; or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the URL, GUID, or name of the Web application from which to list sites.
The type must be a valid URL, in the form https://server_name; a valid GUID (for example, 12345678-90ab-cdef-
1234-567890bcdefgh); or the Web application name (for example, WebApplication1212).
Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSiteMapDatabase
In ths Article

Do not use

Syntax
Get-SPSiteMapDatabase [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Do not use

Examples
Example 1

Do not use

Do not use

Parameters
-AssignmentCollection
Do not use

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPSiteMaster
In ths Article

Returns site master information.

Syntax
Get-SPSiteMaster [-ContentDatabase] <SPContentDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPSiteMaster cmdlet to display site master information in the farm.
Typically the following information is displayed:
ContentDatabase
SiteId
TemplateName
Language
CompatibilityLevel
FeaturesToActivateOnCopy

Examples
Example 1

Get-SPSiteMaster -ContentDatabase WSS_Content

This example returns the site master in the database WSS_Content.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ContentDatabase
Specifies the name of the database to get the list of Site Masters. For example, WSS_Content.

Type: SPContentDatabasePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPContentDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPSiteSubscription
In ths Article

Returns the site subscription for the given URL or all site subscriptions in the local farm.

Syntax
Get-SPSiteSubscription [[-Identity] <SPSiteSubscriptionPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPSiteSubscription cmdlet returns the site subscription for the given URL when the Identity parameter is
used. If no parameter is specified, all unique site subscriptions in the farm are listed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE----------------------

C:\PS>$SiteSub = Get-SPSiteSubscription https://Contoso.com

C:\PS>$SiteSub = Get-SPSite https://contoso.com | Get-SPSiteSubscription

This example retrieves the site subscription for https://Contoso.com.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the ID of the subscription.
The type must be a valid URL, in the form https://server_name.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSiteSubscriptionConfig
In ths Article

Returns the configuration properties of a site subscription.

Syntax
Get-SPSiteSubscriptionConfig [-Identity] <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPSiteSubscriptionConfig cmdlet returns the configuration properties of a site subscription.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE---------------

Get-SPSiteSubscriptionConfig https://contoso.com | Select FeatureSet

This example gets the feature set ID for the site subscription that contains the Web site https://contoso.com.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the site subscription configuration to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; an SPSite (object or URL )
of a site collection that is a member of the site subscription; or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSiteSubscriptionEdiscoveryHub
In ths Article

Displays the eDiscovery hub for a site subscription.

Syntax
Get-SPSiteSubscriptionEdiscoveryHub [-Identity] <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPSiteSubscriptionEdiscoveryHub cmdlet to display the site collection configured as the eDiscovery
hub for the specified site subscription.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE----------------------

Get-SPSiteSubscriptionEdiscoveryHub -Identity https://contoso.com

This example displays the eDiscovery hub for the specified site collection.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL of the site collections to the eDiscovery hub. Can pipe the result from the Get-
SPSiteSubscription cmdlet.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSiteSubscriptionEdiscoverySearchScope
In ths Article

Displays the search scope for the eDiscovery hub of the specified site collection.

Syntax
Get-SPSiteSubscriptionEdiscoverySearchScope [-Identity] <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Get-SPSiteSubscriptionEdiscoverySearchScope cmdlet to retrieve the search scope that has been
configured for the eDiscovery hub of the specified site subscription.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE--------------------

Get-SPSiteSubscriptionEdiscoverySearchScope -Identity https://contoso.com

This example displays the search scope for the eDiscovery hub for the specified site collection.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL to the group of site collections that contained the search scope.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSiteSubscriptionFeaturePack
In ths Article

Retrieves available SharePoint Feature sets or the Feature set assigned to a given site subscription.

Syntax
Get-SPSiteSubscriptionFeaturePack [[-Identity] <SPSiteSubscriptionFeaturePackPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Get-SPSiteSubscriptionFeaturePack [-AssignmentCollection <SPAssignmentCollection>]


[-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPSiteSubscriptionFeaturePack cmdlet retrieves available SharePoint Feature sets or the Feature set
assigned to a given site subscription.
Be careful when you assign Feature sets to variables because changes to the Feature set are not reflected until the
variable is refreshed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Get- SPSiteSubscriptionFeaturePack

This example returns all defined Feature sets in the local farm.
------------------EXAMPLE 2------------------

Get-SPSiteSubscriptionFeaturePack -SiteSubscription https://contoso.com | ForEach{ $_.FeatureDefinitions }

This example returns the list (name, ID, and scope) of all Features allowed in the Feature set that is currently
assigned to the site subscription of https://contoso.com.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies a valid name or GUID of the Feature set.

Type: SPSiteSubscriptionFeaturePackPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
If provided, ensures that the returned Feature set is the Feature set that is currently assigned to the given site
subscription.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSiteSubscriptionIRMConfig
In ths Article

Gets the Information Rights Management (IRM ) settings.

Syntax
Get-SPSiteSubscriptionIRMConfig [-Identity] <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPSiteSubscriptionIRMConfig cmdlet to display IRM setting information for a specified tenant when
the Identity parameter is used.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE-----------

site = Get-SPSite https://myspserver

C:\PS>$subscription = $site.SiteSubscription

Get-SPSiteSubscriptionIRMConfig -Identity $subscription

This example gets the IRM settings for a specified tenant by using the Identity parameter.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the site subscription for a particular tenant.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPSiteSubscriptionIRMConfig
minutes to read • Edit Online

Get-SPSiteSubscriptionMetadataConfig
In ths Article

Returns the site subscription configuration settings for a Metadata Service application.

Syntax
Get-SPSiteSubscriptionMetadataConfig [-Identity] <SPSiteSubscriptionPipeBind>
[-ServiceProxy] <SPMetadataServiceProxyCmdletPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Use the Get-SPSiteSubscriptionMetadataConfig cmdlet to read the site subscription configuration settings for a
specified shared service application for the Metadata Service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

Get-SPSiteSubscriptionMetadataConfig -Identity $siteSubscriptionPipeBind1 -ServiceProxy "MetadataServiceProxy2"

This example retrieves the site subscription-specific settings for an existing partitioned Metadata Service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the site subscription to read.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site
subscription (for example, SiteSubscriptionConfig1); or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceProxy
Specifies the proxy of the metadata Service application for the site subscription.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of the
service application proxy (for example, ServiceAppProxy1); or an instance of a valid SPMetadataServiceProxy
object.

Type: SPMetadataServiceProxyCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPSiteUpgradeSessionInfo
In ths Article

Manage or report site upgrade.

Syntax
Get-SPSiteUpgradeSessionInfo -ContentDatabase <SPContentDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-HideWaiting] [-ShowCompleted] [-ShowFailed]
[-ShowInProgress] [-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Get-SPSiteUpgradeSessionInfo -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]


[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Get-SPSiteUpgradeSessionInfo cmdlet to manage or report site upgrade of the farm.
This cmdlet has two modes, get upgrade information for a specific SPSite object or for a given content database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE 1----------

C:\PS>$db = Get-SPContentDatabase -Identity wss_content

Get-SPSiteUpgradeSessionInfo -ContentDatabase $db

This example returns siteupgradeinfo for every SPContentDatabase returned from Get-SPContentDatabase
cmdlet.
-----------EXAMPLE 2----------

C:\PS>$site=Get-SPSite -Identity https://localhost

Get-SPSiteUpgradeSessionInfo -Site $site

This example returns siteupgradeinfo for every SPSite object returned from Get-SPSite cmdlet.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ContentDatabase
Specifies the GUID of the content database from which to list site collections.The type must be a valid database
name, in the form SPContentDB01, or a valid GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh).

Type: SPContentDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-HideWaiting
Specifies to hide site collections that upgrade has not started.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowCompleted
Specifies to show site collections that has completed upgrade.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowFailed
Specifies to show site collections that have failed upgrade.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowInProgress
Displays site collections that are in the process of being upgraded.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies to limit the result to site collections within the site subscription.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPSiteUpgradeSessionInfo
minutes to read • Edit Online

Get-SPSiteURL
In ths Article

Displays all URL mappings for the site.

Syntax
Get-SPSiteURL [-Identity] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Use the Get-SPSiteUrl cmdlet to display all the URL mappings of the site by using the Identity parameter.
The Get-SPSiteUrl cmdlet only applies to the root site collection for a host name, that is https://www.contoso.com.
This cmdlet cannot be directly run against a managed path site collection underneath the root, that is,
https://www.contoso.com/sites/test.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE----------

C:\PS>$site = Get-SPSite 'https://www.contoso.com'

Get-SPSiteURL -Identity $site

This example displays all the URLs that bind to the site collection, https://www.contoso.com.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the site collection to display. Must be the root site collection of a host name.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPSiteUrl
Set-SPSiteUrl
minutes to read • Edit Online

Get-SPSolution
In ths Article

Returns a specified SharePoint solution.

Syntax
Get-SPSolution [[-Identity] <SPSolutionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPSolution cmdlet returns a specified SharePoint solution. If the Identity parameter is not specified, this
cmdlet returns the collection of all installed SharePoint solutions in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPSolution

This example returns the collection of all installed SharePoint solutions in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the SharePoint solution to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint solution (for example, SPSolution1); or an instance of a valid SPSolution object.

Type: SPSolutionPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPStateServiceApplication
In ths Article

Returns state service applications on the farm.

Syntax
Get-SPStateServiceApplication [[-Identity] <SPStateServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Get-SPStateServiceApplication cmdlet returns a state service application on the farm. If the Identity parameter
is not specified, this cmdlet returns the collection of all state service applications on the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Get-SPStateServiceApplication

This example displays all state service applications in the farm.


--------------EXAMPLE 2-----------------

Get-SPStateServiceApplication -Identity "StateServiceApp1"

This example displays a specific state service application in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service application to get.
The type must be a valid name of a state service application (for example, StateServiceApp1) or a valid GUID, in
the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPStateServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPStateServiceApplicationProxy
In ths Article

Returns state service application proxies on the farm.

Syntax
Get-SPStateServiceApplicationProxy [[-Identity] <SPStateServiceApplicationProxyPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Get-SPStateServiceApplicationProxy cmdlet returns a state service application proxy on the farm. If the
Identity parameter is not specified, this cmdlet returns the collection of all state service application proxies on the
farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Get-SPStateServiceApplicationProxy

This example displays all the state service application proxies on the farm.
--------------EXAMPLE 2-----------------

Get-SPStateServiceApplicationProxy -Identity 81dc50e0-c0f9-4d2c-8284-bb03bb1ea676

This example displays a specific state service application proxy on the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service application proxy to get.
The type must be a valid name of a state service application proxy (for example, StateServiceProxy); a valid GUID,
in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPStateServiceApplicationProxyPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPStateServiceDatabase
In ths Article

Returns a state service database.

Syntax
Get-SPStateServiceDatabase [[-Identity] <SPStateDatabasePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Get-SPStateServiceDatabase [[-ServiceApplication] <SPStateServiceApplicationPipeBind>]


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPStateServiceDatabase cmdlet returns a state service database on the farm. If the Identity parameter is
not specified, this cmdlet returns the collection of all state service databases on the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1----------------

Get-SPStateServiceDatabase

This example displays all of the state service databases on the farm.
--------------EXAMPLE 2--------------

Get-SPStateServiceDatabase -Identity 9703f7e2-9521-47c3-bd92-80e3eeba391b

This example displays a specific state service database in the farm.


--------------EXAMPLE 3--------------

Get-SPStateServiceDatabase -ServiceApplication "StateServiceApp1"

This example displays all state service databases associated with a specific service.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service database to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh or an instance of a valid
SPStateServiceDatabase object (for example, StateSvcDB1).

Type: SPStateDatabasePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplication
Filters to return only the state service database associated with the specified state service application.
The type must be a valid name of a state service application (for example, StateServiceApp1); a valid GUID, in the
form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPStateServiceApplication object.
Type: SPStateServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPTaxonomySession
In ths Article

Returns a TaxonomySession object.

Syntax
Get-SPTaxonomySession -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Use the Get-SPTaxonomySession cmdlet to get a TaxonomySession object. A TaxonomySession object contains the
set of metadata term stores for a taxonomy session.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE--------------------

C:\PS>$session = Get-SPTaxonomySession -Site "https://sitename"

This example retrieves a TaxonomySession object, which can be used to access term stores associated with the Web
application for a site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Site
Specifies the SharePoint site mapped to the set of metadata term stores for the taxonomy session.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPThrottlingRule
In ths Article

Returns all throttling rules.

Syntax
Get-SPThrottlingRule [-RequestManagementSettings] <SPRequestManagementSettingsPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Name <String>] [<CommonParameters>]

Description
Use the Get-SPThrottlingRule cmdlet to return all the throttling rules from the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------EXAMPLE--------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

Get-SPThrottlingRule -RequestManagementSettings $rm

This example returns throttling rules for the farm by using the $rm and $web variables.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the throttling rule to return.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestManagementSettings
Specifies the name of the request management settings object to return.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Add-SPThrottlingRule
Remove-SPThrottlingRule
Set-SPThrottlingRule
minutes to read • Edit Online

Get-SPTimerJob
In ths Article

Returns timer jobs.

Syntax
Get-SPTimerJob [[-Identity] <SPTimerJobPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Type <String>] [-WebApplication <SPWebApplicationPipeBind>] [<CommonParameters>]

Description
The Get-SPTimerJob cmdlet reads a specified timer job, timer jobs of a specified type, or timer jobs defined for a
specified scope.
If no parameters are specified, this cmdlet returns all timer job definitions for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE 01---------------------

Get-SPTimerJob -WebApplication "https://servername" | select Name, DisplayName

This example displays all timer jobs for a specified Web application.
---------------------EXAMPLE 02---------------------

Get-SPTimerJob | select -ExpandProperty HistoryEntries

The above example will show you timer job run history

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the timer job to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a timer
job (for example, TimerJob1); or an instance of a valid SPTimerJob object.

Type: SPTimerJobPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Filters to return timer jobs of a specified type.
The type must be a name of a valid timer job type; for example, TimerJob1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Filters to return timer jobs defined for the scope of a specified SharePoint Web application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPTopologyServiceApplication
In ths Article

Displays properties of the topology service application for the current farm.

Syntax
Get-SPTopologyServiceApplication [[-Identity] <SPTopologyWebServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPTopologyServiceApplication cmdlet displays the advanced properties of an application when the
Identity parameter is used.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPTopologyServiceApplication

This example displays properties of the topology service application for the current farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the GUID of the application.
The type must be a valid GUID, in the form 1234-4567-098jhj.

Type: SPTopologyWebServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPTopologyServiceApplicationProxy
In ths Article

Retrieves the topology service application proxy.

Syntax
Get-SPTopologyServiceApplicationProxy [[-Identity] <SPTopologyWebServiceProxyPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPTopologyServiceApplicationProxy cmdlet retrieves the local topology service application proxy.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPTopologyServiceApplicationProxy

This example displays the topology service application proxy in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the GUID of the application proxy.
The type must be a valid GUID, in the form 1234-4567-098jhj.

Type: SPTopologyWebServiceProxyPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPTranslationThrottlingSetting
In ths Article

Gets time duration settings.

Syntax
Get-SPTranslationThrottlingSetting [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Farm <SPFarm>]
[-WhatIf] [<CommonParameters>]

Description
Use the Get-SPTranslationThrottlingSetting cmdlet to display the time duration for timer jobs.

Examples
Example 1

Get-SPTranslationThrottlingSetting

This example displays all the time duration and timer jobs for the farm.

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPTrustedIdentityTokenIssuer
In ths Article

Returns an identity provider.

Syntax
Get-SPTrustedIdentityTokenIssuer [[-Identity] <SPTrustedIdentityTokenIssuerPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPTrustedIdentityTokenIssuer cmdlet returns an identity provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------------EXAMPLE 1------------------------

C:\PS>$trustedsts = Get-SPTrustedIdentityTokenIssuer "LiveIDSTS"

This example gets a trusted identity token issuer.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the identity provider to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of identity
provider (for example, LiveID STS ); or an instance of a valid SPIdentityProvider object.

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPTrustedRootAuthority
In ths Article

Returns a trusted root authority.

Syntax
Get-SPTrustedRootAuthority [[-Identity] <SPTrustedRootAuthorityPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPTrustedRootAuthority cmdlet returns a trusted root authority. If a certificate file is used, it must have
only one X509 certificate without private keys, otherwise an exception is raised.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$rootauthority=Get-SPTrustedRootAuthority -Identity "WFEFarm1"

This example creates a new trusted root authority, WFEFarm1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the trusted root authority to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a trusted
root authority (for example, WFEFarm1); or an instance of a valid SPTrustedRootAuthority object.

Type: SPTrustedRootAuthorityPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPTrustedSecurityTokenIssuer
In ths Article

Returns the trusted security token issuer object.

Syntax
Get-SPTrustedSecurityTokenIssuer [[-Identity] <SPTrustedSecurityTokenServicePipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPTrustedSecurityTokenService cmdlet to return the trusted security token issuer by using the Identity
parameter. This cmdlet returns the T:Microsoft.SharePoint.Administration.Claims.SPSecurityTokenServiceManager
object. The properties on this object can be set by using the Set-SPTrustedSecurityTokenIssuer cmdlet and then
updated back to the object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE----------

Get-SPTrustedSecurityTokenService

This example displays all trusted security token service objects from the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the ID of the trusted security token issuer object that you want to return. If you do not specify this
parameter, the cmdlet returns all the objects.

Type: SPTrustedSecurityTokenServicePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
New -SPTrustedSecurityTokenIssuer
Remove-SPTrustedSecurityTokenIssuer
Set-SPTrustedSecurityTokenIssuer
minutes to read • Edit Online

Get-SPTrustedServiceTokenIssuer
In ths Article

Returns the object that represents the farm trust.

Syntax
Get-SPTrustedServiceTokenIssuer [[-Identity] <SPTrustedServiceTokenIssuerPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPTrustedServiceTokenIssuer cmdlet returns the object that represents the farm trust.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPTrustedServiceTokenIssuer "WFEFarm1"

This example gets the trusted services token issuer WFEFarm1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the trusted service token issuer to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a trusted
service token issuer (for example, WFEFarm1); or an instance of a valid SPTrustedRootAuthority object.

Type: SPTrustedServiceTokenIssuerPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPUpgradeActions
In ths Article

Returns all upgrade actions.

Syntax
Get-SPUpgradeActions [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPUpgradeActions cmdlet to return all upgrade actions (that is, detail on the action name, type, target
object type, schema version, and compatibility level) within the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE------------

Get-SPUpgradeActions

This example returns all upgrade actions within the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPUsageApplication
In ths Article

Returns a specified usage application.

Syntax
Get-SPUsageApplication [[-Identity] <SPUsageApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-UsageService <SPUsageServicePipeBind>] [<CommonParameters>]

Description
The Get-SPUsageApplication cmdlet return a specified usage application. If the Identity parameter is not specified,
the cmdlet returns the local usage application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE------------------

Get-SPUsageApplication -Identity "Usage and Health data collection"

This example returns the usage application named, Usage and Health data collection

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the usage application to get. If the Identity parameter is not specified, the cmdlet returns the local usage
application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage
application (for example, UsageApplication1); or an instance of a valid SPUsageApplication object.

Type: SPUsageApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UsageService
Filters to return the usage application with the specified parent SPUsageService object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage
service (for example, UsageService1); or an instance of a valid SPUsageService object.

Type: SPUsageServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPUsageDefinition
In ths Article

Returns a usage definition object.

Syntax
Get-SPUsageDefinition [[-Identity] <SPUsageDefinitionPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPUsageDefinition cmdlet reads a usage definition object. If the Identity parameter is not specified, this
cmdlet returns the collection of usage definitions in the farm. A usage definition object defines a specific type of
usage.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE-----------------

Get-SPUsageDefinition -Identity "Page Requests"

This example returns the SPRequestUsage provider on the local farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the usage definition object to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage
definition (for example, SiteSubscriptionConfig1); or an instance of a valid SPUsageDefinition object.

Type: SPUsageDefinitionPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPUsageService
In ths Article

Returns a usage service.

Syntax
Get-SPUsageService [[-Identity] <SPUsageServicePipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Get-SPUsageService cmdlet returns the specified usage service. If the Identity parameter is not specified, the
cmdlet returns the local usage service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE-------------------------

Get-SPUsageService -Identity 57055d99-9914-4af6-a3bf-7b76e3f231c2

This example returns a SPUsageService object of the specified ID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the usage service to get. If the Identity parameter is not specified, the cmdlet returns the local usage
service.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage
service (for example, UsageService1); or an instance of a valid SPUsageService object.

Type: SPUsageServicePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPUser
In ths Article

Returns the user account or accounts that match a given search criteria.

Syntax
Get-SPUser [[-Identity] <SPUserPipeBind>] -Web <SPWebPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Group <SPGroupPipeBind>] [-Limit <String>] [<CommonParameters>]

Description
The Get-SPUser cmdlet returns all SharePoint user accounts that match the scope given by the Identity, Web, or
Group parameters.
The Identity parameter can use the alias of a user for returning exact matches.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Get-SPUser -Web 'https://sharepoint.contoso.com' -Group 'Viewers'

This example returns all members of the SharePoint group Viewers on the site https://sharepoint.contoso.com.
------------------EXAMPLE 2------------------

Get-SPUser -Identity 'i:0#.w|contoso\jdoe' -Web 'https://sharepoint.contoso.com'

This example returns the specific user identified via Windows Claims on the site https://sharepoint.contoso.com.
------------------EXAMPLE 3------------------

Get-SPUser -Identity 'contoso\jdoe' -Web 'https://sharepoint.contoso.com'

This example returns the specific user identified via Classic Windows authentication on the site
https://sharepoint.contoso.com.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Group
Specifies the user group to which the new user belongs.

Type: SPGroupPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the ID or login name of the user to be returned.
The type must be a valid ID or login name, such as the format of 'CONTOSO\jdoe' for Classic Windows
Authentication or 'i:0#.w|CONTOSO\jdoe' for Windows Claims.

Type: SPUserPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Limit
Specifies the maximum number of users to return. The default value is 500.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Web
Specifies the Web site to be used as a scope.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint Foundation Web site (for example, MySPSite1); or an instance of a valid SPWeb object.
Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPUserLicense
In ths Article

Returns the list of supported SharePoint user licenses.

Syntax
Get-SPUserLicense [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPUserLicense cmdlet returns the list of supported SharePoint user licenses in the SharePoint farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE-------------------

Get-SPUserLicense

This example returns the list of supported SharePoint user licenses for the SharePoint farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPUserLicenseMapping
In ths Article

Returns the claim-to-user license mappings.

Syntax
Get-SPUserLicenseMapping [-AssignmentCollection <SPAssignmentCollection>]
[-WebApplication <SPWebApplicationPipeBind>] [<CommonParameters>]

Description
The Get-SPUserLicenseMapping cmdlet returns the claim-to-user license mappings for the entire SharePoint farm
or a specific web application.
Getting the mappings for the entire farm does not retrieve any specific mappings on a web application.
If you specify no parameters, the license mappings for the entire farm are returned. To display the license mappings
for a specific web application, use the WebApplication parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1-----------------

Get-SPUserLicenseMapping

This example returns all claim-to-user license mappings for the entire SharePoint farm.
---------------EXAMPLE 2 -----------------

Get-SPUserLicenseMapping -WebApplication "SharePoint - 80"

This example returns all claim-to-user license mappings for the web application with the name "SharePoint - 80".
---------------EXAMPLE 3 -----------------

Get-SPUserLicenseMapping -WebApplication https:///sitename

This example returns all claim-to-user license mappings for the Web application with the URL
https://<server_name>/sites/sitename.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the URL, GUID, web application name, or instance of a web application object from which to get the user
license mappings. The type must be an URL in the form https://server_name or
https://server_name/sites/sitename, a valid GUID (for example, 12345678-90ab-cdef-1234-567890bcdefgh), a
web application name (that is, SharePoint - 80), or an instance of a web application object.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
Add-SPUserLicenseMapping
Remove-SPUserLicenseMapping
minutes to read • Edit Online

Get-SPUserLicensing
In ths Article

Returns the state of user-license enforcement.

Syntax
Get-SPUserLicensing [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPUserLicensing cmdlet returns the state of user-license enforcement for an entire SharePoint farm.
If user-license enforcement is enabled on a SharePoint farm, the return value is true. Otherwise the value is false.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE-------------

Get-SPUserLicensing

This example returns the state of user-license enforcement on the SharePoint farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Related Links
Disable-SPUserLicensing
Enable-SPUserLicensing
minutes to read • Edit Online

Get-SPUserSettingsProvider
In ths Article

Returns a list of User Settings Providers installed on the farm.

Syntax
Get-SPUserSettingsProvider [[-Identity] <SPUserSettingsProviderPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPUserSettingsProvider cmdlet to return a list of User Settings Providers. To return a list of a specific
user setting provider, use the Identity parameter. Otherwise, the list for the entire farm is returned.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE--------

C:\PS>$provider = Get-SPUserSettingsProvider

C:\PS>$site = Get-SPSite -Identity https://someserver

C:\PS>$user = $site.RootWeb.CurrentUser

C:\PS>$ctx = $provider.GetProviderContext($user)

C:\PS>$provider.GetUserRegionalSettings($ctx,$user)

This example returns the regional settings for a specified user.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the GUID ID for a User Settings Provider.

Type: SPUserSettingsProviderPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
New -SPUserSettingsProvider
Remove-SPUserSettingsProvider
Get-SPUserSettingsProviderManager
minutes to read • Edit Online

Get-SPUserSettingsProviderManager
In ths Article

Returns the User Settings Provider Manager.

Syntax
Get-SPUserSettingsProviderManager [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPUserSettingsProviderManager cmdlet to return the User Settings Provider Manager for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------EXAMPLE--------

Get-SPUserSettingsProviderManager

This example returns the User Settings Provider Manager for the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-SPUserSettingsProvider
New -SPUserSettingsProvider
Remove-SPUserSettingsProvider
minutes to read • Edit Online

Get-SPUserSolution
In ths Article

Returns a specified sandboxed solution.

Syntax
Get-SPUserSolution [[-Identity] <SPUserSolutionPipeBind>] -Site <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPUserSolution cmdlet returns a specified sandboxed solution. If the Identity parameter is not specified,
this cmdlet returns the collection of sandboxed solutions in the site collection. A user solution is a sandboxed
solution.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE---------------------

Get-SPUserSolution -Site https://sitename

This example displays information about sandboxed solutions in the site https://sitename.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the sandboxed solution to get.
The type must be a valid name of a user solution (for example, UserSolution1); or an instance of a valid
SPUserSolution object.

Type: SPUserSolutionPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the site collection that contains the sandboxed solution.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPUserSolutionAllowList
In ths Article

Gets the user managed solutions gallery configured on the specified web application.

Syntax
Get-SPUserSolutionAllowList [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-WebApplication <SPWebApplicationPipeBind> [-WhatIf] [<CommonParameters>]

Description
Gets the user managed solutions gallery configured on the specified web application.

Examples
Example 1

Get-SPUserSolutionAllowList -WebApplication https://webAppUrl

This example gets the user managed solutions gallery on the web application with root https://webAppUrl.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the web application to search for the user solution allow list.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Get-SPVisioExternalData
In ths Article

Returns the settings for external data connections for a Visio Services application.

Syntax
Get-SPVisioExternalData -VisioServiceApplication <SPVisioServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPVisioExternalData cmdlet reads the service settings for managing settings that are related to
connecting to external data.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------------

Get-SPVisioExternalData -VisioServiceApplication "VGS1"

This example gets settings related to external data for a Visio Services application.
------------------EXAMPLE 2------------------------

Get-SPVisioServiceApplication -identity "VGS1" | Get-SPVisioExternalData

This example uses a pipe bind to get settings related to external data for a Visio Services application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-VisioServiceApplication
Specifies the Visio Services application that contains the SPVisioExternalData object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.

Type: SPVisioServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPVisioPerformance
In ths Article

Returns the Visio Services settings for the performance of a Visio Services application.

Syntax
Get-SPVisioPerformance -VisioServiceApplication <SPVisioServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPVisioPerformance cmdlet reads the service settings for managing and configuring peformance for a
Visio Services application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE----------------------

Get-SPVisioPerformance -VisioServiceApplication "VGS1"

This example gets settings related to performance for a Visio Services application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-VisioServiceApplication
Specifies the Visio Services application that contains the SPVisioPerformance object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.

Type: SPVisioServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPVisioSafeDataProvider
In ths Article

Returns the settings of a safe data provider for a Visio Services application.

Syntax
Get-SPVisioSafeDataProvider -VisioServiceApplication <SPVisioServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-DataProviderId <String>] [-DataProviderType <Int32>]
[<CommonParameters>]

Description
The Get-SPVisioSafeDataProvider cmdlet retrieves the settings of the safe provider for a Visio Services
application. If the DataProviderID parameter is not specified, this cmdlet returns the collection of safe providers in
the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE 1----------------------

Get-SPVisioSafeDataProvider -VisioServiceApplication "VGS1"

This example returns a list of safe data providers for a specific Visio Services application.
-------------------EXAMPLE 2----------------------

Get-SPVisioSafeDataProvider -VisioServiceApplication "VGS1" -DataProviderID "SQLOLEDB" -DataProviderType 1

This example returns information about a specified safe data provider for a specific Visio Services application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataProviderId
Specifies the safe data provider to get. The combination of DataProviderID and DataProviderType uniquely identify
a data provider for a Visio Graphics Service application. The string that identifies the data provider can be a
maximum of 255 alphanumeric characters.
The type must be a valid string that identifies the data provider; for example, VisioDataProvider1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataProviderType
Specifies the supported type of the data provider to get. Custom data types are supported; for example, Excel
services.
The type must be a valid identity of a data provider type.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VisioServiceApplication
Specifies the Visio Services application that contains the SPVisioSafeDataProvider object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.

Type: SPVisioServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPVisioServiceApplication
In ths Article

Returns properties of a Visio Services application or a collection of Visio Services applications.

Syntax
Get-SPVisioServiceApplication [[-Identity] <SPVisioServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPVisioServiceApplication cmdlet retrieves the settings of the specified Visio Services application. If the
Identity parameter is not specified, this cmdlet returns the collection of Visio Services applications in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE 1-------------------------

Get-SPVisioServiceApplication

This example returns a collection of all Visio Services applications in the farm.
-----------------------EXAMPLE 2-------------------------

Get-SPVisioServiceApplication "VGS1"

This example returns properties of the VGS1 Visio Services application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the Visio Services application to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.

Type: SPVisioServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPVisioServiceApplicationProxy
In ths Article

Returns properties of a Visio Services application proxy or a collection of Visio Services application proxies.

Syntax
Get-SPVisioServiceApplicationProxy [[-Identity] <SPVisioServiceApplicationProxyPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPVisioServiceApplicationProxy cmdlet reads the settings of a Visio Services application proxy. If the
Identity parameter is not specified, this cmdlet returns the collection of Visio Services application proxies on the
farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE 1---------------------

Get-SPVisioServiceApplicationProxy

This example returns a list of Visio Services application proxies.


----------------EXAMPLE 2---------------------

Get-SPVisioServiceApplicationProxy "Connection to VGS2"

This example returns settings for a Visio Services application proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the Visio Services application proxy to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.

Type: SPVisioServiceApplicationProxyPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPWeb
In ths Article

Returns all subsites that match the given criteria.

Syntax
Get-SPWeb [[-Identity] <SPWebPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Filter <ScriptBlock>] [-Limit <String>] [-Regex] [-Site <SPSitePipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Get-SPWeb cmdlet returns all subsites that match the scope given by the Identity parameter. All subsites that
meet the criteria are returned.
The Identity can be either the full URL or a relative path. If you specify a relative path, you must also specify the
Site parameter to identify the site collection from which to return the subsite.
The Identity parameter also supports providing a partial URL that ends in a wildcard character (*). All subsites that
match this partial URL for the specified scope are returned. Additionally, if the Regex parameter is provided, the
Identity parameter is treated as a regular expression and any subweb with a URL provided in the given scope that
matches the expression is returned.
The Filter parameter is a server-side filter for certain subsite properties that are stored in the content database;
without the Filter parameter, filtering on these properties is a slow process. These subsite properties are Template
and Title. The Filter parameter is a script block that uses the same syntax as a Where-Object statement, but is run
server-side for faster results.
It is important to note that every site collection returned by the Get-SPWeb cmdlet is automatically disposed of at
the end of the pipeline. To store the results of Get-SPWeb in a local variable, the Start-SPAssignment and Stop-
SPAssignment cmdlets must be used to avoid memory leaks.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1----------------------

Get-SPWeb -site https://sitename/sites/site1

This example returns all the subwebs in a given site collection.


--------------------EXAMPLE 2----------------------

Get-SPWeb -Site https://sitename/sites/site1 -filter {$_.Template -eq "STS#0"}


This example displays all subsites that use the "STS#0" template.
--------------------EXAMPLE 3----------------------

Start-SPAssignment -Global

C:\PS>$w = Get-SPWeb https://sitename

C:\PS>$w.set_SiteLogoUrl("https://PathToImage/test.jpg")

C:\PS>$w.Update()

Stop-SPAssignment -Global

This example demonstrates how to save a subsite as a variable and to call object model methods on the
SPAssignment object.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies the server-side filter to use for the specified scope.
The type must be a valid filter in the form {filterName <operator> "filterValue"}.
Type: ScriptBlock
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name or full or partial URL of the subsite. If you use a relative path, you must specify the Site
parameter.
A valid URL in the form https://server_name or a relative path in the form of /SubSites/MySubSite.

Type: SPWebPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Limit
Limits the maximum number of subsites to return. The default value is 200. To return all sites, enter ALL
The type must be a valid number greater than 0 or ALL.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Regex
Specifies the URL that is provided by the Identity parameter is treated as a regular expression.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the URL or GUID of the site collection from which to list subsites.
The type must be a valid URL, in the form of https://server_name; a GUID, in the form 1234-5678-9807, or an
SPSite object.
Type: SPSitePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPWebApplication
In ths Article

Returns all Web applications that match the given criteria.

Syntax
Get-SPWebApplication [[-Identity] <SPWebApplicationPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-IncludeCentralAdministration] [<CommonParameters>]

Description
The Get-SPWebApplication cmdlet returns all Web applications that match the scope given by the Identity
parameter. The Identity can be the name of the name, URL, or GUID of the Web application. If no Identity is
specified, all Web applications are returned.
The Central Administration Web application is only returned if its exact identity is provided or the
IncludeCentralAdministration flag is provided.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1----------------------

C:\PS>$w = Get-SPWebApplication https://sitename

This example gets the Web application for https://sitename and stores it in a variable.
------------------EXAMPLE 2-----------------------

Get-SPWebApplication -IncludeCentralAdministration | Where { $_.DefaultServerComment -eq "SharePoint Central


Administration v4"} | Format-List *

This example displays all public properties on the SharePoint Central Administration Web application in list format.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the name, URL, or GUID of the Web application.
The type must be a valid URL, in the form https://server_name; a GUID, in the form 1234-5678-9876-0987; or a
valid name, in the form SPWebApplication - 1212.

Type: SPWebApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncludeCentralAdministration
Includes the Central Administration Web application in the collection of Web applications that can be returned. The
IncludeCentral Administration parameter must still meet any other filters provided.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPWebApplicationAppDomain
In ths Article

Returns all app domains for a specific web application.

Syntax
Get-SPWebApplicationAppDomain [[-Identity] <SPAppDomainPipeBind>] -AppDomain <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Zone <SPUrlZone>] [<CommonParameters>]

Get-SPWebApplicationAppDomain [[-Identity] <SPAppDomainPipeBind>] -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Zone <SPUrlZone>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Get-SPWebApplicationAppDoman cmdlet to return all app domains for a specific web application or for all
web applications. If you do not specify parameters, the default zone is used.

Examples
-----------EXAMPLE 1---------

Get-SPWebApplicationAppDomain

Returns a list of SPAppDomain objects, one for each of the app domains for all web applications in the farm.
-----------EXAMPLE 2---------

Get-SPWebApplicationAppDomain -Zone Default

Returns a list of SPAppDomain objects, one for each of the app domains for the Default zone for all web
applications in the farm.
-----------EXAMPLE 3---------

Get-SPWebApplicationAppDomain -WebApplication https://www.contoso.com

Returns a list of SPAppDomain objects, one for each of all the app domains for the specified web application for all
zones.
-----------EXAMPLE 4---------

Get-SPWebApplicationAppDomain -AppDomain contosoapps.com

Returns a list of SPAppDomain objects, one for each web application and zone pair that shares the specified app
domain.

Parameters
-AppDomain
Specifies the URI of the app domain.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the string of a domain name (that is, contoso.com) or a SPAppDomain object.

Type: SPAppDomainPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the GUID, URI, or name of the web application for which the app domain is being configured.
Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies the security zone to which the app domain will be assigned.
Default
Intranet
Internet
Extranet
Custom
If no value is specified, Default is applied.

Type: SPUrlZone
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.Administration.SPAppCmdlets.SPAppDomainPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
New -SPWebApplicationAppDomain
Remove-SPWebApplicationAppDomain
minutes to read • Edit Online

Get-SPWebApplicationHttpThrottlingMonitor
In ths Article

Returns all counters and their associated Health Score bucket values for network throttling on a Web application.

Syntax
Get-SPWebApplicationHttpThrottlingMonitor [-Identity] <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPWebApplicationHttpThrottlingMonitor cmdlet reads all counters for network throttling on a Web
application. This cmdlet returns a list that contains all of the performance counters and their associated Health
Score bucket values.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$s = get-SPWebApplicationHTTPThrottlingMonitors https://sharepoint

This example gets all performance counters that are being read in the network throttling monitor for the
https://sharepoint Web application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Returns throttling performance counter settings for the specified SharePoint Web application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPWebPartPack
In ths Article

Returns the Web Part packages that were installed for the specified scope.

Syntax
Get-SPWebPartPack [[-Identity] <String>] [-AssignmentCollection <SPAssignmentCollection>] [-GlobalOnly]
[-WebApplication <SPWebApplicationPipeBind>] [<CommonParameters>]

Description
The Get-SPWebPartPack cmdlet returns the installed Web Part packages that match the Identity parameter. The
scope of results can be narrowed by using the optional WebApplication parameter. The scope does not include any
Web Part packages installed in the global assembly cache (GAC ) unless the GlobalOnly parameter is used. If this
parameter is used, only Web Part packages that have been installed in the GAC are returned.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPWebPartPack -WebApplication http://zsharepoint2:80

This example returns all Web Part packages that have been installed on the Web application on port 80 in local
farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-GlobalOnly
Returns only Web Part packages that are installed in the global assembly cache (GAC ).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the full or partial name of the Web Part package from the configuration database.
The type must be a valid name of a Web Part package; for example, MyWebPartPackage.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the Web application from which to list Web Part packages. If no Web application is specified, the specified
Web Part packages will be returned from all Web applications.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPWebTemplate
In ths Article

Displays all globally installed site templates that match the given identity.

Syntax
Get-SPWebTemplate [[-Identity] <SPWebTemplatePipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-CompatibilityLevel <UInt32>] [<CommonParameters>]

Description
The Get-SPWebTemplate cmdlet displays all installed site templates that match the full or partial identity that was
given.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

C:\PS>$template = Get-SPWebTemplate "STS#0"

New-SPSite https://contoso.com -OwnerAlias "DOMAIN\JDOE" -Template $template

This example creates a site collection by using the team site Web template (ID=STS#0).
--------------EXAMPLE 2-----------------

Get-SPWebTemplate "STS*"

This example displays basic information about all the STS templates.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial
CompatibilityLevel value for the site collection. The values for this parameter can be either SharePoint Server or
SharePoint Server. When this parameter is not specified, the CompatibilityLevel will default to the highest possible
version for the Web application depending on the SiteCreationMode setting

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the Web template to display.
The type must be the ID or full or partial name of the Web template.

Type: SPWebTemplatePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPWebTemplatesEnabledForSiteMaster
In ths Article

Returns a list of site master web templates.

Syntax
Get-SPWebTemplatesEnabledForSiteMaster [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Get-SPWebTemplatesEnabledForSiteMaster cmdlet to display a full list of site master web templates in the
farm.

Examples
Example 1

Get-SPWebTemplatesEnabledForSiteMaster

This example displays all the site master web templates in a farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

Get-SPWOPIBinding
In ths Article

Returns a list of bindings that were created by using New -SPWOPIBinding on the current SharePoint farm where
this cmdlet is run.

Syntax
Get-SPWOPIBinding [-Action <String>] [-Application <String>] [-AssignmentCollection <SPAssignmentCollection>]
[-Extension <String>] [-ProgId <String>] [-Server <String>] [-WOPIZone <String>] [<CommonParameters>]

Description
The Get-SPWOPIBinding returns a list of bindings that were created by using New -SPWOPIBinding on the
current SharePoint farm where this cmdlet is run. Results include actions, applications, file types and zones that are
configured for a WOPI application (such as a server that runs Office Web Apps Server).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Get-SPWOPIBinding -Server "Server.corp.Contoso.com"

This example returns a list of bindings that were created on the current SharePoint farm where this cmdlet is run
for the WOPI application "Server.corp.Contoso.com." The WOPI application may be the server that runs Office
Web Apps Server.
--------------EXAMPLE 2-----------------

Get-SPWOPIZone | Get-SPWOPIBinding

This example returns a list of bindings that were created on the current SharePoint farm where this cmdlet is run
for the zone configured for the WOPI application.

Parameters
-Action
Specifies the action to return bindings for.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Application
Specifies the application to return bindings for.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Extension
Specifies the file name extension to return bindings for.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgId
Specifies the programmatic identifier (ProgID ) for an application to return bindings for.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Server
Specifies the name of WOPI application (such as a server that runs Office Web Apps Server) to return bindings for.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WOPIZone
Specifies the zone to return bindings for.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013

New -SPWOPIBinding
Set-SPWOPIBinding
Remove-SPWOPIBinding
minutes to read • Edit Online

Get-SPWOPISuppressionSetting
In ths Article

Returns the suppression settings on the current SharePoint farm where this cmdlet is run.

Syntax
Get-SPWOPISuppressionSetting [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPWOPISuppressionSetting cmdlet returns the suppression settings on the current SharePoint farm
where this cmdlet is run.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPWOPISuppressionSetting

This example returns all the suppression settings on the current SharePoint farm where this cmdlet is run. The
suppression settings returned include the DocType and WOPIAction.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013

New -SPWOPISuppressionSetting
Remove-SPWOPISuppressionSetting
minutes to read • Edit Online

Get-SPWOPIZone
In ths Article

Returns the zone that is configured on the current SharePoint farm for the WOPI application to use.

Syntax
Get-SPWOPIZone [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Get-SPWOPIZone returns the zone that is configured on the current SharePoint farm for the WOPI
application (such as a server that runs Office Web Apps Server) to use.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPWOPIZone

This example returns the zone that is configured for the WOPI application (such as a server that runs Office Web
Apps Server) to use. Return values may be "internal-http," "internal-https," "external-http" or "external-https."

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013

Set-SPWOPIZone
minutes to read • Edit Online

Get-SPWorkflowConfig
In ths Article

Returns workflow settings for the specified Web application.

Syntax
Get-SPWorkflowConfig [-SiteCollection] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Get-SPWorkflowConfig [-WebApplication] <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Get-SPWorkflowConfig cmdlet returns workflow settings for the Web application specified by the
WebApplication parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPWorkFlowConfig -webapplication https://sitename

This example gets workflow settings for the specified Web application (https://sitename).
To get farm-level workflow settings for event delivery time-out, postpone threshold, and batch size, use the Get-
SPFarmConfig cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteCollection
Specifies the name or URL of the site collection.
The only other parameter that is used with the SiteCollection parameter is the DeclarativeWorkflowsEnabled
parameter. No other parameters are used.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the name or URL of the Web application.
The type must be a valid name, in the form WebApplication-1212, or a URL, in the form
https://server_name/WebApplication-1212.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Get-SPWorkflowServiceApplicationProxy
In ths Article

Returns the Workflow Service Application Proxy.

Syntax
Get-SPWorkflowServiceApplicationProxy [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Returns the Workflow Service Application Proxy.

Examples
Example 1

Get-SPWorkflowServiceApplicationProxy

Returns the Workflow Service Application Proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Grant-SPBusinessDataCatalogMetadataObject
In ths Article

Grants a right to a principal for the specified Business Data Connectivity Metadata Store metadata object.

Syntax
Grant-SPBusinessDataCatalogMetadataObject -Identity <MetadataObject> -Principal <SPClaim> -Right <PSBdcRight>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-SettingId <String>] [-WhatIf]
[<CommonParameters>]

Description
The Grant-SPBusinessDataCatalogMetadataObject cmdlet grants the right to a specified principal (user) for a
Business Data Connectivity Metadata Store metadata object. This cmdlet checks to verify that the Identity
parameter is a valid IndividuallySecurableMetadata object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$claimJohn = New-SPClaimsPrincipal -Identity "CONTOSO\johndoe" -IdentityType WindowsSamAccountName


$Model = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Model" -ServiceContext http://contoso -Name
"ContosoModel"
Grant-SPBusinessDataCatalogMetadataObject -Identity $Model -Principal $claimJohn -Right Edit

This example gives Edit permissions to the user with the identity johndoe on domain CONTOSO, for the model
metadata object with the name ContosoModel.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Business Data Connectivity Metadata Store metadata object that contains the principal.

Type: MetadataObject
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Principal
Specifies the principal to whom the rights apply.
The type must be a claim.

Type: SPClaim
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Right
Specifies the right to grant the principal.
The type must be one of the following valid PSBdcRight object types: All, Execute, Edit, SetPermissions, or
SelectableInClients.

Type: PSBdcRight
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SettingId
Specifies the model slice for which to grant the right.
The type must be a valid string that identifies a model slice; for example, ModelSlice1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Grant-SPObjectSecurity
In ths Article

Adds a new security principal to an SPObjectSecurity object.

Syntax
Grant-SPObjectSecurity [-Identity] <SPObjectSecurity> [-Principal] <SPClaim> [-Rights] <String[]>
[-AssignmentCollection <SPAssignmentCollection>] [-Replace] [<CommonParameters>]

Description
The Grant-SPObjectSecurity cmdlet adds a new security principal, such as a user, to a SPObjectSecurity object. An
SPObjectSecurity object is a common object that is used to represent the security access control list (ACL ) of
SharePoint administrative objects, in particular, service applications.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$principal = New-SPClaimsPrincipal "CONTOSO\JaneDoe" -IdentityType WindowsSamAccountName


$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'User Profile Service Application'}
$security = Get-SPServiceApplicationSecurity $sa -Admin
Grant-SPObjectSecurity $security $principal "Full Control"
Set-SPServiceApplicationSecurity $sa -Admin $security

This example retrieves the SPObjectSecurity object corresponding to the administrator ACL on the User Profile
Service Application and adds a new user principal to that ACL.
The new user is an administrator for the service application $serviceApp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the SPObjectSecurity object to which the new security principal is added. You can use the Get-
SPServiceApplicationSecurity cmdlet to get a SPObjectSecurity object .

Type: SPObjectSecurity
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Principal
Specifies the principal to whom the rights apply.
The type must a valid name a principal; for example, Full Control.

Type: SPClaim
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Replace
Replaces the existing rights on the SPObjectSecurity object with the new rights specified. If this parameter is not
specified, the new rights are added to the existing rights.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rights
Specifies the rights granted to the principal.
The type must a valid array of strings that represents the rights granted to the principal.

Type: String[]
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPAccessServicesDatabase
In ths Article

Imports an Access Services Database to a DACPAC via the Data-Tier Framework.

Syntax
Import-SPAccessServicesDatabase [-AssignmentCollection <SPAssignmentCollection>] -Bacpac <Byte[]>
-DatabaseName <String> -ServerReferenceId <Guid> [<CommonParameters>]

Description
This cmdlet exports an Access Services Database to a DACPAC. The cmdlet requires the Data-Tier Framework to
be installed on the SharePoint server where the cmdlet is run. The Data-Tier Framework packages can be found at
Microsoft® SQL Server® Data-Tier Application Framework (17.4.1 GA DacFx). Install the following MSI from the
download:
EN\x86\DacFramework.msi
Note: The x86 package is required. The x64 package is not compatible with this cmdlet.
See more information about Data-Tier Framework at Data-tier Applications.

Examples
Example 1

$accessDb = Get-SPAccessServicesDatabaseServer -ServiceContext http://site_url -DatabaseServer SQLSERVERNAME -


DatabaseServerGroup DEFAULT
Import-SPAccessServicesDatabase -DatabaseName accessDatabaseName -ServerReferenceId $accessDb.ServerReferenceId
-Bacpac (Get-Content -Path C:\accessDb.bacpac -Encoding Byte)

This example gets the ServerReferenceId value of the SQL Server for the Access Services Service Application; -
DatabaseServerGroup is set to the value DEFAULT by default. The next step is to import the bacpac file to a byte
array and finally, import the Access Services Database as the specified SQL database name to the specified SQL
Server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Bacpac
A byte array of the bacpac file.

Type: Byte[]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseName
The name of the database to create from the bacpac file.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServerReferenceId
The ServerReferenceId to be used for the Access Database.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
System.String
System.Guid System.Byte[] Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Import-SPAppPackage
In ths Article

Imports an app package.

Syntax
Import-SPAppPackage -Path <String> -Source <SPAppSource> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [-AssetId <String>] [-ContentMarket <String>] -Site <SPSitePipeBind> [<CommonParameters>]

Description
Use the Import-SPAppPackage cmdlet to import an app package from the content database and create an app
inside the site collection by using the SiteCollection parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE----------

Import-SPAppPackage -Path .\feature-upgrade-v1.spapp -Site https://localhost -Source


([microsoft.sharepoint.administration.spappsource]::ObjectModel)

This example imports an app package.

Parameters
-AssetId
Specifies the Asset Id to import.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentMarket
Specifies the name of the content market.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path of the input file.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the SPSite object to import.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Source
Defines the source of the app. The source indicates where the app package originates from, for example, if the app
was built by a developer but did not reside on the SharePoint Marketplace, you might use the CorporateCatalog
source.
The following are valid values:
InvalidSource, Marketplace, CorporateCatalog, DeveloperSite, ObjectModel, RemoteObjectModel
The following are valid sources (not parameters of -Source) of the app:
--SharePoint Store (Marketplace)
--App catalog (CorporateCatalog)
--SharePointService - Indicates apps that were built in place with SharePoint features, for example Access Services
(ObjectModel)

Type: SPAppSource
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Export-SPAppPackage
minutes to read • Edit Online

Import-SPBusinessDataCatalogDotNetAssembly
In ths Article

Imports a .NET Connectivity assembly.

Syntax
Import-SPBusinessDataCatalogDotNetAssembly -LobSystem <LobSystem> -Path <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DependentAssemblyPaths <String[]>] [-WhatIf]
[<CommonParameters>]

Description
The Import-SPBusinessDataCatalogDotNetAssembly cmdlet imports a .NET Connectivity Assembly that
corresponds to a .NET Assembly Connector and LobSystem in the metadata store.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE 1----------------

Import-SPBusinessDataCatalogDotNetAssembly -LobSystem $ContosoDB -Path "c:\Folder\Assembly.dll"

This example imports the assembly Assembly.


-----------------EXAMPLE 2----------------

Import-SPBusinessDataCatalogDotNetAssembly -LobSystem $ContosoDB -Path "c:\Folder\Assembly.dll" -


DependentAssemblyPaths "c:\Folder\Assembly2.dll","c:\Folder\Assembly3.dll"

This example imports the assembly Assembly, and also imports the dependent assemblies Assembly2 and
Assembly3.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DependentAssemblyPaths
Specifies a list of paths to dependent assemblies.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LobSystem
Specifies the LobSystem that the assembly corresponds to.

Type: LobSystem
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path to the primary assembly.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPBusinessDataCatalogModel
In ths Article

Imports a Business Data Connectivity Model.

Syntax
Import-SPBusinessDataCatalogModel -Identity <MetadataObject> -Path <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force] [-LocalizedNamesIncluded]
[-ModelsIncluded] [-PermissionsIncluded] [-PropertiesIncluded] [-SettingId <String>] [-WhatIf]
[<CommonParameters>]

Import-SPBusinessDataCatalogModel -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-Force] [-LocalizedNamesIncluded] [-ModelsIncluded] [-PermissionsIncluded] [-PropertiesIncluded]
[-SettingId <String>] [-WhatIf] -ServiceContext <SPServiceContextPipeBind> [<CommonParameters>]

Description
The Import-SPBusinessDataCatalogModel cmdlet imports a Business Data Connectivity Model. There are two
types of Business Data Connectivity models: Model type (.bdcm) and Resource type (.bdcr). The Model type
contains the base XML metadata, and can also include resource properties. The Resource type includes only
resource properties.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$MetadataStore = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "Catalog" -ServiceConext


https://contoso
Import-SPBusinessDataCatalogModel -Path "C:\folder\model.bdcm" -Identity $MetadataStore

This example gets the Business Data Connectivity Metadata Store and then imports a Business Data Connectivity
Model of Model type to it from the path specified with the name model.
------------------EXAMPLE 2------------------

Import-SPBusinessDataCatalogModel -Path "C:\Program Files\Duet Enterprise\2.0\BDC Models\Reporting.en-us.bdcr -


Identity $bdcCatalog -ModelsIncluded:$false

This example imports a resource only file by using the ModelsIncluded parameter.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites the Business Data Connectivity Model if the file exists.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Business Data Connectivity Metadata Store metadata object to import to.

Type: MetadataObject
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LocalizedNamesIncluded
Specifies that names for business data fields in multiple languages are imported.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ModelsIncluded
Specifies that models are included in the imported Business Data Connectivity Model file. A model contains the
base XML metadata for a system.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path and name to use.
The type must be a valid path in either of the following forms:
C:\folder_name\file.bdcm
\\server_name\folder_name\file.bdcm
...\folder_name\file.bdcm

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionsIncluded
Specifies that permissions from the Business Data Connectivity Model are imported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertiesIncluded
Specifies that properties from the Business Data Connectivity Model are imported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ServiceContext
Specifies the service context to set.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SettingId
Specifies the custom environment settings model slice to import.
The type must be a valid string that identifies a model slice; for example, ModelSlice1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPEnterpriseSearchCustomExtractionDictionary
In ths Article

Imports a custom extraction dictionary.

Syntax
Import-SPEnterpriseSearchCustomExtractionDictionary -DictionaryName <String> -FileName <String>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet imports a custom extraction dictionary from a .cvs file and deploys it to the extraction sub flow.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$searchApp = Get-SPEnterpriseSearchServiceApplication
Import-SPEnterpriseSearchCustomExtractionDictionary -SearchApplication $searchApp -Filename
c:\transfer\entity_extraction.csv -DictionaryName Microsoft.UserDictionaries.EntityExtraction.Custom.Word.1

This example imports the custom extraction dictionary that is located at c:\transfer to the default search service
application. The entries of this dictionary will be matched in a case-insensitive way against the terms in the
documents being indexed.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DictionaryName
Specifies the name of the target dictionary. The name must be one of the following 12 predefined dictionaries. The
name signifies the "case sensitivity" and "token matching" behavior.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileName
Specifies the file path of the .cvs file to be imported

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application to which the custom extraction dictionary should be imported.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPEnterpriseSearchPopularQueries
In ths Article

Imports queries from a comma-separated list. The search box will suggest these queries as users type.

Syntax
Import-SPEnterpriseSearchPopularQueries -ResultSource <Source>
-SearchApplicationProxy <SearchServiceApplicationProxyPipeBind> -Web <SPWeb>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Filename <String>] [-WhatIf]
[<CommonParameters>]

Description
The Import-SPEnterpriseSearchPopularQueries cmdlet imports queries from a comma-separated list. As the user
types a query in the search box, the search box will suggest queries from the comma-separated list. The search box
bases these suggestions on:
The SPWeb the search box is located on.
The Result Source configured on the search box.
For example, if the search box is located on the "Engineering" SPWeb, the suggested queries will differ from if the
search box is located on the "Management" SPWeb. Likewise, if the Result Source on the search box is "Local
SharePoint Results", the suggested queries will differ from if the Result Source is "Conversations".
The comma-separated list must consist of one line per query, where each line contains the following items:
Query Text. The actual query expression.
Query Count. The number of times this query was executed.
Click Count. The number of times any user clicked any result for this query.
LCID. The locale identifier (LCID ) for the language of the query.
Each line must use the formatting: Query Text,Query Count,Click Count,LCID. For example, Company
store,100,80,1033. For suggestions to appear in the search box, the Click Count value must be more than five. The
search box ranks query suggestions by their Click Count values (approximately).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------EXAMPLE--------
$ssap = Get-SPEnterpriseSearchServiceApplicationProxy
$hostname = hostname
$web = get-spsite | get-spweb | where {$_.Url-eq "https://$hostname"}
$owner = new-object Microsoft.Office.Server.Search.Administration.SearchObjectOwner -ArgumentList
@([Microsoft.Office.Server.Search.Administration.SearchObjectLevel]::SPWeb,$web)
$mgr = new-object Microsoft.Office.Server.Search.Administration.Query.FederationManager -ArgumentList $ssap
$source = $mgr.GetSourceByName("Local SharePoint Results", $owner)
Import-SPEnterpriseSearchPopularQueries -SearchApplicationProxy $ssap -Filename C:\input.txt -ResultSource
$source -Web $web

This example uses the Import-SPEnterpriseSearchPopularQueries cmdlet to import the queries file that is named
C:\input.txt and associate with it the Result Source referenced by $source and the SPWeb referenced by $web. The
example defines the variable $web as the SPWeb with URL https://hostname, and the variable $source as the
Result Source named "Local SharePoint Results" at the SPWeb referenced by $web.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filename
Specifies the full UNC (Universal Naming Convention) path of the file to import.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResultSource
Specifies the Result Source to associate with the imported queries. The type must be an instance of a valid Source
object.

Type: Source
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplicationProxy
Specifies the proxy for the search application to which the queries file should be imported. The type must be a valid
GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application proxy name (for example,
SearchAppProxy1); or an instance of a valid SearchServiceApplicationProxy object.

Type: SearchServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Web
Specifies the SPWeb to associate with the imported queries. The type must be an instance of a valid SPWeb object.

Type: SPWeb
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPEnterpriseSearchThesaurus
In ths Article

Deploys the dictionary to the thesaurus component in the query processing flow.

Syntax
Import-SPEnterpriseSearchThesaurus -FileName <String> -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet imports a thesaurus dictionary using a .cvs file, and deploys it to the query processing flow. A
previously deployed thesaurus is overwritten by an import of a new .cvs file.
NOTE: If an empty .cvs file is imported, an empty thesaurus will be deployed. No synonyms will then be added to
the queries.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

C:\PS>$searchApp = Get-SPEnterpriseSearchServiceApplication
Import-SPEnterpriseSearchThesaurus -SearchApplication $searchApp -Filename
\\host\share\thesaurus.csv

This example imports a thesaurus dictionary .cvs file named thesaurus.csv that is located at \\host\share to the
default search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileName
Specifies the full UNC (Universal Naming Convention) path of the .cvs file to be imported.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application to which the thesaurus dictionary should be imported

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPEnterpriseSearchTopology
In ths Article

Imports and activates a topology from an XML file.

Syntax
Import-SPEnterpriseSearchTopology -Filename <String> -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Import-SPEnterpriseSearchTopology cmdlet imports from an XML file the topology for a shared search
application. The Export-SPEnterpriseSearchTopology cmdlet is used to save a search topology.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Import-SPEnterpriseSearchTopology -SearchApplication $ssa -Filename .\topology.xml

This example imports a topology from a file named topology.xml to the default search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filename
Specifies the path and file name of the topology XML file to import.
The type must be a valid path, in the form MyFeature\Feature.xml.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application to which to apply the topology.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchTopology
Get-SPEnterpriseSearchTopology
Set-SPEnterpriseSearchTopology
Remove-SPEnterpriseSearchTopology
minutes to read • Edit Online

Import-SPInfoPathAdministrationFiles
In ths Article

Imports InfoPath form templates and .udcx files that are located on the SharePoint Central Administration Web
site.

Syntax
Import-SPInfoPathAdministrationFiles [-Path] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Identity <SPFormsServicePipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Import-SPInfoPathAdministrationFiles cmdlet imports InfoPath form templates (.xsn files) and universal data
connections (.udcx files) that are located on the SharePoint Central Administration Web site into the specified
InfoPath Forms Services service. This cmdlet imports from a backup package that includes all workflow forms in
InfoPath that were deployed by an administrator and not included with SharePoint Foundation, and browser forms
that were deployed by an administrator.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Import-SPInfoPathAdministrationFiles -path "backupfiles.cab"

This example imports form templates (XSN files) and universal data connections (UDCX files) located on the
SharePoint Central Administration Web site into the specified Forms service.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the destination InfoPath Forms Services service for the import.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a forms
service (for example, FormsService1); or an instance of a valid SPFormsService object.

Type: SPFormsServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the location of the .cab file to import.
The type must be a valid file path, in the form \\ipadmin\folder\backups1\ipfsfiles.cab.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPMetadataWebServicePartitionData
In ths Article

Restores the data for a site subscription.

Syntax
Import-SPMetadataWebServicePartitionData [-Identity] <SPSiteSubscriptionPipeBind>
[-ServiceProxy] <SPMetadataServiceProxyCmdletPipeBind> -Path <String>
[-AssignmentCollection <SPAssignmentCollection>] [-OverwriteExisting] [-NoCompression]
[-ToContentDatabase <SPContentDatabasePipeBind>] [-ToServiceDatabase] [<CommonParameters>]

Description
Use the Import-SPMetadataWebServicePartitionData cmdlet to restore data for a site subscription to a shared
service application for the Metadata Service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE----------------------

$subscription = Get-SPSIteSubscription -Identity https://site_url


$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'Managed Metadata Service Connection'}
Import-SPMetadataWebServicePartitionData -Identity $subscription -ServiceProxy $proxy -Path
"\\server_name\folder_name\file_name.cab"

This example restores a backup of Metadata Service application data for a specific site subscription on a Metadata
Service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the site subscription to import.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site
subscription (for example, SiteSubscriptionConfig1); or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoCompression
{{Fill NoCompression Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OverwriteExisting
Specifies whether to overwrite the existing site subscription data, if it exists.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path and name of the subscription data file to import.
The type must be a valid path in either of the following forms:
C:\folder_name\formtemplate_name
\\server_name\folder_name\file_name.cab
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceProxy
Specifies the proxy for the service application that contains the site subscription.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of the
service application proxy (for example, ServiceAppProxy1); or an instance of a valid SPMetadataServiceProxy
object.

Type: SPMetadataServiceProxyCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ToContentDatabase
{{Fill ToContentDatabase Description}}

Type: SPContentDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ToServiceDatabase
{{Fill ToServiceDatabase Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPPerformancePointContent
In ths Article

Imports a Performance Point Server (PPS ) dashboard.

Syntax
Import-SPPerformancePointContent [-AssignmentCollection <SPAssignmentCollection>] -DatasourceMap <Hashtable>
-ImportFileUrl <String> -LocationMap <Hashtable> -MasterPageUrl <String> -SiteDestination <SPWebPipeBind>
[<CommonParameters>]

Description
The Import-SPPerformancePointContent imports a PPS dashboard and its dependencies from a CMP file that can
then be used to import to another server.

Examples
Example 1

$ContentList = @{"/bi/Dashboard Content" = "/biprod/Dashboard Content"; "/bi/My Projects" = "/biprod/My


Projects"}
$DatasourceList = @{"/bi/DataConnections/AdventureWorks.ppsdc" =
"/myBi/libraries/DataConnections/AdventureWorks_prod.ppsdc"; "/bi/DataConnections/AW 2008 Cubes4.ppsdc" =
"/myBi/libraries/DataConnections/AW 2008 Cubes3.ppsdc"; "/sales/DataConnections/Excel DS.ppsdc" =
"/marketing/PPS Data Sources/PDW 2010.ppsdc"}
Import-SPPerformancePointContent -ImportFileURL "https://contoso.com/biprod/DocumentLibrary/Dashboard1.cmp" -
SiteDestination "https://contoso.com/biprod/" -LocationMap $ContentList -DatasourceMap $DatasourceList -
MasterPage "marketing and sales.master"

This example imports a dashboard by using the $Datasourcelist and $ContentList variables.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatasourceMap
Maps existing or adds new data sources to destination library.

Type: Hashtable
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ImportFileUrl
Path and Name of the CMP file created in the export command.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocationMap
Maps the locations between source lists and destination lists.

Type: Hashtable
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MasterPageUrl
Specifies which master page to use for imported dashboards.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteDestination
Specifies the site to which the dashboard will be deployed. Also used to determine the location of the import Key
Performance Indicator (KPI).
Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPWebPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Import-SPScaleOutDatabaseTenantData
In ths Article

Imports data from the specified subscription id.

Syntax
Import-SPScaleOutDatabaseTenantData -FilePath <String> -ServiceApplication <SPServiceApplicationPipeBind>
-SiteSubscriptionId <Guid> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Import-SPScaleOutDatabaseTenantData cmdlet to import data from the specified file for the specified
subscription id to the specified service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE----------

Import-SPScaleOutDatabaseTenantData -FilePath "C:\TenantData.dat" -ServiceApplication $serviceApplication -


SiteSubscriptionId "5CAF2F99-A75F-4239-B9CD-7FE63D1CE904"

This example imports data from the file at C:\TenantData.dat, to the specified service application and marks all the
imported data with the site subscription id 5CAF2F99-A75F -4239-B9CD -7FE63D1CE904.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePath
Specifies the absolute path to the data file.
An absolute path includes the root directory and all sub-directories.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application to import the data to.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscriptionId
Specifies the site subscription id to import the data from. This value will replace the site subscription id value from
the data file.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Clear-SPScaleOutDatabaseTenantData
Export-SPScaleOutDatabaseTenantData
minutes to read • Edit Online

Import-SPServerScaleOutDatabaseTenantData
In ths Article

Imports data from the specified subscription id.

Syntax
Import-SPServerScaleOutDatabaseTenantData -FilePath <String> -ServiceApplication <SPServiceApplicationPipeBind>
-SiteSubscriptionId <Guid> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Import-SPServerPScaleOutDatabaseTenantData cmdlet to import data from the specified file for the
specified subscription id to the specified service application.

Examples
-------------EXAMPLE----------

Import-SPServerScaleOutDatabaseTenantData -FilePath "C:\TenantData.dat" -ServiceApplication $serviceApplication


-SiteSubscriptionId "5CAF2F99-A75F-4239-B9CD-7FE63D1CE904"

This example imports data from the file at C:\TenantData.dat, to the specified service application and marks all the
imported data with the site subscription id 5CAF2F99-A75F -4239-B9CD -7FE63D1CE904.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilePath
Specifies the absolute path to the data file.
An absolute path includes the root directory and all sub-directories.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application to import the data to.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscriptionId
Specifies the site subscription id to import the data from. This value will replace the site subscription id value from
the data file.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Clear-SPServerScaleOutDatabaseTenantData
Export-SPServerScaleOutDatabaseTenantData
minutes to read • Edit Online

Import-SPSiteSubscriptionBusinessDataCatalogConfig
In ths Article

Imports data associated with an exported file that contains all data associated with the Business Data Connectivity
Metadata Store for a given partition.

Syntax
Import-SPSiteSubscriptionBusinessDataCatalogConfig -Path <String> -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-LocalizedNamesIncluded] [-ModelsIncluded]
[-PermissionsIncluded] [-PropertiesIncluded] [-ProxiesIncluded] [-WhatIf] [<CommonParameters>]

Description
Use the Import-SPSiteSubscriptionBusinessDataCatalogConfig cmdlet to import a data file that contains Business
Data Connecitivity models and all data associated with the Business Data Connectivity Metadata Store for a given
partition.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE---------------------------

Import-SPSiteSubscriptionBusinessDataCatalogConfig -Path "C:\folder\importFile.xml" -ServiceContext


http://contoso

This example imports the data file named importFile.xml.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocalizedNamesIncluded
Specifies that names for business data fields in multiple languages be imported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ModelsIncluded
Specifies that Business Data Connectivity models be included in the imported file.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path and name to use to create the export file.The type must be a valid path in either of the following
forms:
C:\folder_name
\\server_name\folder_name
..\folder_name\file.xml
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionsIncluded
Specifies that permissions from the Business Data Connectivity model be exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertiesIncluded
Specifies that properties from the Business Data Connectivity model be imported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxiesIncluded
Specifies that proxies for Business Data Connectivity Service Applications be exported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context of the data to be exported.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
context (for example, http://ServiceContext1); or an instance of a valid SPServiceContext object.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPSiteSubscriptionSettings
In ths Article

Restores a backup of subscription site settings to the given subscription identifier.

Syntax
Import-SPSiteSubscriptionSettings [-Identity] <SPSiteSubscriptionPipeBind> -Path <String> [-AdminProperties]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
The Import-SPSiteSubscriptionSettings cmdlet restores a backup of subscription site settings to the given
subscription identifier when the Identity parameter is used. To overwrite existing settings, use the Force parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

$subscription = Get-SPSiteSubscription https://site_url


Import-SPSiteSubscriptionSettings -Identity $subscription -Path "C:\backups\contoso_settings_file.bak" -Force

This example restores the subscription settings store of contoso.com.

Parameters
-AdminProperties
Specifies that only administrator subscription properties are imported. If this parameter is not set, only non-
administrator subscription properties are imported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
If a setting key already exists, determines whether the value must be overwritten with the value in the backup file.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the ID of the subscription to restore .
The type must be a valid URL, in the form https://site_url, or a GUID, in the form XXXXXXXX-XXXX-XXXX-XXXX-
XXXXXXXXXXXX.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path
Specifies the location of the input file.
The type must be a valid path, in the form C:\filename.bak.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Import-SPWeb
In ths Article

Imports a web, list, or library.

Syntax
Import-SPWeb [-Identity] <SPWebPipeBind> -Path <String> [-ActivateSolutions]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force] [-HaltOnError] [-HaltOnWarning]
[-IncludeUserCustomAction <SPIncludeUserCustomAction>] [-IncludeUserSecurity] [-NoFileCompression]
[-NoLogFile] [-UpdateVersions <SPUpdateVersions>] [-WhatIf] [-PreserveDeletedUserMetadataReferences]
[<CommonParameters>]

Description
The Import-SPWeb cmdlet imports a web, list, or library. The capability to import from a library is a new feature in
SharePoint Products.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE----------------------

Import-SPWeb https://site -Path export.cmp -UpdateVersions Overwrite

This example imports the contents of export.cmp into a site at https://site, overwriting the versioned content on the
site with the contents of the export.cmp file.

Parameters
-ActivateSolutions
Specifies whether user solutions are activated during import.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
This parameter has no function in this cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HaltOnError
Stops the import process when an error occurs.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HaltOnWarning
Stops the import process when a warning occurs.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the Web to import into.
The type must be a valid URL, GUID, or object; for example, a valid URL, in the form https://server_name, or a
GUID, in the form, 1234-4567-5678a.

Type: SPWebPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncludeUserCustomAction
Specifies whether User Custom Actions are included during import.
Valid values are:
All, None

Type: SPIncludeUserCustomAction
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeUserSecurity
Preserves the user security settings.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoFileCompression
Either enables or disables file compression in the import package. The import package is stored in the folder
specified by the Path parameter or Identity parameter. We recommend that you use this parameter for
performance reasons. If compression is enabled, the import process can increase by approximately 30 percent.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoLogFile
Suppresses the generation of an import log file. If this parameter is absent, the Import-SPWeb cmdlet will generate
an export log file in the same location as the export package. The log file uses Unified Logging Service (ULS ).
We recommend that you use this parameter. However, for performance reasons, you might not want to generate a
log file.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the name of the import file.
If the NoFileCompression parameter is used, a directory must be specified; otherwise, any file format is valid.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreserveDeletedUserMetadataReferences
Attempts to opulates the 'Author' ('Created By') field for items even if the SPUser object was marked as deleted on
the destination site.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UpdateVersions
Indicates how to resolve situations where a file to be imported to a site already exists in that site. If the
UpdateVersions parameter is absent, the import operation by default uses a value of 1 (Append).
The type must be any one of the following:
-Append, which adds new versions to the current file
-Overwrite the file and all of its versions (delete then insert)
-Ignore the file if it exists on the destination
The default value is Add new versions to the current file.
Valid values are:
Append, Ignore, Overwrite

Type: SPUpdateVersions
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Initialize-SPResourceSecurity
In ths Article

Enforces resource security on the local server.

Syntax
Initialize-SPResourceSecurity [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Initialize-SPResourceSecurity cmdlet enforces resource security on the local server. This cmdlet enforces
security for all resources, including files, folders, and registry keys.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Initialize-SPResourceSecurity

This example enforces resource security on the local server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Initialize-SPStateServiceDatabase
In ths Article

Installs the state database schema into a state service database.

Syntax
Initialize-SPStateServiceDatabase [-Identity] <SPStateDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Initialize-SPStateServiceDatabase cmdlet installs the session state database schema in an empty state service
database. The current user's credentials are used to create the state database schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

$db = Get-SPStateServiceDatabase -Identity StateServceDbName


Initialize-SPStateServiceDatabase -Identity $db

This example installs the state service database schema into the database associated with the provided identity.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service database to initialize.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a state
database (for example, StateSvcDB1); or an instance of a valid SPStateServiceDatabase object.

Type: SPStateDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Install-FASTSearchAdminDatabase
In ths Article

Installs the database used by the Microsoft FAST Search Server 2010 for SharePoint administration services.

Syntax
Install-FASTSearchAdminDatabase [-DbConnection <String>] [-DbName <String>] [-DbServer <String>] [-Force]
[-Upgrade <Boolean>] [<CommonParameters>]

Description
This cmdlet installs the database used by the FAST Search Server 2010 for SharePoint administration services.
This cmdlet is primarily called during installation, by the FAST Search Server 2010 for SharePoint installer.
The administration database default name is "FASTSearchAdminDatabase" and should be located in the Microsoft
SQL Server instance specified by the DbServer or DbConnection parameters.
In addition to performing an initial installation of the database schema, this cmdlet can also:
-- Reinstall (destructively) the database schema if it already exists. -- Upgrade the database schema from an earlier
version.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Install-FASTSearchAdminDatabase -DbConnection "Data


Source=sqlserver.contoso.com;Database=FASTSearchAdminDatabase;integrated Security=True;"

This example installs the database schema in the database server specified by the connection string.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Install-FASTSearchAdminDatabase -Upgrade -DbServer "sqlserver.contoso.com"

This example upgrades the database schema already installed in the FAST Search Server 2010 for SharePoint
administration database on the given SQL Server instance.
---------------EXAMPLE 3----------------- (FAST Server for SharePoint 2010)

Install-FASTSearchAdminDatabase -Force -DbServer "sqlserver.contoso.com"


This example deletes and reinstalls the database schema already installed in the FAST Search Server 2010 for
SharePoint administration database on the given SQL Server instance.

Parameters
-DbConnection
Specifies the database connection string for the FAST Search Server 2010 for SharePoint administration database,
in the same format as the ConnectionString property of the System.Data.SqlClient.SqlConnection .NET Framework
type.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DbName
Specifies the name of the FAST Search Server 2010 for SharePoint administration database.
The name only takes effect when used in conjunction with the DbServer parameter, not the DbConnection
parameter.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DbServer
Specifies the database server instance that contains the FAST Search Server 2010 for SharePoint administration
database.
Only one of the DbServer and DbConnection parameters must be specified. Using DbServer with a value of
sqlserver.contoso.com is equivalent to using DbConnection with the value "Data
Source=sqlserver.contoso.com;Database=FASTSearchAdminDatabase;integrated Security=True"

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
The Force parameter specifies that the FAST Search Server 2010 for SharePoint administration database already
exists, but should be reinstalled.
This will delete all data that already exists in the database.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Upgrade
Specifies that the FAST Search Server 2010 for SharePoint administration database already exists and that it
should be upgraded, because it uses an older version of the database schema.
The upgrade process will attempt to migrate all data to the new database schema.
It is strongly recommended that you back up the database before performing this operation.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Uninstall-FASTSearchAdminDatabase
minutes to read • Edit Online

Install-SPApp
In ths Article

Installs an instance of an app.

Syntax
Install-SPApp -Identity <SPApp> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
-Web <SPWebPipeBind> [<CommonParameters>]

Description
Use the Install-SPApp cmdlet to install an instance of an app within a web application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE------------

$spapp = Import-SPAppPackage -Path .\feature-upgrade-v1.spapp -Site https://site_url -Source


([microsoft.sharepoint.administration.spappsource]::ObjectModel)
Install-SPApp -Web https://site_url -Identity $spapp

This example installs an app by first importing the app package, and then installing it.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the app to install. The App object is created by using the Import-SPAppPackage cmdlet.

Type: SPApp
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Web
Specifies the SPWeb object of the app.

Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Import-SPAppPackage
minutes to read • Edit Online

Install-SPApplicationContent
In ths Article

Copies shared application data to existing Web application folders.

Syntax
Install-SPApplicationContent [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Install-SPApplicationContent cmdlet copies shared application data to existing Web application folders.
This cmdlet does not take any parameters.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE--------------------

Install-SPApplicationContent

This example copies data to a Web application in the existing folders.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Notes
During a Cummulative Update installation if you face a situation where the full PSConfig cannot run then this
cmdlet should be executed on all SharePoint servers to keep the Farm in a supported state.
minutes to read • Edit Online

Install-SPDataConnectionFile
In ths Article

Installs the provided data connection file.

Syntax
Install-SPDataConnectionFile [-Path] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Category <String>] [-Confirm] [-Overwrite] [-WebAccessible] [-WhatIf] [<CommonParameters>]

Description
The Install-SPDataConnectionFile cmdlet installs the provided data connection file. If the specified data connection
file exists, the user is prompted to replace the existing file.
This cmdlet does not create a new file. Instead, it creates a new data connection file object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Install-SPDataConnectionFile -Path 'C:\folder\sample.udcx' -Category "Install" -WebAccessible $true

This example uploads a data connection file to a specified category.


This cmdlet is equivalent to the Upload Data Connection File user interface setting that is located on the Manage
Data Connection Files page of the SharePoint Central Administration Web site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Category
Sets an arbitrary category on the file which can be used to group the files. The category name can have a
maximum of 255 characters.
The type must be a valid string value; for example, Category1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Overwrites the existing data connection file. The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the full path to the name of the file in the data connection store.
The type must be the name of a valid data connection file; for example, C:\foldername\myconnection.udcx.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WebAccessible
Specifies that the universal data connection file can be accessed by using the Web service. If False, only the Forms
Server can retrieve the universal data connection files internally. The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Install-SPEduSites
In ths Article

Do not use

Syntax
Install-SPEduSites [-WebApplication] <SPWebApplicationPipeBind> [-MySiteHost] <SPSitePipeBind>
[-SearchCenter] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Do not use

Examples
Example 1

Do not use

Parameters
-AssignmentCollection
Do not use

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteHost
Do not use

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-SearchCenter
Do not use
Type: SPSitePipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WebApplication
Do not use

Type: SPWebApplicationPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPSitePipeBind Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Install-SPFeature
In ths Article

Installs a SharePoint Feature by using the Feature.xml file.

Syntax
Install-SPFeature [-Path] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-CompatibilityLevel <Int32>] [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Install-SPFeature [-AllExistingFeatures] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force]


[-SolutionId <String>] [-WhatIf] [<CommonParameters>]

Install-SPFeature [-ScanForFeatures] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force]


[-SolutionId <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Install-SPFeature cmdlet installs a specific SPFeature by providing, in the Identity parameter, the relative path
from the version-specific common FEATURES folder to the feature. The version-specific FEATURES folder is
"$env:ProgramFiles\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES" if the
site collection is in 14 mode, and "$env:ProgramFiles\Common Files\Microsoft Shared\Web Server
Extensions\15\TEMPLATE\FEATURES" if the site collection is in 15 mode. The SharePoint Feature's files must
already be put in the proper directory, either manually or by using a solution installer.
If the value of the AllExistingFeatures parameter is true, the file system is scanned and all new features that are in
both FEATURES folders are installed. This is generally only used during deployment and upgrade.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Install-SPFeature -path "MyCustomFeature"

This example installs a new feature at $env:ProgramFiles\Common Files\Microsoft Shared\Web Server


Extensions\15\TEMPLATE\FEATURES\MyCustomFeature/feature.xml.
--------------EXAMPLE 2-----------------

Install-SPFeature -AllExistingFeatures -Whatif

This example shows the unregistered features that are available on the file system and that are installed if this
command is run without the WhatIf parameter. This is commonly done after an upgrade process.
--------------EXAMPLE 3-----------------

Install-SPFeature -path "MyCustomFeature" -CompatibilityLevel 14

This example installs a new feature at $env:ProgramFiles\Common Files\Microsoft Shared\Web Server


Extensions\14\TEMPLATE\FEATURES\MyCustomFeature\feature.xml.
--------------EXAMPLE 4-----------------

Install-SPFeature -path "MyCustomFeature" -CompatibilityLevel 15

This example installs a new feature at $env:ProgramFiles\Common Files\Microsoft Shared\Web Server


Extensions\15\TEMPLATE\FEATURES\MyCustomFeature\feature.xml.

Parameters
-AllExistingFeatures
Scans for existing, but unregistered features, and then registers them with the farm.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of feature to install. When the version is not specified it will default to the web applications
MaxVersion value.
The values for this can be either 14 or 15.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the installation of an already installed feature.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies an authentic file path; for example, MyFeature.
The path to feature must be a literal path to the 14\Template\Features directory. The feature.xml file name is
implied and does not need to be provided.
If the path to the feature is not found , the following error message is displayed: "Failed to find the XML file at
location 14\Template\Features\<file path>."

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ScanForFeatures
Scans and then displays a feature. The ScanForFeatures parameter does not install a feature.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SolutionId
Specifies the solution ID of the features. If the SolutionId parameter is not provided, all solution IDs are scanned.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Install-SPHelpCollection
In ths Article

Installs the provided Help site collection files in the current farm.

Syntax
Install-SPHelpCollection [-All] [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Install-SPHelpCollection -LiteralPath <String> [-AssignmentCollection <SPAssignmentCollection>]


[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Install-SPHelpCollection cmdlet installs the Help site collection files for SharePoint Products in the current
farm. Use the LiteralPath parameter to install specific custom Help collection files. If the LiteralPath parameter is
not specified, all available Help in the Help site collection is installed and existing Help collection files are
overwritten.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Install-SPHelpCollection -LiteralPath 'C:\Program Files\Common Files\Microsoft Shared\Web Server


Extensions\14\HCCab\1033\OSSAdmin.cab'

This example installs the specified help collection in the current farm.

Parameters
-All
If the LiteralPath parameter is not specified, specifies that all Help Collection CABs under %Program
Files%\Common Files\Microsoft Shared\Web Server Extensions\14\HCCab\<LCID> in the Help site collection are
installed, and existing Help collections are overwritten.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LiteralPath
Specifies the exact path to a specific custom Help file in the Help site collection cab file.
The type must be a valid path in either of the following forms:
C:\folder_name
\\server_name\folder_name

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Install-SPInfoPathFormTemplate
In ths Article

Installs an InfoPath form template on a farm.

Syntax
Install-SPInfoPathFormTemplate [-Path] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-EnableGradualUpgrade] [-NoWait] [-WhatIf] [<CommonParameters>]

Description
The Install-SPInfoPathFormTemplate cmdlet installs an InfoPath form template on a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1--------------

Install-SPInfoPathFormTemplate -Path c:\Form.xsn

This example installs a single form template to the farm.


---------------EXAMPLE 2--------------

"FormTemplateFirst.xsn", "FormTemplateSecond.xsn", "FormTemplateThird.xsn" | Install-SPInfoPathFormTemplate

This example installs multiple form templates on a farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableGradualUpgrade
Specifies that the new form can be gradually upgraded.
If specified and the form template file exists, the form template is gradually upgraded and is then used for new
sessions only.
If not specified and the form template does not exist, the form is overwritten during an upgrade and is then used
for exisiting and new sessions.
If specified and the form template file does not exist, ignore the switch.
If not specified and the file exists, the user is prompted to upgrade and to use the gradual upgrade if the upgrade is
allowed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoWait
Specifies that the form template is installed in the background and that the progress of the installation not be
shown.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path and name of the form template to install.
The type must be a valid path and file name of a form template, in the form:
C:\folder_name\formtemplate_name
\\server_name\folder_name\formtemplate_name

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Install-SPService
In ths Article

Installs and provisions services on a farm.

Syntax
Install-SPService [-AssignmentCollection <SPAssignmentCollection>] [-Provision] [<CommonParameters>]

Description
The Install-SPService cmdlet installs and optionally provisions services on a farm. This cmdlet installs all services,
service instances, and service proxies specified in the registry on the local server computer. Use this cmdlet in a
script that you build to install and deploy a SharePoint farm or to install a custom developed service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Install-SPService

This example installs all services, service instances and service proxies specified in the registry on the local server
computer.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Provision
Specifies default settings when installing a standalone service application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Install-SPSolution
In ths Article

Deploys an installed SharePoint solution in the farm.

Syntax
Install-SPSolution [-Identity] <SPSolutionPipeBind> [-AllWebApplications]
[-AssignmentCollection <SPAssignmentCollection>] [-CASPolicies] [-CompatibilityLevel <String>] [-Confirm]
[-Force] [-FullTrustBinDeployment] [-GACDeployment] [-Language <UInt32>] [-Local] [-Time <String>]
[-WebApplication <SPWebApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Install-SPSolution [[-Identity] <SPSolutionPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]


[-Confirm] [-Language <UInt32>] [-Synchronize] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://docs.microsoft.com/powershell/scripting/developer/cmdlet/cmdlet-
parameter-sets?view=powershell-5.1).
The Install-SPSolution cmdlet deploys an installed SharePoint solution in the farm. Use the Add-SPSolution
cmdlet to install a SharePoint solution package in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Install-SPSolution -Identity contoso_solution.wsp -GACDeployment

This example deploys the installed SharePoint solution contoso_solution.wsp in the farm and specifies that GAC
can be deployed for the new SharePoint solution.
------------------EXAMPLE 2------------------

Install-SPSolution -Identity contoso_solution.wsp -GACDeployment -CompatibilityLevel {14,15}

This example deploys the installed SharePoint solution installs a previously added solution so it can be used
correctly in both 14 and 15 mode site collections.
Parameters
-AllWebApplications
Specifies that the new SharePoint solution is deployed for all SharePoint web applications in the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CASPolicies
Specifies that code access security (CAS ) policies can be deployed for the new SharePoint solution.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CompatibilityLevel
Specifies whether to install into the solution, into a specific version directory based on CompatibilityLevel. The
default behavior if this parameter is not specified is to install the solution only to the version directory based on the
version tracked in the manifest of the solution's cab file.
Valid values are:
--14
--15
--14,15
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the deployment of the new SharePoint solution.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FullTrustBinDeployment
Specifies that full trust Bin deployment is permitted. This parameter is to be used if the solution is fully trusted.
Bin assembly is an assembly installed into the bin directory of the virtual server. The assembly in the package will
have DeploymentTarget=WebApplication attribute set. For additional information about bin assembly, see
Assembly Element

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GACDeployment
Specifies that global assembly cache (GAC ) can be deployed for the new SharePoint solution.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SharePoint solution to deploy.
The value must be an authentic GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; an authentic name
of a SharePoint solution (for example, SPSolution1); or an instance of an authentic SPSolution object.

Type: SPSolutionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Language
Specifies a language for the solution when a solution language package is deployed. If this parameter is not
specified, zero ("0") is assumed. Use zero for solutions that are valid for all languages.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Local
Deploys the solution on the active server.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Synchronize
Synchronizes all solutions or the specified solution in the local farm.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Time
Specifies when the solution will be deployed. The default value is immediate deployment.
The type must be a valid DateTime value, in the form 2010, 5, 1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Deploys the SharePoint solution for the specified SharePoint web application.
The value must be in one of the following forms:
--An authentic GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh
--An authentic name of a SharePoint web application (for example, MyOfficeApp1)
--An instance of an authentic SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Install-SPUserSolution
In ths Article

Activates a sandboxed solution in a site collection.

Syntax
Install-SPUserSolution [-Identity] <SPUserSolutionPipeBind> -Site <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Install-SPUserSolution cmdlet activates a sandboxed solution in a site collection. A user solution is a
sandboxed solution.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE---------------------

Install-SPUserSolution -Identity contoso_solution.wsp -Site https://sitename

This example activates the sandboxed solution contoso_solution.wsp in the site https://sitename.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the sandboxed solution to activate.
The type must be a valid name of a sandboxed solution (for example, UserSolution1); or an instance of a valid
SPUserSolution object.

Type: SPUserSolutionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Activates the sandboxed solution for the specified site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Install-SPWebPartPack
In ths Article

Installs the specified Web Part package to the specified location.

Syntax
Install-SPWebPartPack [-LiteralPath] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Force] [-GlobalInstall] [-Language <UInt32>] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf]
[-CompatibilityLevel <String>] [<CommonParameters>]

Install-SPWebPartPack [-Name] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force]


[-GlobalInstall] [-Language <UInt32>] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf]
[-CompatibilityLevel <String>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Install-SPWebPartPack cmdlet installs the Web Part package, at the LiteralPath parameter location, in the local
farm. The Web Part package can be installed in a specific Web application by using the WebApplication parameter.
If a Web application is not specified, the Web Part package is installed in all Web applications.
Use the Language parameter to specify a package language.
Use the GlobalInstall parameter to install the package to the global assembly cache (GAC ). Assemblies in the GAC
are granted FullTrust permission, which gives this package full access to all system-wide resources.
Use the Force parameter to install the package to overwrite any existing Web Part package with the same name or
installed in the same location.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Install-SPWebPartPack "MyCustomWebPartPack" -LiteralPath "C:\mywebpart.wpp" -GlobalInstall

This example installs the Web Part Package with the name MyCustomWebPartPack globally in the farm from the
path c:/mywebpart.wpp.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial
CompatibilityLevel value for the site collection. When this parameter is not specified, the CompatibilityLevel will
default to the highest possible version for the web application depending on the SiteCreationMode setting.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overwrites any existing Web Part package with the same name or installed in the same location.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GlobalInstall
Installs the Web Part package in the global assembly cache (GAC ) rather than in the /bin directory of each Web
application. This installation makes the Web Part globally accessible on the servers.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Language
Specifies the language ID for the Web Part package.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LiteralPath
Specifies the exact path to the Web Part package.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Web Part package to install.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the Web application on which to install the Web Part pack. If no Web application is specified, the Web Part
pack is installed on all Web applications.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Invoke-SPProjectActiveDirectoryEnterpriseResourcePoolSync
In ths Article

Triggers Active Directory Enterprise Resource Pool synchronization on the specified instance of Project Web App.

Syntax
Invoke-SPProjectActiveDirectoryEnterpriseResourcePoolSync [-Url] <Uri>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Active Directory Enterprise Resource Pool synchronization is used to create or update multiple Project Server
enterprise resources at the same time. Project Server enterprise resources can also be automatically activated and
deactivated based on group membership in the Active Directory directory service. For example, new employees in
your department can automatically be added as Project Server enterprise resources as long as they are in the
Active Directory group selected for synchronization. Conversely, employees who are removed from the Active
Directory group have their Project Server accounts deactivated upon synchronization.
Enterprise Resource Pool synchronization also updates enterprise resource properties with the most current data
from Active Directory. For example, an employee's name and e-mail address may change because of marriage. As
long as the change is made in Active Directory and the user is in the linked group, the change occurs in the user's
Enterprise Resource properties when synchronization occurs.
The Enterprise Resource Pool can be mapped to a single Active Directory group for synchronization. However, this
Active Directory group can contain nested groups whose members are also synchronized.
The following actions can occur during the Enterprise Resource Pool synchronization process:
A new Project Server enterprise resource and corresponding user account can be created based on an Active
Directory account.
An active Project Server resource/user account can be deactivated.
An existing Project Server user account's metadata (for example, name, e-mail address, and so on) can be updated
if it has changed in Active Directory.
A previously inactive Project Server resource/user account can be reactivated.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------------EXAMPLE---------------------

Invoke-SPProjectActiveDirectoryEnterpriseResourcePoolSync https://localhost/pwa
This example triggers an Active Directory Enterprise Resource Pool synchronization for the instance of Project Web
App located at https://localhost/pwa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the URL of the Project Web App instance where you want to invoke a synchronization.

Type: Uri
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Disable-SPProjectActiveDirectoryEnterpriseResourcePoolSync
minutes to read • Edit Online

Invoke-SPProjectActiveDirectoryGroupSync
In ths Article

Manually starts the synchronization job to synchronize Project Server group membership with the specified Active
Directory groups.

Syntax
Invoke-SPProjectActiveDirectoryGroupSync [-Url] <Uri> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
In Project Server permission mode, groups can be created to assign permissions and synced with Active Directory
groups to determine group membership. The Invoke-SPProjectActiveDirectoryGroupSync cmdlet manually starts
the job that synchronizes the group membership from Active Directory into Project Server.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------EXAMPLE 1-------------------

Invoke-SPProjectActiveDirectoryGroupSync -Url https://AppServer/pwa

This example synchronizes group membership for the specified PWA instance.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the URL of the Project Web App (PWA) instance where you want to start the Active Directory sync.
The type must be a valid URL, in the form https://<ServerName>/<PWAName>.

Type: Uri
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPProjectPermissionMode
Set-SPProjectPermissionMode
minutes to read • Edit Online

Merge-SPLogFile
In ths Article

Combines trace log entries from all farm computers into a single log file on the local computer.

Syntax
Merge-SPLogFile -Path <String> [-Area <String[]>] [-AssignmentCollection <SPAssignmentCollection>]
[-Category <String[]>] [-ContextFilter <String[]>] [-Correlation <Guid[]>] [-EndTime <DateTime>]
[-EventID <String[]>] [-ExcludeNestedCorrelation] [-Level <String>] [-Message <String[]>] [-Overwrite]
[-Process <String[]>] [-StartTime <DateTime>] [-ThreadID <UInt32[]>] [<CommonParameters>]

Description
The Merge-SPLogFile cmdlet returns records from Unified Logging Service (ULS ) trace log files on each farm
server that match the criteria, and writes the results to a new log file on the local computer. If no results are
returned, a warning is written to the Windows PowerShell console window.
We recommend that you filter by using the StartTime and EndTime parameters to optimize performance of this
cmdlet. Some filtering parameters such as Process, Area, Category, EventID and Message support wildcards.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite

This example merges the last hour of log data from all farm computers with no filtering.
--------------EXAMPLE 2-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -Area Search

This example merges the last hour of log data from the Search area.
--------------EXAMPLE 3-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -Area "SharePoint Foundation","Web Analytics


Services"

This example merges the last hour of log data from the SharePoint Foundation and Web Analytics Services areas.
--------------EXAMPLE 4-----------------
Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -Level High

This example merges the log data of level High or higher.


--------------EXAMPLE 5-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -StartTime "06/09/2008 16:00" -EndTime "06/09/2008


16:15"

This example merges the log data for events in a particular time range, which is culture-specific to the United
States.
--------------EXAMPLE 6-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -Message "*permission changed*"

This example merges the log data for events with permission changed in the message text.
--------------EXAMPLE 7-----------------

Merge-SPLogFile -Overwrite -Path d:\1.log -ContextFilter "name=timer job*" -Area "*search*"

This example merges the log data for all search timer jobs.
--------------EXAMPLE 8-----------------

Merge-SPLogFile -Overwrite -Path d:\2.log -ContextFilter "user=contoso?joeuser"

This example shows how to merge the log data for all user names that have a contoso\joeuser or Contoso/joeuser
format.

Parameters
-Area
Specifies the area name to filter on.
The type must be a valid name; for example, SharePoint Foundation.
The use of wildcards is supported.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Category
Specifies the category ID to filter on.
The type must be a valid category name; for example, category1.
The use of wildcards is supported.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContextFilter
Specifies a filter for trace entries in a particular context in the form key=value, for example, user=contoso\joeuser.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Correlation
Specifies the correlation ID to filter on. The type must be a valid GUID, in the form F0BB0790-4323-A153-096F -
ABCDC80E24D4.

Type: Guid[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
Specifies the end time of the log entries returned.
The type must be a valid DateTime format that is culture-specific to the administrative language, such as
2/16/2007 12:15:12 for English-US.
Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventID
Specifies the Event ID to filter on. The use of wildcards is supported.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeNestedCorrelation
Excludes nested correlation values in the results. This parameter is only used when filtering results by using the
ContextFilter parameter
By default, records returned from the ContextFilter parameter include all related records in addition to the records
that match the filter. Specifying this option includes only the records that match the filter and excludes any related
records.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Level
Specifies the level name to filter on.
Results include the specified level and everything more severe.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Message
Specifies the message text to filter on.
The type must be valid text. Text with spaces should be enclosed with quotation marks; for example, "This is a test."
The use of wildcards is supported.
Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Overwrites the log file if it already exists at the specified path.
The type must be either of the following values:
$True
$False
The default value is $False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the path and file name to which to write the merged log file. Relative paths are supported.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Process
Specifies the process name to filter on.
The use of wildcards is supported.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
Specifies the start time of the log entries returned.
The type must be a valid DateTime format that is culture-specific to the administrative language, such as
2/16/2007 12:15:12 for English-US.
The default is one hour prior to the current time on the local computer.
Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ThreadID
Specifies the thread ID to filter on.
The type must be a valid integer from 0 through 4,294,967,295.

Type: UInt32[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Merge-SPUsageLog
In ths Article

Returns records from usage log files.

Syntax
Merge-SPUsageLog [-Identity] <SPUsageDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-DiagnosticLogPath <String>] [-EndTime <DateTime>] [-OverWrite] [-Partial] [-Servers <String[]>]
[-StartTime <DateTime>] [<CommonParameters>]

Description
The Merge-SPUsageLog cmdlet returns records from usage log files on each farm server that match the criteria,
and writes the results to pipeline.
The command gathers, filters, and aggregates logs base on user specified criteria, we recommend that you filter by
using the StartTime and EndTime parameters to optimize performance of this cmdlet.
You should at least specify a usage type. For information on valid usage types, see Get-SPUsageDefinition.
This cmdlet requires PowerShell Remoting to be enabled.

Examples
Example 1

Merge-SPUsageLog -Identity 'Timer Jobs' -Servers SPSERVER1

Merges the Usage log for the Usage Definition 'Timer Jobs' from the specified server and outputs to the
PowerShell console.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DiagnosticLogPath
Specifies the file to write diagnostic information to. A relative path is supported.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndTime
Specifies the end time of the log entries returned.
The type must be a valid DateTime format that is culture-specific to the administrative language, that is, 2/16/2007
12:15:12 for English-US.
The default value is the current time.
If you want to specify UTC time, you must add a "Z" to the end of the parameter. For example, "2016-06-15
03:29:18.199 Z". If the "Z" is not specify, local computer time will be displayed instead of UTC.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of usage log file.

Type: SPUsageDefinitionPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-OverWrite
Overwrites the diagnostic log file if it already exists at the specified path.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Partial
Not used.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Servers
The server address or addresses to filter on.
To obtain a list of valid addresses in the farm use Get-SPServer | Select Address.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartTime
Specifies the start time of the log entries returned.
The type must be a valid DateTime format that is culture-specific to the administrative language, such as
"2/16/2007 12:15:12" for English-US.
The default value is one hour prior to the current time on the local computer.
If you want to specify UTC time, you must add a "Z" to the end of the parameter. For example, "2016-06-15
03:29:18.199 Z". If the "Z" is not specify, local computer time will be displayed instead of UTC.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPUsageDefinitionPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Migrate-SPDatabase
In ths Article

Do not use.

Syntax
Migrate-SPDatabase [-Identity] <SPDatabasePipeBind> [-DestinationDatabase] <SPContentDatabasePipeBind>
[-SiteSubscription] <SPSiteSubscriptionPipeBind> [-ServiceType] <ServiceExtensionType> [-Overwrite]
[-UseLinkedSqlServer] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Migrate-SPDatabase [-Identity] <SPDatabasePipeBind> [-SiteCollection] <SPSitePipeBind>


[-ServiceType] <ServiceExtensionType> [-Overwrite] [-UseLinkedSqlServer]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Do not use.

Examples
Example 1

#Do not use.

Do not use.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationDatabase
Do not use.

Type: SPContentDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Do not use.

Type: SPDatabasePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Overwrite
Do not use.

Type: SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceType
Do not use.
Type: ServiceExtensionType
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollection
Do not use.

Type: SPSitePipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Do not use.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseLinkedSqlServer
Do not use.

Type: SwitchParameter
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

Migrate-SPProjectDatabase
In ths Article

Copies the data from the Project Server 2013 database into the corresponding SharePoint Server 2016,
SharePoint Server 2019 content database containing the migrated site collection.

Syntax
Migrate-SPProjectDatabase [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] -DatabaseName <String>
[-DatabaseServer <String>] [-FailoverPartner <String>] [-Overwrite] [-SQLLogon <PSCredential>]
-SiteCollection <SPSitePipeBind> [-WhatIf] [<CommonParameters>]

Description
Copies the data from the Project Server 2013 database into the corresponding SharePoint Server 2016,
SharePoint Server 2019 content database containing the migrated site collection.
Both the Project Server 2013 database and the SharePoint Server 2016, SharePoint Server 2019 database must be
on the same instance of SQL Server and the SharePoint farm account must have full access to the Project Server
2013 database. During the migration process the Project Server 2013 database will be modified and cannot be
mounted back to a Project Server 2013.

Examples
Example 1

Migrate-SPProjectDatabase -Name ProjectDB1 -SiteCollection "https://contoso1/sites/PWA"

This example will look for a Project Server 2013 database named ProjectDB1 on the same instance of SQL Server
where the content database containing https://contoso1/sites/PWA is located. The data will be upgraded and
copied into the site collection.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
The name of the Project Server 2013 database.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
The name of the instance of SQL Server hosting the Project Server 2013 database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverPartner
The name of the SQL Server failover partner for the Project Server 2013 database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Overwrite
Specifies to overwrite any Project data from previous attempts.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollection
The URL of the site collection to which you want to copy the Project data.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SQLLogon
SQL Server authentication credentials if needed.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPSitePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Migrate-SPProjectResourcePlans
In ths Article

Migrates the published resource plan assignment data to engagements. Run after data migration has been
completed from Project Server 2013 to Project Server 2016, Project Server 2019.

Syntax
Migrate-SPProjectResourcePlans [-Url] <Uri> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Migrates the published resource plan assignment data to engagements. Run after data migration has been
completed from Project Server 2013 to Project Server 2016, Project Server 2019.

Examples
Example 1

Migrate-SPProjectResourcePlans -Url https://pwa_site

Migrates the Project Resource Plans on the Project Web App site https://pwa_site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
The URL of the Project Web App site.

Type: Uri
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Mount-SPContentDatabase
In ths Article

Attaches an existing content database to the farm.

Syntax
Mount-SPContentDatabase [-Name] <String> [-WebApplication] <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-AssignNewDatabaseId] [-ChangeSyncKnowledge] [-Confirm]
[-ClearChangeLog] [-DatabaseCredentials <PSCredential>] [-DatabaseServer <String>] [-MaxSiteCount <Int32>]
[-NoB2BSiteUpgrade] [-SkipIntegrityChecks] [-WarningSiteCount <Int32>] [-WhatIf]
[-DatabaseAccessCredentials <PSCredential>] [-DatabaseFailoverServer <String>] [-SkipSiteUpgrade]
[-UseLatestSchema] [<CommonParameters>]

Description
The Mount-SPContentDatabase cmdlet attaches an existing content database to the farm. If the database being
mounted requires an upgrade, this cmdlet will cause the database to be upgraded.
The default behavior of this cmdlet causes an upgrade of the schema of the database and initiates upgraded builds
for all site collections within the specified content database if required. To prevent initiation of upgraded builds of
site collections, use the NoB2BSiteUpgrade parameter. This cmdlet does not trigger version-to-version upgrade of
any site collections.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE 1---------------------

Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication https://sitename

This example mounts an existing database to the sitename web application. If upgrades are required, it triggers
database schema upgrade and then performs only build-to-build upgrade actions on existing site collections if
required. This operation does not changed the CompatibilityLevel for existing site collections in this database.
-----------------EXAMPLE 2---------------------

Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication https://sitename -


NoB2BSiteUpgrade

This example mounts an existing database to the sitename web application but it prevents any site upgrades from
occurring. If upgrades are required, it triggers database schema upgrades only and no build-to-build upgrade
actions are performed on any site collections. This operation does not change the CompatibilityLevel for existing
site collections in this database.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignNewDatabaseId
Creates a new database ID automatically when the content database is attached.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ChangeSyncKnowledge
Database attach will cause all Groove sync client to re-synchronize their content.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClearChangeLog
Clears any pending changes from the change log in the content database.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseAccessCredentials
Specifies the credential that belong to SPDataAccess role.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL
Authentication.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseFailoverServer
Specifies the name of the database server to be mirrored.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the content database specified in the Name parameter.
The type must be a valid SQL Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxSiteCount
Specifies the maximum number of web sites that can use the content database.
The type must be a positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the existing content database to attach to the farm.
The type must be a valid name of a SharePoint content database; for example, SPContentDB1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoB2BSiteUpgrade
Specifies not to upgrade all child objects when performing a build-to-build upgrade. This parameter has no effect
when a version-to-version upgrade is specified.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipIntegrityChecks
Specifies the upgrade process not to run the internal integrity checks such as missing templates, and orphan
detection as part of the upgrade process.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipSiteUpgrade
Specifies to not upgrade all site objects when performing upgrade.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UpdateUserExperience
Determines whether the content databases should upgrade to the latest user interface. By default, the user interface
will not change during upgrade.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseLatestSchema
Specifies to use the latest schema. In an on-premises environment, this parameter has no effect.
There are two values $True and $False.
The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WarningSiteCount
Specifies the number of sites that can be created before a warning event is generated and the owner of the site
collection is notified.
The type must be a positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Attaches the content database to the specified SharePoint web application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of
SharePoint web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.
Type: SPWebApplicationPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Mount-SPSiteMapDatabase
In ths Article

Mounts a Site Map database. Do not use.

Syntax
Mount-SPSiteMapDatabase [-DatabaseName] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DatabaseCredentials <PSCredential>] [-DatabaseFailoverServer <String>] -DatabaseServer <String> [-WhatIf]
[<CommonParameters>]

Description
Do not use.

Examples
Example 1

#Do not use.

Do not use.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Do not use.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseFailoverServer
Do not use.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Do not use.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Do not use.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Mount-SPStateServiceDatabase
In ths Article

Attaches an existing state service database to the farm.

Syntax
Mount-SPStateServiceDatabase [-Name] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-DatabaseCredentials <PSCredential>] [-DatabaseServer <String>]
[-ServiceApplication <SPStateServiceApplicationPipeBind>] [-Weight <Int32>] [<CommonParameters>]

Description
The Mount-SPStateServiceDatabase cmdlet attaches an existing state service database to the farm. If the session
state database schema is not installed in the state service database, use the Initialize-SPStateServiceDatabase
cmdlet to install the schema after the state service database has been mounted.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Mount-SPStateServiceDatabase -Name "statedata1" -DatabaseServer "localhost"

This example associates a SharePoint Server farm with a SQL Server database.
This example is used in least privilege scenarios when an administrator cannot create databases in SQL. The
database must already exist and be empty. The database cannot be used until the Initialize-SPStateServiceDatabase
cmdlet is run, so errors could occur with this example.
--------------EXAMPLE 2-----------------

Mount-SPStateServiceDatabase -Name "statedata1" -DatabaseServer "localhost" -ServiceApplication "ServiceApp1" -


Weight 10 | Initialize-SPStateServiceDatabase

This example associates a SharePoint Server farm with a SQL Server database, at the same time that it also
associates the database with a service application and gives a weight of 10. The result is immediately piped to the
Initialize-SPStateServiceDatabase cmdlet so that the database can be used.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseCredentials
Specifies the database credentials for SQL Authentication used to access the state service database. If this
parameter is not specified, Windows authentication is used.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the state service database.
The type must be a valid SQL Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the database name that is created in the SQL Server database.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the state service application to which to add the state database.
The type must be a valid name of a state service application (for example, StateServiceApp1); a valid GUID, in the
form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPStateServiceApplication object.

Type: SPStateServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Weight
Specifies the weight for the state database used to load balance the allocation of new data. The default value is 1.
The type must be a valid integer in the range of 1 to 10.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Move-SPAppManagementData
In ths Article

Do Not Use

Syntax
Move-SPAppManagementData [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-OverWrite]
-SiteSubscriptionId <Guid> -SourceAppManagementDatabase <SPDatabasePipeBind>
-TargetContentDatabase <SPContentDatabasePipeBind> [-WhatIf] [<CommonParameters>]

Description
Do Not Use

Examples
Example 1

Do Not Use

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OverWrite
Do Not Use

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscriptionId
Do Not Use

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceAppManagementDatabase
Do Not Use

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetContentDatabase
Do Not Use

Type: SPContentDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Move-SPBlobStorageLocation
In ths Article

Copies a content database to a new location by using Remote BLOB Storage (RBS ).

Syntax
Move-SPBlobStorageLocation [-SourceDatabase] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DestinationDatabase <String>] [-DestinationDataSourceInstance <String>] [-Dir <String>]
[-VerboseMod <Boolean>] [-WhatIf] [<CommonParameters>]

Description
Use the Move-SPBlobStorageLocation cmdlet to use Remote BLOB Storage (RBS ) to copy a content database to
an instance of a SQL Server database. The database size limitation for SQL Server is 4 gigabytes (GB ). If a content
database is greater than 4 GB, the database cannot be copied directly to a SQL Server database instance. The
Move-SPBlobStorageLocation cmdlet uses the advantage of RBS and copies databases larger than 4 GB. RBS
stores the data on the local hard disk and keeps the links to the data in the database, which results in a smaller
database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE 1-----------------------

Move-SPBlobStorageLocation WSS_Content

This example copies the content database named WSS_Content from the Windows Internal Database to the same
database name in SQL Server 2008 Express by using RBS.
-------------------EXAMPLE 2-----------------------

Move-SPBlobStorageLocation WSS_Content -DestinationDatabase WSS_V4_Content -BackupDatabase WSSBackupDB -


VerboseMod:$true

This example copies the content database named WSS_Content from the Windows Internal Database to a
database in SQL Server 2008 Express. The name of the new database will be WSS_V4_Content. During the move,
the backup file name will be WSSBackupDB. The output of this command displays log information to the
Command Prompt window.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationDatabase
Specifies the name of the migrated database. If the DestinationDatabase parameter is not specified, the
SourceDatabase parameter is used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationDataSourceInstance
Specifies the name of the instance of the destination database. The value in the SourceDatabase parameter is
migrated to this instance. The name of the instance of the database should be SQL Server with Service Pack 1
(SP1) and Cumulative Update 2 version or higher. If the DestinationDataSourceInstance parameter is not specified,
the local host name is used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Dir
Used for all disk operations, including storing temporary backups and database (.mdf) files of a migrated database.
If the Dir parameter is not specified, a default directory of the destination SQL Server instance is used. The free
space in this directory should be at least two times the size of the source database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceDatabase
Specifies the name of the Windows Internal Database.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VerboseMod
Generates verbose log output to be displayed in the Command Prompt window. If the VerboseMod parameter is
not specified, no output is displayed.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Move-SPDeletedSite
In ths Article

Moves deleted site collections from one content database to another.

Syntax
Move-SPDeletedSite [-Identity] <SPDeletedSitePipeBind> -DestinationDatabase <SPContentDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-ContentDatabase <SPContentDatabasePipeBind>]
[-RbsProviderMapping <Hashtable>] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Use the Move-SPDeletedSite cmdlet to move data in a specified site collection from its current content database to
the content database specified by the DestinationDatabase parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------EXAMPLE----------

Move-SPDeletedSite -Identity 610857cb-8414-4a89-8bf3-ad3628f6c86c -DestinationDatabase "ContentDB2"

This example moves deleted site collections from the specified GUID to the database named "ContentDB2".

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the SQL Server content database where the site collection data will be stored. If no content database is
specified, the content database with the greatest unused site collection capacity and whose database status is ready
will be used.

Type: SPContentDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DestinationDatabase
Specifies the content database that the site collection should be moved to. For example, ContentDB2.

Type: SPContentDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity of the site collection to be moved. For example, https://servername/sites/sitename.

Type: SPDeletedSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RbsProviderMapping
Used to move a Remote BLOB Storage (RBS )-enabled site collection from one RBS -enabled content database to
another RBS -enabled content database without moving the underlying Binary Large Object (BLOB ) content. If the
content database has more than one RBS provider associated with it, you must specify all providers. The same
providers must be enabled on the target content database and the source content database.
Type: Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the URL, GUID, or name of the Web application from which to list sites.
The type must be a valid URL in the form https://server_name; a valid GUID, for example, 12345678-90ab-cdef-
1234-567890bcdefgh; or the Web application name, for example, WebApplication1212.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Move-SPEnterpriseSearchLinksDatabases
In ths Article

Moves data across links databases.

Syntax
Move-SPEnterpriseSearchLinksDatabases [-SearchApplication] <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-RepartitioningId <Guid>]
[-SourceStores <LinksStore[]>] [-TargetStores <LinksStore[]>] [-WhatIf] [<CommonParameters>]

Description
The Move-SPEnterpriseSearchLinksDatabases cmdlet moves data across a given list of links databases during
farm configuration and scale out, to improve the performance and resource load of the farm. Once the move has
started, the cmdlet will return a unique identifier, the RepartitioningId. Use this identifier to retrigger if the current
run fails. After the move has finished, the old databases can be removed.
A links database stores query logging and analytics information.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------EXAMPLE--------

$ssa = Get-SPEnterpriseSearchServiceapplication
$ssa | New-SPEnterpriseSearchLinksDatabase -DatabaseName "links1"
$ssa | New-SPEnterpriseSearchLinksDatabase -DatabaseName "links2"
$ssa | New-SPEnterpriseSearchLinksDatabase -DatabaseName "links3"
$dbs = $ssa | Get-SPEnterpriseSearchLinksDatabase
$ssa | Move-SPEnterpriseSearchLinksDatabases -TargetStores $dbs

This example adds 3 new links databases and uses Move-SPEnterpriseSearchLinksDatabases to move data from
the current links databases into new databases.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RepartitioningId
Resumes the move with this identifier.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the links database. The type must be a valid GUID, in the form
12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an
instance of a valid SearchServiceApplication object.
Specifies the search application that contains the links database. The type must be a valid GUID, in the form
12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an
instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SourceStores
Specifies a source list of databases. If this parameter is not specified then all currently existing links databases will
be used as a source list.
Type: LinksStore[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetStores
Specifies a target list of databases. If this parameter is not specified then all currently existing links databases will
be used as a target list.

Type: LinksStore[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchLinksDatabase
Set-SPEnterpriseSearchLinksDatabase
Get-SPEnterpriseSearchLinksDatabase
Remove-SPEnterpriseSearchLinksDatabase
minutes to read • Edit Online

Move-SPProfileManagedMetadataProperty
In ths Article

Moves multiple-string values into a term set.

Syntax
Move-SPProfileManagedMetadataProperty -Identity <String>
-ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-AvailableForTagging] [-Confirm] [-TermSetName <String>]
[-WhatIf] [<CommonParameters>]

Description
Use the Move-SPProfileManagedMetadataProperty cmdlet to move multiple-string or single-string property
values into a term set that you specify. If you do not specify a term set, the values are moved into the Keywords
term set. Any new values you add to the property after running the cmdlet will be moved into the term set that you
specified.
After a user profile application has been upgraded from Office SharePoint Server, single-string and multiple-string
value properties are not available for use unless the Move-SPProfileManagedMetadataProperty cmdlet is run to
map them to term sets within Managed Metadata Service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Move-SPProfileManagedMetadataProperty -ProfileServiceApplicationProxy $proxy -Identity SPS-Interests -
TermSetName Interests -AvailableForTagging

This example moves values from the SPS -Interests property into a new term set called Interests and marks that
term set as available for tagging.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AvailableForTagging
Determines whether the terms in the resulting term set can be used for Managed Metadata tagging. If a term set
has more than 30,000 terms, using it for Managed Metadata tagging may lead to performance issues on the client
computer. Because a majority of the profile properties may have more than 30,000 terms, the default value is No.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the profile property that needs to be migrated to the taxonomy.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the name of the User Profile Service Application Proxy to use.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-TermSetName
When specified, the term set name is created. If the TermSetName parameter is not specified, the property is
mapped to the Keywords term set in Managed Metadata Service.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Move-SPSite
In ths Article

Moves site collections from one content database to another.

Syntax
Move-SPSite [-Identity] <SPSitePipeBind> -DestinationDatabase <SPContentDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-RbsProviderMapping <Hashtable>] [-WhatIf]
[-CopyEvents <Boolean>] [<CommonParameters>]

Description
The Move-SPSite cmdlet moves the data in the specified site collection from its current content database to the
content database specified by the DestinationDatabase parameter.
A no-access lock is applied to the site collection to prevent users from altering data within the site collection while
the move is taking place.
Once the move is complete, the site collection is returned to its original lock state.
An IIS reset is required for the site move to take effect.
The destination content database specified must already exist, must be attached to the same SQL Server as the site
collection's current content database, and must be attached to the site collection's current Web application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE 1-----------------------

Move-SPSite https://servername/sites/sitename -DestinationDatabase ContentDb2

This example moves the site collection https://servername/sites/sitename to the content database ContentDb2.
---------------------EXAMPLE 2-----------------------

Get-SPSite -ContentDatabase ContentDb1 | Move-SPSite -DestinationDatabase ContentDb2

This example moves all site collections in ContentDb1 to ContentDb2.


---------------------EXAMPLE 3-----------------------
Get-SPSiteAdministration | where { $_.OwnerLoginName -eq "DOMAIN\username" } | Move-SPSite -DestinationDatabase
ContentDb2

This example moves all site collections where DOMAIN\username is the site collection owner to ContentDb2. The
Get-SPSiteAdministration cmdlet is used instead of the Get-SPSite cmdlet because you must have permission
within the site collection to access the properties of the SPSite object. You can access the properties of the
SPSiteAdministration object as a SharePoint farm administrator.
---------------------EXAMPLE 4-----------------------

Move-SPSite -Identity siteUrl -DestinationDatabase databaseName -RbsProviderMapping


@{"sourceProvider1"="targetProvider1", "sourceProvider2"="targetProvider2"}

This example moves an RBS -enabled site collection from one RBS -enabled content database to another RBS -
enabled content database, sourceProvider1 is the source RBS provider and targetProvider1 is the target RBS
provider.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CopyEvents
Specifies if events need to be copied.
The valid values are True or False.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationDatabase
Specifies the content database that the site collection should be moved to. For example, ContentDB2.

Type: SPContentDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity of the site collection to be moved. For example, https://servername/sites/sitename.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RbsProviderMapping
This parameter was added in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with Service
Pack 1 (SP1).
Used to move an RBS -enabled site collection from one RBS -enabled content database to another RBS -enabled
content database without moving the underlying BLOB content. If the content database has more than one RBS
provider associated with it, you must specify all providers. The same providers must be enabled on the target
content database and the source content database.

Type: Hashtable
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Move-SPSocialComment
In ths Article

Moves social comments.

Syntax
Move-SPSocialComment [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-NewUrl <String>]
[-OldUrl <String>] -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet was introduced in SharePoint Server 2010 with Service Pack 1 (SP1) and SharePoint Foundation 2010
with Service Pack 1 (SP1).
Use the Move-SPSocialComment cmdlet to move social comments from one page to another page.
This cmdlet does not move Tags or Ratings.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
(https://go.microsoft.com/fwlink/p/?LinkId=671715).

Examples
Example 1

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Move-SPSocialComments -ProfileServiceApplicationProxy $proxy -OldUrl "https://contoso/Pages/oldtest.aspx" -
NewUrl "https://contoso/Pages/newtest.aspx"

This example moves social comments from oldtest.aspx to newtest.aspx.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewUrl
Specifies the target URI to which the social notes will be moved.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OldUrl
Specifies the source URI from which the social notes will be moved.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the proxy of the User Profile Service application that contains the site subscription to delete.The type
must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
application proxy (for example, UserProfileSvcProxy1); or an instance of a valid SPServiceApplicationProxy object.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run.
This parameter is mandatory in a hosted-environment and optional in a non-hosted environment.
Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyPipeBind
Microsoft.SharePoint.PowerShell.SPSiteSubscriptionPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Move-SPUser
In ths Article

Migrates a user account in SharePoint Products.

Syntax
Move-SPUser [-Identity] <SPUserPipeBind> -NewAlias <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-IgnoreSID] [-WhatIf] [<CommonParameters>]

Description
The Move-SPUser cmdlet migrates user access from one domain user account to another. If an entry for the new
login name already exists, the entry is marked for deletion to make way for the migration.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$user = Get-SPUser -Identity "DOMAIN\JaneDoe" -Web https://webUrl


Move-SPUser -Identity $user -NewAlias "Domain\JaneSmith" -IgnoreSid

This example migrates DOMAIN\JaneDoe to the new account of DOMAIN\JaneSmith.


------------------EXAMPLE 2------------------

$user = Get-SPUser -Identity "DomainA\JaneDoe" -Web https://webUrl


Move-SPUser -Identity $user -NewAlias "DomainB\JaneDoe"

This example migrates DOMAIN\JaneDoe from DomainA to the new account of DOMAINB\JaneDoe in DomainB
with SID History enabled.
------------------EXAMPLE 3------------------

$user = Get-SPUser -Identity "i:0#.w|DOMAIN\JaneDoe" -Web https://webUrl


Move-SPUser -Identity $user -NewAlias "i:0#.w|Domain\JaneSmith" -IgnoreSid

This example migrates DOMAIN\JaneDoe to the new account of DOMAIN\JaneSmith when using Windows
Claims. -IgnoreSid must always be used with Move-SPUser when using a Claims Identity, such as Windows
Claims.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SPUser object retrieved via Get-SPUser .
The type must be a valid SPUser object.

Type: SPUserPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IgnoreSID
Indicates (if present) that Active Directory will not be queried for the SID history attribute to ensure that the new
login name is correspondent to the old login name.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewAlias
Specifies the new login name of the user account.
The type must be a valid login name, in the form DOMAIN\username.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-FASTSearchContentCollection
In ths Article

Creates a new Microsoft FAST Search Server 2010 for SharePoint content collection.

Syntax
New-FASTSearchContentCollection [-Name] <String> [[-Description] <String>] [[-Pipeline] <String>]
[<CommonParameters>]

Description
This cmdlet creates a new FAST Search Server 2010 for SharePoint content collection.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

New-FASTSearchContentCollection -Name newscollection

This example creates a new FAST Search Server 2010 for SharePoint content collection named "newscollection".
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

New-FASTSearchContentCollection -Name newscollection -Description "A collection for news content"

This example creates a new content collection named "newscollection", and attaches a description to it.
---------------EXAMPLE 3----------------- (FAST Server for SharePoint 2010)

New-FASTSearchContentCollection -Name newscollection -Description "A collection for news content" -Pipeline
"Office14 (webcluster)"

This example creates a new content collection, and uses the FAST Search Server 2010 for SharePoint document
processing pipeline "Office14 (webcluster)" to feed content to the content collection.

Parameters
-Description
A description of the content collection to add.
Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the FAST Search Server 2010 for SharePoint content collection to add.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Pipeline
The FAST Search Server 2010 for SharePoint document processing pipeline used to feed content to the content
collection.

Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Clear-FASTSearchContentCollection
Remove-FASTSearchContentCollection
Get-FASTSearchContentCollection
minutes to read • Edit Online

New-FASTSearchMetadataCategory
In ths Article

Creates a new category for crawled properties.

Syntax
New-FASTSearchMetadataCategory -Name <String> -Propset <Guid> [<CommonParameters>]

Description
This cmdlet creates a new category for crawled properties. A category is identified by its name and its property set
global unique identifier (GUID ).
All crawled properties that are members of a category share the same property set GUID as the category.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>$guid = [guid]::NewGuid()
New-FASTSearchMetadataCategory -Name ExampleCategory -Propset $guid

This example creates a category named "ExampleCategory" with a new GUID generated by the system. New
crawled properties can then be mapped to this category by specifying the GUID when calling New -
FASTSearchMetadataCrawledProperty or Set-FASTSearchMetadataCrawledProperty.
See Set-FASTSearchMetadataCategory for descriptions of category properties.

Parameters
-Name
The name of the new category.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Propset
The property set Global Unique Identifier (GUID ) assigned to this category. A GUID is a 128-bit integer that has a
very low probability of being duplicated. The GUID can be specified either in the form of a System.Guid object, or
as a 128-bit integer with the format "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". A crawled property can only be mapped
to one category at a time.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchMetadataCategory
Remove-FASTSearchMetadataCategory
Set-FASTSearchMetadataCategory
New -FASTSearchMetadataCrawledProperty
Set-FASTSearchMetadataCrawledProperty
minutes to read • Edit Online

New-FASTSearchMetadataCrawledProperty
In ths Article

Creates a new crawled property.

Syntax
New-FASTSearchMetadataCrawledProperty -Name <String> -Propset <Guid> -VariantType <Int32> [<CommonParameters>]

Description
This cmdlet creates a new crawled property. A crawled property is a piece of metadata extracted from content
sources and fed to the Microsoft FAST Search Server 2010 for SharePoint system. For example, the title of a Web
page would normally be a crawled property.
A crawled property is uniquely defined by three properties:
-- The name of the crawled property. -- The property set to which the crawled property is mapped, specified as a
GUID (Global Unique Identifier). The GUID identifies which category the crawled property belongs to. A crawled
property must be a member of a category. -- The variant type of the crawled property, which specifies the crawled
property's data type.
To include content in the full text indexes, crawled properties must be mapped to managed properties. If a crawled
property has IsMappedToContents set to "true", then the crawled property will automatically be added to the
default searchable index (the full text index called "content"). A newly created crawled property has its
IsMappedToContents parameter set to the same value as the mapped-to category's MapToContents parameter.
See New -FASTSearchMetadataCategory for information about creating a new category for crawled properties.
See Set-FASTSearchMetadataCrawledProperty for information about changing the properties of an existing
crawled property.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>$guid = [guid]::NewGuid()
New-FASTSearchMetadataCategory -Name MoreWeb -Propset $guid
New-FASTSearchMetadataCrawledProperty -Name ExtendedTitle -Propset $guid -Varianttype 31

This example first creates a new category named "MoreWeb", and then creates a new crawled property
"ExtendedTitle" that is mapped to the "MoreWeb" category (because it has the same property set value). The data
type of the crawled property is a Unicode string (VT_LPWSTR, variant type 31).
The new category gets the property set value "e20d8de2-0b5c-46f8-993d-6cdacbda5164", which was randomly
generated by the System.GUID.NewGuid() method.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Get-FASTSearchMetadataCrawledProperty | Where-Object -filterscript { $_.CategoryName -eq "Web"}


New-FASTSearchMetadataCrawledProperty -Name Internaltitle -varianttype 31 -Propset d1b5d3f0-c0b3-11cf-9a92-
00a0c908dbf1

This example adds a new crawled property to an existing catalog of crawled properties. The new crawled property
is named "Internaltitle", added to the "Web" category. It is variant type 31, a Unicode string in the user default
locale.
The "Web" category has several property set GUIDs. Investigating with the command:
Get-FASTSearchMetadataCrawledProperty | Where-Object -filterscript { $_.CategoryName -eq "Web"}
reveals that the "DESCRIPTION" crawled property, which is a type similar to the crawled property to add, has the
property set value "d1b5d3f0-c0b3-11cf-9a92-00a0c908dbf1". This property set is chosen for the new crawled
property.
To use this crawled property, you must configure the connector or feeding application to send a value with the
same name, variant type, and property set.

Parameters
-Name
The name of the new crawled property.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Propset
The property set GUID of the new crawled property.
The GUID controls which category the crawled property belongs to. A GUID (Global Unique Identifier) is a 128-bit
integer that has a very low probability of being duplicated. The GUID can be specified either as a System.Guid
object, or as an integer having the format "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VariantType
An integer value specifying the data type of the crawled property. See https://go.microsoft.com/fwlink/?
LinkId=163232 (https://go.microsoft.com/fwlink/?LinkId=163232) for a list of common variant types.
Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-FASTSearchMetadataCrawledProperty
Get-FASTSearchMetadataCrawledProperty
minutes to read • Edit Online

New-FASTSearchMetadataCrawledPropertyMapping
In ths Article

Creates a new mapping from a crawled property to a managed property.

Syntax
New-FASTSearchMetadataCrawledPropertyMapping -CrawledProperty <CrawledProperty>
-ManagedProperty <ManagedProperty> [<CommonParameters>]

Description
This cmdlet maps a crawled property to a managed property and stores the crawled content in the Microsoft FAST
Search Server 2010 for SharePoint index.
You can map a crawled property to multiple managed properties. If you map multiple crawled properties to a
single managed property, use the managed property's MergeCrawledProperties parameter to control whether or
not the crawled properties are merged into the managed property or just overwritten. See Set-
FASTSearchMetadataManagedProperty for more information.
When you map a crawled property into a managed property, the variant type of the crawled property is converted
into the available data types in FAST Search Server 2010 for SharePoint. See https://go.microsoft.com/fwlink/?
LinkId=163233 (https://go.microsoft.com/fwlink/?LinkId=163233) for details about this conversion, and which
variant types can be converted into native FAST Search Server 2010 for SharePoint types.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>$sitetitle_managedproperty = Get-FASTSearchMetadataManagedProperty -Name sitetitle


$internaltitle_crawledproperty = Get-FASTSearchMetadataCrawledProperty -name internaltitle
New-FASTSearchMetadataCrawledPropertyMapping -Managedproperty $sitetitle_managedproperty -crawledproperty
$internaltitle_crawledproperty

This example adds a mapping from the crawled property "internaltitle" (here part of the Web category) to the
managed property "sitetitle".
Note that both the crawled property and the managed property already exist, and these commands only add the
mapping. As a result, the crawled property "internaltitle" will now be mapped to "sitetitle" and stored in the FAST
Search Server 2010 for SharePoint system. The managed property can then be included in a full text index to make
it searchable.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)
C:\PS>$extended_title = New-FASTSearchMetadataManagedproperty -name ExtendedTitle -Type 1
$title = Get-FASTSearchMetadataManagedProperty -name title
$title.GetCrawledPropertyMappings() | ForEach-Object { New-FASTSearchMetadataCrawledPropertyMapping -
ManagedProperty $extended_title -CrawledProperty $_ }

This example adds a new managed property named "ExtendedTitle", and maps to "ExtendedProperty" all crawled
properties that are normally mapped to the managed property named "title". The original "title" managed property
is not changed, to avoid changing the current behavior of the search system.
This example first generates a list of crawled property objects mapped to the original "title" managed property.
Then the example iterates over this list using ForEach-Object to add each of them to the new "ExtendedTitle"
managed property. More crawled properties can be added to this new managed property later without impacting
the "title" managed property.

Parameters
-CrawledProperty
The crawled property that is mapped to a managed property.

Type: CrawledProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedProperty
The managed property to which a crawled property is mapped.

Type: ManagedProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchMetadataCrawledPropertyMapping
Remove-FASTSearchMetadataCrawledPropertyMapping
Set-FASTSearchMetadataCrawledPropertyMapping
minutes to read • Edit Online

New-FASTSearchMetadataFullTextIndex
In ths Article

Creates a new full text index.

Syntax
New-FASTSearchMetadataFullTextIndex -Description <String> -Name <String> [<CommonParameters>]

Description
This cmdlet creates a new full text index in Microsoft FAST Search Server 2010 for SharePoint. A full text index can
be searched by specifying the full text index name in a query. For example: "extracontent:car" searches for the term
"car" in the full text index named "extracontent". If no full text index is specified, the default full text index is used. A
relevancy score is calculated when searching the full text index, according to the rank profile specified in the query
(or the default rank profile, if no rank profile is specified).

See Set-FASTSearchMetadataFullTextIndex for details about changing the default full text index for searching.
See Set-FASTSearchMetadataRankProfile for more details about rank profiles.
Use New -FASTSearchMetadataFullTextIndexMapping to create mappings from managed properties to a new full
text index.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

New-FASTSearchMetadataFullTextIndex -Name CommonSharePoint -Description "Content from the common SharePoint


site."

This example creates a new full text index named "CommonSharePoint". After it has been created, you can map
managed properties into the full text index. See New -FASTSearchMetadataFullTextIndexMapping for details about
mapping properties into a full text index.

Parameters
-Description
Description of the full text index, including the type of content or which connector feeds the data.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Name of the new full text index.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-FASTSearchMetadataFullTextIndex
Set-FASTSearchMetadataFullTextIndex
Get-FASTSearchMetadataFullTextIndex
Set-FASTSearchMetadataRankProfile
New -FASTSearchMetadataFullTextIndexMapping
minutes to read • Edit Online

New-FASTSearchMetadataFullTextIndexMapping
In ths Article

Creates a new mapping from a managed property into the full text index.

Syntax
New-FASTSearchMetadataFullTextIndexMapping -FullTextIndex <FullTextIndex> -Level <Int32>
-ManagedProperty <ManagedProperty> [<CommonParameters>]

Description
This cmdlet adds the content of a managed property to a full text index by mapping the managed property into the
full text index. The mapping is only applicable to new content; existing content must be re-fed to appear in this full
text index.
The managed properties are ordered by a concept called importance level. If the number of matching documents
for a query term is greater than the StopWordThreshold for the rank profile in use, the Microsoft FAST Search
Server 2010 for SharePoint system retries the query, limiting the managed properties searched to those from a
higher importance level.
Importance level 1 (the first level that will be used in a query) includes managed properties from all levels 1 and up.
Importance level 2 includes levels 2 and up. The maximum level is 7.
This process is called drilling. See Set-FASTSearchMetadataRankProfile for more information about
StopWordThreshold.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>$title = Get-FASTSearchMetadataManagedProperty -name title


$fulltextindex = Get-FASTSearchMetadataFullTextIndex -Name thirdfulltextindex
New-FASTSearchMetadataFullTextIndexMapping -ManagedProperty $title -FullTextIndex $fulltextindex -Level 3

This example maps the managed property called "title" into the full text index named "thirdfulltextindex" at level 3.
After this mapping is made, the content must be re-fed to populate the full text index.

Parameters
-FullTextIndex
The full text index to add the mapping to.
Type: FullTextIndex
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Level
The importance level of this managed property. Allowed values are 1 through 7.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedProperty
The managed property being mapped to the full text index.

Type: ManagedProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-FASTSearchMetadataFullTextIndexMapping
Set-FASTSearchMetadataFullTextIndexMapping
Get-FASTSearchMetadataFullTextIndexMapping
Set-FASTSearchMetadataRankProfile
Get-FASTSearchMetadataManagedProperty
Get-FASTSearchMetadataFullTextIndex
minutes to read • Edit Online

New-FASTSearchMetadataManagedProperty
In ths Article

Creates a new managed property.

Syntax
New-FASTSearchMetadataManagedProperty -Name <String> -Type <Int32> [-Description <String>] [<CommonParameters>]

Description
This cmdlet creates a new managed property in the Microsoft FAST Search Server 2010 for SharePoint system.
The managed property can be one of the following data types:
-- Text: UTF -8 encoded text string -- Integer: Signed 64 bit integer -- Boolean: true / false -- Float: Double-precision
64-bit floating point, as specified in IEEE -754 -- Decimal: Integer with up to 27 decimals (number of decimals is set
through the DecimalPlaces parameter of the managed property; see Set-FASTSearchMetadataManagedProperty).
-- Datetime: Date range in ISO8601 format. Valid date range is -29000-01-01T00:00:00,000 to 29000-12-
31T23:59:59,999. Managed properties which have the type datetime always have sorting enabled.
See https://go.microsoft.com/fwlink/?LinkId=163234 (https://go.microsoft.com/fwlink/?LinkId=163234) for more
detailed information about the valid value ranges for each of these data types, and how illegal values are handled.
For IEEE -754, see https://ieeexplore.ieee.org/servlet/opac?punumber=2355
(https://ieeexplore.ieee.org/servlet/opac?punumber=2355).

For details about the options that can be set on a managed property, see Set-
FASTSearchMetadataManagedProperty.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

New-FASTSearchMetadataManagedProperty -name integervalue -type 2 -description "A managed property for integer
values"

This example creates a managed property called "integervalue" of type 2 (integer). To further change the settings
on the managed property, see Set-FASTSearchMetadataManagedProperty.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)
C:\PS>$managedproperty = New-FASTSearchMetadataManagedProperty -Name webtitle -type 1 -description "Titles from
RSS and Sitemap Files"
$rsstitle = Get-FASTSearchMetadataCrawledProperty -Name rss.title
$sitetitle = Get-FASTSearchMetadataCrawledProperty -Name sitemap.title
New-FASTSearchMetadataCrawledPropertyMapping -ManagedProperty $managedproperty -CrawledProperty $rsstitle
New-FASTSearchMetadataCrawledPropertyMapping -ManagedProperty $managedproperty -CrawledProperty $sitetitle
$content_fulltextindex = Get-FASTSearchMetadataFullTextIndex -name content
New-FASTSearchMetadataFullTextIndexMapping -FullTextIndex $content_fulltextindex -ManagedProperty
$managedproperty -level 7

This example shows a complete work-flow for making a new managed property and mapping a crawled property
to it. It creates a new managed property called "webtitle" to which it maps the crawled properties "rss.title" and
"sitemap.title". The "webtitle" managed property is then mapped into the full text index "content" at importance
level 7.
After this, you can feed documents (not shown here) with the crawled properties "rss.title" and "sitemap.title", and
they will appear in the "webtitle" managed property. This managed property is then searchable as part of the full
text index named "content".
To make the managed property searchable on its own, see Set-FASTSearchMetadataManagedProperty-Queryable.

Parameters
-Description
A text description of the managed property explaining what the managed property is used for.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the new managed property.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
An integer representing the data type of the new managed property. Valid values are:
-- 1 (Text) -- 2 (Integer) -- 3 (Boolean) -- 4 (Float) -- 5 (Decimal) -- 6 (Datetime)

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
Get-FASTSearchMetadataManagedProperty
Set-FASTSearchMetadataManagedProperty
Remove-FASTSearchMetadataManagedProperty
minutes to read • Edit Online

New-FASTSearchMetadataRankProfile
In ths Article

Creates a new rank profile to calculate relevance in queries.

Syntax
New-FASTSearchMetadataRankProfile -Name <String> [-Template <RankProfile>] [<CommonParameters>]

Description
A rank profile controls the relevancy calculation for a query. It consists of several components which are weighted
so that the relevancy calculation fits the content. See Set-FASTSearchMetadataRankProfile for more details.
A rank profile can either be created with default values, or based on another existing rank profile using the
Template parameter.
The rank profile is typically specified as part of a query. If no rank profile is specified in the query, the default rank
profile is used.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

New-FASTSearchMetadataRankProfile -Name newrankdistribution

This example adds a new rank profile based on the default settings. The new rank profile is called
"newrankdistribution".
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

C:\PS>$rankprofile_template = Get-FASTSearchMetadataRankProfile -Name newrankdistribution


New-FASTSearchMetadataRankProfile -Template $rankprofile_template -Name ExtraRankProfile

This example adds a new rank profile based on an existing rank profile called "newrankdistribution".
---------------EXAMPLE 3----------------- (FAST Server for SharePoint 2010)

C:\PS>$new_rank_profile = New-FASTSearchMetadataRankProfile -Name ImprovedDefault


$new_rank_profile.makeDefault()

This example specifies a new rank profile to use as the default rank profile for the FAST Search Server 2010 for
SharePoint.
Parameters
-Name
The name of the new rank profile.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
An object representing the rank profile that will serve as a template in creating the new rank profile.

Type: RankProfile
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
Remove-FASTSearchMetadataRankProfile
Set-FASTSearchMetadataRankProfile
Get-FASTSearchMetadataRankProfile
minutes to read • Edit Online

New-FASTSearchSearchSettingGroup
In ths Article

Creates a new Microsoft FAST Search Server 2010 for SharePoint search setting group.

Syntax
New-FASTSearchSearchSettingGroup -Name <String> [<CommonParameters>]

Description
This cmdlet creates a new FAST Search Server 2010 for SharePoint search setting group.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

New-FASTSearchSearchSettingGroup -Name marketinggroup

This example creates a new FAST Search Server 2010 for SharePoint search setting group named
"marketinggroup".

Parameters
-Name
The name of the search setting group to add.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchSearchSettingGroup
Remove-FASTSearchSearchSettingGroup
minutes to read • Edit Online

New-FASTSearchSecurityClaimsUserStore
In ths Article

Creates a FAST Search Server 2010 for SharePoint security user store to provide security for claims content.

Syntax
New-FASTSearchSecurityClaimsUserStore [-Identity] <String> [[-Description] <String>] [[-Issuer] <String>]
[-ObjectToClone <ClaimsUserStore>] [<CommonParameters>]

Description
This cmdlet configures extended security for claims content.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

New-FASTSearchSecurityClaimsUserStore -Identity clm

This example creates a new security claims user store with a user store Identity of "clm".
This example uses default values for all parameters except the required Identity parameter.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Get-FASTSearchSecurityClaimsUserStore -Identity clm | New-FASTSearchSecurityClaimsUserStore -Identity cl2

This example creates a new security claims user store with an identity of "cl2" using all properties from the claims
user store "clm" as a baseline. The New -FASTSearchSecurityClaimsUserStore cmdlet uses the ObjectToClone
value on the pipeline as input to the New cmdlet.

Parameters
-Description
A brief explanation of the user store.
Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The user store identity.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Issuer
The Microsoft SharePoint Server Security Token Service (STS ) claims provider that issued the claims.

Type: String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectToClone
A claims user store object whose property values are used as a baseline to create another claims user store.

Type: ClaimsUserStore
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityClaimsUserStore
Set-FASTSearchSecurityClaimsUserStore
minutes to read • Edit Online

New-FASTSearchSecurityLotusNotesUserStore
In ths Article

Creates a FAST Search Server 2010 for SharePoint security user store to provide security for Lotus Notes content.

Syntax
New-FASTSearchSecurityLotusNotesUserStore [-Identity] <String>
[[-NonIndexableCharacterEncodingPrefix] <String>] [[-NonIndexableCharacterPattern] <String>]
[[-Description] <String>] [[-UseDenyOnDefault] <Boolean>] [[-UseDocumentSecurity] <Boolean>]
[[-UseWildcardSecurity] <Boolean>] [[-UseViewSecurity] <Boolean>] [[-AllowPrefix] <String>]
[[-DenyPrefix] <String>] [[-NonIndexableCharacterHandling] <String>] [-ObjectToClone <LotusNotesUserStore>]
[<CommonParameters>]

Description
This cmdlet configures FAST Search Server 2010 for SharePoint security for Lotus Notes content.
A Lotus Notes security user store uses a user-dependent query filter that is applied to each query to enforce the
defined access control policies based on indexed values. The Lotus Notes security user store search filter requires
that the user has read access to both the item and the database to view a specific item.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

new-FASTSearchSecurityLotusNotesUserStore ln1

This example creates a new security Lotus Notes user store with a user store identity of "ln1".
This example uses default values for all parameters except the required Identity parameter.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Get-FASTSearchSecurityLotusNotesUserStore -Identity ln1 | New-FASTSearchSecurityLotusNotesUserStore -Identity


ln3 -UseViewSecurity $true

This example creates a new Lotus Notes user store with an identity of "ln3" and enables view level security. The
New -FASTSearchSecurityLotusNotesUserStore command uses the ObjectToClone object on the pipeline as input
to the New command for default parameter values.

Parameters
-AllowPrefix
A string value prepended to the document ACL to control which items the user is allowed access to and which
items will be returned in the query.

Type: String
Required: False
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DenyPrefix
A string value prepended to the ACL to control which items the user is denied access to and which items are not
returned from the query.

Type: String
Required: False
Position: 8
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Description
A brief explanation of the user store.

Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Identity
User store identity.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NonIndexableCharacterEncodingPrefix
If NonIndexableCharacterHandling is set to encodeWithPrefix, this parameter specifies the prefix added to the
encoded ACL.

Type: String
Required: False
Position: 10
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NonIndexableCharacterHandling
Specifies what to do with ACL values that match the NonIndexableCharacterRegExPattern regular expression.
Valid values:
-- encode - The ACL is encoded into a single searchable term. -- encodeWithPrefix - The value of
NonIndexableEncodedPrefix is concatenated with the ACL to be encoded, producing a single searchable term. --
remove - The ACL is removed from both allowing and denying access. Specify "remove" if the ACL is never used to
deny access.

Type: String
Required: False
Position: 9
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NonIndexableCharacterPattern
Specifies a regular expression pattern used to detect non-indexable characters in an ACL.
Identities matching this regular expression pattern will be processed based on NonIndexableCharacterHandling.

Type: String
Required: False
Position: 11
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectToClone
A Lotus Notes user store object whose property values are used as a baseline for the Lotus Notes user store being
created.

Type: LotusNotesUserStore
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UseDenyOnDefault
If true, support for default access with deny on users/groups is enabled on database level security.
You must enable this filter for an inverse security model: first grant access to everyone, and then explicitly deny
access to certain groups or users.

Type: Boolean
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UseDocumentSecurity
If true, item security is enabled (i.e., the filter contains an item level security condition).
If set to false, item level security is ignored; only database level security (and possibly view security) is used.
If items always inherit the ACLs of the database, you can turn off this option.

Type: Boolean
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UseViewSecurity
If true, view security is enabled (i.e., the filter contains a view level security condition).
If set to false, view level security is ignored; only database level security (and possibly item security) is used.
If views always inherit the ACLs of the database, or if views are not indexed, you can turn off this option.

Type: Boolean
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UseWildcardSecurity
If true, database access through wildcard group entry (starting with */) is enabled.
If set to false, the wildcard check is ignored. Only normal groups are checked against the database ACL.

Type: Boolean
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Related Links
Set-FASTSearchSecurityLotusNotesUserStore
Get-FASTSearchSecurityLotusNotesUserStore
minutes to read • Edit Online

New-FASTSearchSecurityRegexAliaser
In ths Article

Creates a regular expression aliaser.

Syntax
New-FASTSearchSecurityRegexAliaser [-InputUserStoreId] <String> [-OutputUserStoreIds] <String[]>
[-Patterns]
<System.Collections.Generic.List`1[Microsoft.SharePoint.Search.Extended.Security.Config.RegExAliasPatternMapCon
fig]>
[[-Identity] <String>] [[-CaseSensitive] <Boolean>] [[-UnicodeCaseSensitive] <Boolean>]
[-ObjectToClone <SecurityRegexAliaser>] [<CommonParameters>]

Description
This cmdlet creates a regular expression aliaser to map users/groups from one user store to users/groups in other
user stores, based on a regular expression pattern.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

New-FASTSearchSecurityRegexAliaserPattern -Regex .* -MapToUsername \1 | New-FASTSearchSecurityRegexAliaser -


Identity regex1 -InputUserStoreId ln1 -OutputUserStoreIds ln2

This example creates a regular expression aliaser pattern object and pipes it into a New -
FASTSearchSecurityRegexAliaser cmdlet to create a regular expression aliaser.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

New-FASTSearchSecurityRegexAliaserPattern -Regex .* -MapToUsername \1 | New-FASTSearchSecurityRegexAliaser -


InputUserStoreId ln1 -OutputUserStoreIds ln2,ln3 -CaseSensitive $False -UnicodeCaseSensitive $False

This example creates a regular expression aliaser pattern object and pipes it into a New -
FASTSearchSecurityRegexAliaser cmdlet to create a regular expression aliaser. The example sets the case-sensitive
flags so pattern matching is performed in a case-insensitive manner. The OutputUserStoreIds parameter maps
users/groups to two user stores: "ln2" and "ln3". The example generates the aliaser identity.

Parameters
-CaseSensitive
Specifies whether the regular expression patterns defined in the RegExAliasPatternMapConfig list are matched
based on case sensitivity matching rules. The default is true.

Type: Boolean
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Identity
The identity of the aliaser.

Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputUserStoreId
The identity of the mapped-from user store.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectToClone
A SecurityRegexAliaser object whose property values are used for the SecurityRegexAliaser aliaser being created.

Type: SecurityRegexAliaser
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-OutputUserStoreIds
A comma-separated list of mapped-to user store identities.

Type: String[]
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Patterns
A list of RegExAliasPatternMapConfig instances containing the regular expression patterns used for the mapping.
Type:
System.Collections.Generic.List`1[Microsoft.SharePoint.Search.Extended.Security.Config.RegExAliasPatternMapConf
ig]
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-UnicodeCaseSensitive
Specifies whether the regular expressions patterns defined in the RegExAliasPatternMapConfig list are matched
based on Unicode case sensitivity matching rules.

Type: Boolean
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Related Links
Set-FASTSearchSecurityRegexAliaser
Get-FASTSearchSecurityRegexAliaser
New -FASTSearchSecurityRegexAliaserPattern
minutes to read • Edit Online

New-FASTSearchSecurityRegexAliaserPattern
In ths Article

Creates a new regular expression pattern for a regex principal aliaser.

Syntax
New-FASTSearchSecurityRegexAliaserPattern [-Regex] <String> [-MapToUsername] <String>
[[-InputPropertyName] <String>]
[-Patterns
<System.Collections.Generic.List`1[Microsoft.SharePoint.Search.Extended.Security.Config.RegExAliasPatternMapCon
fig]>]
[<CommonParameters>]

Description
This cmdlet creates a new regular expression pattern that can be added to the list of patterns for a regular
expression based principal aliaser. This cmdlet creates a regular expression pattern that is used by and input to the
New -FASTSearchSecurityRegexAliaser and Set-FASTSearchSecurityRegexAliaser cmdlets.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

New-FASTSearchSecurityRegexAliaserPattern -Regex .* -InputPropertyName mail -MapToUsername "\1"

This example creates a regular expression pattern that can be used to map the "mail" property of a Microsoft user
store to identities in other user stores.
Use the regex pattern configuration object output from this command for the value of a pattern's parameter in a
New -FASTSearchSecurityRegexAliaser or a Set-FASTSearchSecurityRegexAliaser cmdlet.

Parameters
-InputPropertyName
The user/group property name this regular expression pattern is matched against.
The InputPropertyName is one of the following:
-- $PRINCIPAL_REFERENCE_ID - The identifier of the user or group. This is the default. --
$PRINCIPAL_REFERENCE_ALIAS - The alias of the user or group.
Any other property of the user or group. Refer to your specific user store for other properties that the user store
exposes.

Type: String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapToUsername
The user or group name to look to. This can also contain regular expression group replacements using the syntax:
#
where # is the group capture index.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Patterns
A list of RegExAliasPatternMapConfig objects. The RegExAliasPatternMapConfig being created is added to this list.

Type:
System.Collections.Generic.List`1[Microsoft.SharePoint.Search.Extended.Security.Config.RegExAliasPatternMapConf
ig]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Regex
The regular expression pattern that determines if the user or group should be mapped to another user store. This
regular expression pattern may contain regular expression groups that may be used in the generation of the
MapToUsername value.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityRegexAliaser
New -FASTSearchSecurityRegexAliaser
Set-FASTSearchSecurityRegexAliaser
minutes to read • Edit Online

New-FASTSearchSecurityXMLAliaser
In ths Article

Creates an XML principal aliaser.

Syntax
New-FASTSearchSecurityXMLAliaser [-InputUserStoreId] <String> [-OutputUserStoreIds] <String[]>
[[-Identity] <String>] [[-InputPropertyName] <String>] [-ObjectToClone <SecurityXMLAliaser>]
[<CommonParameters>]

Description
This cmdlet creates an XML aliaser to map users and groups from one user store to users and groups in other user
stores, based on an XML mapping file.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

New-FASTSearchSecurityXMLAliaser -InputUserStoreId win -OutputUserStoreIds ln3 -InputPropertyName mail

This example creates an XML principal aliaser to map the mail property of a Microsoft user store to users and
groups in another user store.
Use the Set-FASTSearchSecurityXMLAliaser cmdlet to upload the XML mapping file.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Get-FASTSearchSecurityAliaser xmlalias2 | New-FASTSearchSecurityXMLAliaser -Identity myxmlalias -


OutputUserStoreIds ln2

This example creates an XML principal aliaser based on an existing XML aliaser but sets the output user store IDs
to 'ln2'.
Use the Set-FASTSearchSecurityXMLAliaser cmdlet to upload an XML mapping file with desired mappings for the
new aliaser.

Parameters
-Identity
The identity of the aliaser. An identity is generated if the parameter is not specified.
Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputPropertyName
The user/group property name this regular expression pattern is matched against.
The InputPropertyName is one of the following:
-- $PRINCIPAL_REFERENCE_ID - The identifier of the user or group. This is the default.
Be sure to enclose in single quotes: '$PRINCIPAL_REFERENCE_ID'
-- $PRINCIPAL_REFERENCE_ALIAS - The alias of the user or group.
Be sure to enclose in single quotes: '$PRINCIPAL_REFERENCE_NAME'
Any other property of the user or group. Refer to your specific user store for other properties that the user store
exposes.

Type: String
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputUserStoreId
The identity of the mapped-from user store.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ObjectToClone
A SecurityXMLAliaserobject whose property values are copied as a baseline in the creation of another
SecurityXMLAliaser aliaser.

Type: SecurityXMLAliaser
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-OutputUserStoreIds
A comma-separated list of mapped-to user store identities.
Type: String[]
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Related Links
Set-FASTSearchSecurityXMLAliaser
Get-FASTSearchSecurityXMLAliaser
minutes to read • Edit Online

New-SPAccessServiceApplication
In ths Article

Creates a new instance of an Access Services application in SharePoint Server.

Syntax
New-SPAccessServiceApplication [-Name <String>] -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-CacheTimeout <Int32>] [-ColumnsMax <Int32>] [-Confirm]
[-Default] [-NonRemotableQueriesAllowed] [-OrderByMax <Int32>] [-OuterJoinsAllowed]
[-OutputCalculatedColumnsMax <Int32>] [-PrivateBytesMax <Int32>] [-RecordsInTableMax <Int32>]
[-RequestDurationMax <Int32>] [-RowsMax <Int32>] [-SessionMemoryMax <Int32>]
[-SessionsPerAnonymousUserMax <Int32>] [-SessionsPerUserMax <Int32>] [-SourcesMax <Int32>]
[-TemplateSizeMax <Int32>] [-WhatIf] [-ApplicationLogSizeMax <Int32>] [<CommonParameters>]

Description
The New -SPAccessServiceApplication cmdlet creates a new instance of an Access Services application in
SharePoint Server 2010, SharePoint Server 2013. After you create a new Access Services application, use the Set-
SPAccessServiceApplication cmdlet to modify its global settings.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE 1----------------

New-SPAccessServiceApplication -Name "MyAccessService" -SPIisWebServiceApplicationPool MyAppPool

This example creates a new instance of Access Services named MyAccessService that runs under the application
pool named MyAppPool.
------------EXAMPLE 2----------------

New-SPAccessServiceApplication -Name "MyAccessService" -SPIisWebServiceApplicationPool MyAppPool -


SessionsPerUserMax 25

This example creates a new instance of Access Services named MyAccessService that runs under the application
pool named MyAppPool, which allows up to 25 sessions per user on each back end application server machine on
which Access Services runs.

Parameters
-ApplicationLogSizeMax
Specifies the maximum number of records for an Access Services Application Log list. Valid valies: -1 to maxint. 0
means none are allowed. The default value is 3000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies the existing Internet Information Services (IIS ) application pool to run the Web service in for the new
Access Services application.
The type must be a valid instance of a SPIisWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CacheTimeout
Specifies the number of seconds that a data cache will remain active on Access Services with no user activity. Valid
values include: -1, cache never times out; 1 to 2073600, cache remains active from 1 second to 24 days.
The type must be the integers -1, or an integer in the range of 1 to 2073600 (24 days). The default value is 300.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ColumnsMax
Specifies the maximum number of columns that a list involved in a query can contain, or that the output of the
query can contain. The default value is 30.
The type must be an integer in the range of 1 to 255

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Default
Specifies that the service application is associated with Web applications by adding this service application's proxy
to the farm's default proxy list.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the display name of the Access Services application to create. The name can contain a maximum of 128
characters and can contain the comma (,), equal sign (=), or colon (:) characters provided they are enclosed in
quotation marks.
The type must be a valid name of an Access Services application; for example, AccessSrvApp1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NonRemotableQueriesAllowed
Specifies that queries that cannot be remoted to the database tier can run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OrderByMax
Specifies the maximum number of Order By clauses in the query. The default value is 4.
The type must be an integer in the range of 1 to 8.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OuterJoinsAllowed
Specifies that left and right outer joins are supported. Inner joins are always supported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputCalculatedColumnsMax
Specifies the maximum number of calculated columns that can be included in the output as a part of the query.
Calculated columns in the underlying list are not included. The default value is 10.
The type must be an integer in the range of 1 to 32.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateBytesMax
Specifies the maximum private bytes in megabytes (MB ) that can be used by Access Services. When set to -1,
Access Services defaults to 75 percent of physical memory on the machine. Valid values are -1 (no limit), and from
1 to any positive integer.The default value is -1.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RecordsInTableMax
Specifies the maximum number of records allowed for a table in the Access Services application. Valid values
include: -1, no limit, and 1 to any positive integer. The default value is 500000.
The type must be the integer -1, or an integer in the range of 1 to MaxInt.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestDurationMax
Specifies the maximum number of seconds that a request to perform an operation can use before the request
times out. Valid values include: -1, no limit, 1 to 2073600, cache remains active 1 second to 24 days. The default
value is 30.
The type must be the integer -1, or an integer in the range of 1 to 2073600 (24 days)

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RowsMax
Specifies the maximum number of rows that a list involved in a query can have, or that the output of the query can
have. The default value is 50000.
The type must be an integer in the range of 1 to 200000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionMemoryMax
Specifies the maximum allowable size, in megabytes, of an individual session. Valid values include 0, disable
property, and 1 to 4095. The default value is 64.
The type must be the integer 0, or an integer in the range of 1 to 4095.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionsPerAnonymousUserMax
Specifies the maximum number of sessions allowed per user. If this maximum is reached, the oldest session will be
deleted when a new session is started. Valid values include: -1, no limit, and 1 to any positive integer. The default
value is 10.
The type must be the integer -1, or an integer in the range of 1 to MaxInt.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionsPerUserMax
Specifies the maximum number of sessions allowed per user. If this maximum is reached, the oldest session will be
deleted when a new session is started. Valid values include: -1, no limit, and 1 to any positive integer. The default
value is 10.
The type must be the integer -1, or an integer in the range of 1 to MaxInt.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourcesMax
Specifies the maximum number of lists that can be used as input to a query at one time. The default value is 8.
The type must be an integer in the range of 1 to 20.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TemplateSizeMax
The maximum allowable size in megabytes allowed for Access templates (.accdt file files) uploaded into the
solution gallery. Valid values: -1(no limit), from 1 to any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPAccessServicesApplication
In ths Article

Creates an Access Services Service Application.

Syntax
New-SPAccessServicesApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-CacheTimeout <Int32>] [-Confirm] -DatabaseServer <String>
[-DatabaseServerCredentials <PSCredential>] [-Default] [-Encrypt <Boolean>] [-Hosted <Boolean>]
[-Name <String>] [-PrivateBytesMax <Int32>] [-QueryTimeout <Int32>] [-RecoveryPointObjective <Int32>]
[-RequestDurationMax <Int32>] [-SessionsPerAnonymousUserMax <Int32>] [-SessionsPerUserMax <Int32>]
[-TrustServerCertificate <Boolean>] [-WhatIf] [<CommonParameters>]

New-SPAccessServicesApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-CacheTimeout <Int32>] [-Confirm] [-Default]
[-Hosted <Boolean>] [-Name <String>] [-PrivateBytesMax <Int32>] [-QueryTimeout <Int32>]
[-RecoveryPointObjective <Int32>] [-RequestDurationMax <Int32>] [-SessionsPerAnonymousUserMax <Int32>]
[-SessionsPerUserMax <Int32>] [-WhatIf] [<CommonParameters>]

Description
Creates an Access Services Service Application.

Examples
Example 1

New-SPAccessServicesApplication -DatabaseServer SQLServerName -ApplicationPool 'SharePoint Web Services


Default' -Name 'Access Services Service Application' -Default

Creates an Access Services Service Application.

Parameters
-ApplicationPool
Specifies the existing IIS application pool in which to run the Web service for the service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.
Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CacheTimeout
The maximum time (in seconds) that a data cache can remain available, as measured from the end of each request
for data in that cache.
Valid values: -1 (indicates no limit); 1 through 2073600 (24 days).

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.
The type must be a valid SQL Server host name; for example, SERVER\Database.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerCredentials
Specifies the credentials used to log into the database server.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Default
Add to default Service Application Proxy group.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encrypt
Specifies to use SSL encryption between Access Services and the SQL Server hosting Access Services databases.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Hosted
Not used.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Access Services Service Application to create.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateBytesMax
The maximum number of private bytes (in MB ) allocated by the Access Services process.
Valid values: -1 (the limit is set to 50% of physical memory on the machine), any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueryTimeout
Maximum time in seconds for a database command or query to execute before it is cancelled.
Valid values: 0 (indicates no limit); 1 through 2073600 (24 days). Recommended value is 60.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecoveryPointObjective
Not used.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestDurationMax
The maximum duration (in seconds) allowed for a request from an application.
Valid values: -1 (indicates no limit); 1 through 2073600 (24 days).

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionsPerAnonymousUserMax
The maximum number of sessions allowed per anonymous user. If this maximum is hit the oldest session will be
deleted when a new session is started.
Valid values: -1 (no limit), 1 to any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionsPerUserMax
The maximum number of sessions allowed per user. If a user has this many sessions and starts a new session, the
user's oldest session is deleted.
Valid values: -1 (no limit), from 1 to any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustServerCertificate
Sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to
validate trust.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPIisWebServiceApplicationPoolPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

New-SPAccessServicesApplicationProxy
In ths Article

Creates a Proxy for an Access Services Service Application.

Syntax
New-SPAccessServicesApplicationProxy [-application] <SPServiceApplication>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Creates a Proxy for an Access Services Service Application.

Examples
Example 1

$sa = New-SPAccessServicesApplication -DatabaseServer spag.lab.cobaltatom.com -ApplicationPool 'SharePoint Web


Services Default' -Name 'Access Services Service Application' -Default
New-SPAccessServicesApplicationProxy -application $sa

This example creates an Access Services Application, placing it into the $sa variable. Using the $sa variable, it is
then used to create the Access Services Service Application Proxy.

Parameters
-application
Specifies the Access Services Service Application to create a proxy for.

Type: SPServiceApplication
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.Administration.SPServiceApplication
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

New-SPAccessServicesDatabaseServer
In ths Article

Adds a server to host Access Services databases.

Syntax
New-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-AvailableForCreate <Boolean>] [-Confirm]
[-DatabaseServerCredentials <PSCredential>] [-DatabaseServerGroupName <String>] -DatabaseServerName <String>
[-Encrypt <Boolean>] [-Exclusive <Boolean>] [-SecondaryDatabaseServerName <String>]
[-ServerReferenceId <Guid>] [-TrustServerCertificate <Boolean>] [-UserDomain <String>]
[-ValidateServer <Boolean>] [-WhatIf] [-LoginType <LoginType>] [-State <DatabaseServerStates>]
[-StateOwner <ServerStateOwner>] [<CommonParameters>]

Description
This cmdlet adds additional Access Services database servers to host Access Services databases.

Examples
Example 1

New-SPAccessServicesDatabaseServer -ServiceContext https://siteUrl -DatabaseServerName SQLSVR01 -


ValidateServer:$true

This example adds the SQL Server named SQLSVR01 as an Access Services database server using the context of
the site, https://siteUrl. This also validates SQLSVR01 is capable of hosting Access Services databases.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AvailableForCreate
Indicates whether or not the SQL Server is available to create Access Services databases on. The default value is
true.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerCredentials
Specifies the credentials used to connect to the SQL Server.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerGroupName
Specifies the Access Services database group name. The default value is DEFAULT.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerName
Specifies the name of the SQL Server to add.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encrypt
Specifies to use SSL encryption between Access Services and the SQL Server hosting Access Services databases.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exclusive
If the SQL Server has AvaliableForCreate set to False, this will update it to True. If the SQL Server Id does not
match the database server Id and the server has AvailableForCreate set to True, this will set AvailableForCreate to
False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoginType
Indicates the login type. Valid values are:
ApplicationLogin
LocalDBApplicationLogin
ServerLogin
StorageAccountLogon
WindowsAzureServerLogin
The default value is ServerLogin.

Type: LoginType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryDatabaseServerName
Specifies a secondary SQL Server to associate to the new SQL Server. This is used for disaster recovery purposes.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerReferenceId
Provide a specific Server Reference Id. By default, a Server Reference Id is generated automatically when the SQL
Server is added.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context to retrieve Access Services information from.

Type: SPServiceContextPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-State
Indicates the availability of the SQL Server to be added. Valid values are:
Active
Locked
Reserved
The default value is Active.

Type: DatabaseServerStates
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StateOwner
Specifies the state owner. Valid values are:
NoOwner
TenantMove
The default value is NoOwner.
Type: ServerStateOwner
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustServerCertificate
Sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to
validate trust.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserDomain
Specifies the domain to use for credentials.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ValidateServer
Validates the SQL Server is in a supported state to host Access Services databases.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

New-SPAlternateURL
In ths Article

Creates a new public or internal URL for the specified Web application zone or resource.

Syntax
New-SPAlternateURL [-Url] <String> -WebApplication <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Internal] [-WhatIf] [-Zone <SPUrlZone>]
[<CommonParameters>]

New-SPAlternateURL [-Url] <String> -ResourceName <String> [-AssignmentCollection <SPAssignmentCollection>]


[-Confirm] [-Internal] [-WhatIf] [-Zone <SPUrlZone>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The New -SPAlternateUrl cmdlet creates a new public or internal URL for the specified Web application zone or
resource. Use the ResourceName parameter if the alternate URL is for an external resource.
Each Web application can be associated with a collection of mappings between internal and public URLs. Both
internal and public URLs consist of the protocol and domain portion of the full URL; for example,
https://www.fabrikam.com. Users type a public URL to get to the SharePoint site, and that URL appears in the links
on the pages. Internal URLs are in the URL requests that are sent to the SharePoint site. Many internal URLs can
be associated with a single public URL in multiserver farms; for example, when a load balancer routes requests to
specific IP addresses to various servers in the load-balancing cluster.
Each Web application supports five collections of mappings per URL; the five collections correspond to five zones
(default, intranet, extranet, Internet, and custom). When the Web application receives a request for an internal URL
in a particular zone, links on the pages returned to the user have the public URL for that zone.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

#create the public URL


New-SPAlternateURL https://www.contoso.com -Zone "Internet"

#create the internal URL


New-SPAlternateURL https://sharepoint.contoso.com -Zone "Internet" -internal
This example translates incoming requests for https://www.contoso.com into https://sharepoint.contoso.com (on
the Internet zone).
When a reverse proxy is being set up to handle public URL SSL termination, alternate access mappings must be
configured to handle the URL translation.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Internal
Makes this alternate URL an internal URL. If this parameter is not provided, the URL is a public URL.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceName
Specifies the resource name, if the alternate URL is for an external resource. If no value is specified, the value is left
blank.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the public URL that users access to sign in to the Web application.
The type must be a valid URL, in the form https://server_name.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the name, URL, or GUID of the Web application for which to create the mapping.
The type must be a valid name, URL, in the form WebApplication-1212, https://server_name, or GUID, in the form
1234-5678-9876-0987.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies one of the five zones with which the alternate URL is associated.
The type must be a valid zone: Default, Intranet, Internet, Extranet, or Custom.
Type: SPUrlZone
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPAppManagementServiceApplication
In ths Article

Creates an App Management Service application.

Syntax
New-SPAppManagementServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseCredentials <PSCredential>]
[-DatabaseName <String>] [-DatabaseServer <String>] [-FailoverDatabaseServer <String>] [-Name <String>]
[-WhatIf] [-DeferUpgradeActions] [<CommonParameters>]

Description
Use the New -SPAppManagementServiceApplication cmdlet to create an App Management Service application
with the specified name on the specified application pool with a single database which specified parameters create.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE----------

New-SPAppManagementServiceApplication -Name AppManagement -DatabaseServer MyDatabaseServer -DatabaseName


AppManagementDB -ApplicationPool MyServiceAppPool

This example creates an App Management Service application named AppManagement with a database server
MyDatabaseServer and database name AppManagementDB. The new service application will run under the app
pool named MyServiceAppPool

Parameters
-ApplicationPool
Specifies the application pool of the service application.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the credentials to use when creating the service application database. These credentials will have owner
rights on the newly created service application database. If a value is not provided, the current user's credentials are
used by default.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the service application database to be created. If a value is not provided, a default database
name is provided.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the server of the service application database to be created, If a value is not provided, the default
database server is used.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
Specifies if the upgrade process is to be deferred and manually completed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the failover server of the service application database to be created, If a value is not provided, there will
not be a failover server for the service application database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the service application to be created. If not provided, the default name is used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPAppManagementServiceApplicationProxy
minutes to read • Edit Online

New-SPAppManagementServiceApplicationProxy
In ths Article

Creates an App Management Service application proxy.

Syntax
New-SPAppManagementServiceApplicationProxy -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Name <String>] [-UseDefaultProxyGroup] [-WhatIf]
[<CommonParameters>]

New-SPAppManagementServiceApplicationProxy -Uri <String> [-AssignmentCollection <SPAssignmentCollection>]


[-Confirm] [-Name <String>] [-UseDefaultProxyGroup] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the New -SPAppManagementServiceApplicationProxy cmdlet to create an App Management Service
application proxy with the specified name for the specified App Management Service application or the specified
endpoint. Depending on the parameter value, it also adds the new proxy to the default proxy group.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE-------------

$sa = New-SPAppManagementServiceApplication -Name AppManagement -DatabaseServer MyDatabaseServer -DatabaseName


AppManagementDB -ApplicationPool MyServiceAppPool
New-SPAppManagementServiceApplicationProxy -Name AppManagementProxy -UseDefaultProxyGroup -ServiceApplication
$sa

This example creates a new App Management Service application proxy named AppManagementProxy for the
specified service application and adds the new App Management Service application proxy to the default proxy
group.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the service application proxy to be created. If a value is not provided, a default name is used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the App Management Service application for which you are creating the service application proxy.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Uri
Specifies the endpoint URI of the App Management Service application in which to create the service application
proxy.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseDefaultProxyGroup
Specifies whether to add the newly created service application proxy to the default proxy group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPAppManagementServiceApplication
minutes to read • Edit Online

New-SPAuthenticationProvider
In ths Article

Creates a new authentication provider in the farm.

Syntax
New-SPAuthenticationProvider -ASPNETMembershipProvider <String> -ASPNETRoleProviderName <String>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

New-SPAuthenticationProvider -TrustedIdentityTokenIssuer <SPTrustedIdentityTokenIssuerPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

New-SPAuthenticationProvider [-AllowAnonymous] [-AssignmentCollection <SPAssignmentCollection>]


[-DisableKerberos] [-UseBasicAuthentication] [-UseWindowsIntegratedAuthentication] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The New -SPAuthenticationProvider cmdlet creates a new authentication provider in the farm.
--NTLM, Classic NTLM, Negotiate, and Classic Negotiate can be set only in a web application. --For ASP.NET
Membership Provider or Role providers, no objects are persisted. The object is created and used for setting this
type of Authentication provider in a web application. --For STS Authentication providers, an object is created and
persisted in the SPFarm object.
You cannot use classic NTLM with any claims-based authentication type.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------------EXAMPLE1------------------

$ap = New-SPAuthenticationProvider -UseWindowsIntegratedAuthentication


Set-SPWebApplication -Name "Claims Windows Web App" -ApplicationPool "Claims App Pool" -ApplicationPoolAccount
"redmond\appool" -Url http:// -Port 80 -AuthenticationProvider $ap

This example creates a Windows claims authentication provider.


---------------------------EXAMPLE2------------------
$ap = New-SPAuthenticationProvider -ASPNETMembershipProvider "membership" -ASPNETRoleProviderName "rolemanager"
Set-SPWebApplication -Name "Claims Windows Web App" -ApplicationPool "Claims App Pool" -ApplicationPoolAccount
"redmond\appool" -Url http:// -Port 80 -AuthenticationProvider $ap

This example creates an authentication provider that is based on the ASP.NET membership role provider.
---------------------------EXAMPLE3------------------

$ap = New-SPAuthenticationProvider -TrustedIdentityTokenIssuer | Get-SPTrustedIdentityTokenIssuer "LiveIDSTS"


Set-SPWebApplication -Name "Claims Windows Web App" -ApplicationPool "Claims App Pool" -ApplicationPoolAccount
"redmond\appool" -Url http:// -Port 80 -AuthenticationProvider $ap

This example creates a trusted token issuer authentication provider.

Parameters
-AllowAnonymous
Specifies whether the web application allows anonymous access.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASPNETMembershipProvider
Specifies the name of the membership provider.
The value must be a valid name of an ASP.NET membership provider; for example, myMembershipProvider.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ASPNETRoleProviderName
Specifies the name of the role provider.
The value must be a valid name of an ASP.NET role provider; for example, myRoleProvider.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DisableKerberos
Specifies whether the web application disables Kerberos authentication.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustedIdentityTokenIssuer
Specifies the identity of the authentication provider.
The value must be in one of the following forms:
--A valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh --A valid name of a
TrustedIdentityTokenIssuer (for example, myRoleProvider) --An instance of a valid SPTrustedIdentityTokenIssuer
object

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseBasicAuthentication
Specifies whether the web application uses Basic authentication.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseWindowsIntegratedAuthentication
Specifies whether the web application uses Integrated Windows authentication.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPAzureAccessControlServiceApplicationProxy
In ths Article

Creates a new service application proxy group.

Syntax
New-SPAzureAccessControlServiceApplicationProxy -MetadataServiceEndpointUri <String> -Name <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup] [-WhatIf]
[<CommonParameters>]

Description
Use the New -SPAzureAccessContrlServiceApplicationProxy cmdlet to create a new service application proxy
group for the Azure Control service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE--------------

New-SPAzureAccessControlServiceApplicationProxy -Name "ACS" -metadataEndpointUri "http://test" -


DefaultProxyGroup

This example creates a proxy group named ACS which will be added to the default proxy group.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies whether the proxy needs to be added to the default proxy group.
We recommend that you add the proxy to the default proxy group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MetadataServiceEndpointUri
Specifies the URL of the Azure Access Control Service's metadata document.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the proxy that you want to create.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPBECWebServiceApplicationProxy
In ths Article

Do not use.

Syntax
New-SPBECWebServiceApplicationProxy [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DefaultProxyGroup] -Name <String> -ServiceEndpointUri <String> [-WhatIf] [<CommonParameters>]

Description
Do not use.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------ Example 1 --------------------

Parameters
-AssignmentCollection
Do not use.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Do not use.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultProxyGroup
Do not use.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Do not use.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceEndpointUri
Do not use.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPBusinessDataCatalogServiceApplication
In ths Article

Creates a new Business Data Connectivity service application in the farm.

Syntax
New-SPBusinessDataCatalogServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-DatabaseName <String>] [-DatabaseServer <String>] [-Name <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseCredentials <PSCredential>]
[-DatabasePassword <SecureString>] [-DatabaseUsername <String>] [-FailoverDatabaseServer <String>]
[-PartitionMode] [-Sharing] [-WhatIf] [-DeferUpgradeActions] [<CommonParameters>]

Description
The New -SPBusinessDataCatalogServiceApplication cmdlet creates a new Business Data Connectivity service
application in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

New-SPBusinessDataCatalogServiceApplication -ApplicationPool "SharePoint Web Services Default" -DatabaseName


"ContosoBdcDB" -DatabaseServer "CONTOSO\SharePoint" -Name "ContosoServiceApp"

This example creates a Business Data Connectivity service application named ContosoServiceApp. In this process it
uses the SharePoint Web Services Default application pool and creates a database named ContosoBdcDB.

Parameters
-ApplicationPool
Specifies the IIS application pool to use for the new Business Data Connectivity service application.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL Server
Authentication.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name for the Business Data Connectivity database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password for the user specified in DatabaseUserName. Use this parameter only if SQL Server
Authentication is used to access the Business Data Connectivity database.
The type must be a valid password.
Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.
The type must be a valid SQL Server host name; for example, SERVER\Database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the user name to use for connecting to the database. Use this parameter only if SQL Server
Authentication is used to access the Business Data Connectivity database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
Specifies if the upgrade process is to be deferred and manually completed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host server for the failover database server.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a display name for the new Business Data Connectivity service application.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionMode
Specifies that the service application restricts data by subscription ID. This property cannot be changed after the
service application is created.
This property has no effect on SharePoint Server 2019.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Sharing
Specifies that the Business Data Connectivity application is published and shared across the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPBusinessDataCatalogServiceApplicationProxy
In ths Article

Creates a new Business Data Connectivity service application proxy in the farm.

Syntax
New-SPBusinessDataCatalogServiceApplicationProxy [-Name <String>]
-ServiceApplication <SPServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DefaultProxyGroup] [-WhatIf] [<CommonParameters>]

New-SPBusinessDataCatalogServiceApplicationProxy [-Name <String>] -Uri <Uri>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup] [-WhatIf] [-PartitionMode]
[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The New -SPBusinessDataCatalogServiceApplicationProxy cmdlet creates a new Business Data Connectivity
service application proxy for a Business Data Connectivity service application in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$sa = New-SPBusinessDataCatalogServiceApplication -ApplicationPool "SharePoint Web Services Default" -


DatabaseName "ContosoBdcDB" -DatabaseServer "CONTOSO\SharePoint" -Name "ContosoServiceApp"
New-SPBusinessDataCatalogServiceApplicationProxy -Name "ContosoServiceAppProxy" -ServiceApplication $sa

This example creates a new Business Data Connectivity service application proxy with the name
ContosoServiceAppProxy for the given service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the service application proxy is added to the default proxy group for the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a display name for the new Business Data Connectivity service application proxy.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionMode
Specifies if partition mode is to be turned on.
The valid values are True and False. The default value is False.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the Business Data Connectivity service application associated with the new proxy.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Uri
Specifies the URI of a remote service application to which to connect.
The type must be a valid URI, in the form file:\\server_name\sitedocs.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPCentralAdministration
In ths Article

Creates a new SharePoint Central Administration Web application.

Syntax
New-SPCentralAdministration [[-Port] <Int32>] [[-WindowsAuthProvider] <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-SecureSocketsLayer] [<CommonParameters>]

Description
The New -SPCentralAdministration cmdlet creates a new Central Administration Web application and starts the
central administration service on the local computer. Central Administration is available only on computers where
this service runs.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

New-SPCentralAdministration -WindowsAuthProvider NTLM -Port 8080

This example creates the Central Administration site at port 8080 on the local farm using NTLM authentication.
------------------EXAMPLE 2-----------------------

New-SPCentralAdministration -WindowsAuthProvider Kerberos -Port 443 -SecureSocketsLayer

This example creates the Central Administration site using SSL on port 443 with Kerberos authentication.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Port
Specifies the port number for Central Administration. If no port is specified, a nonconflicting port number is auto-
generated.
The type must be a valid port number.
If you specify a port number that has already been assigned, IIS does not start the new site until you change either
the port number of the new site or the port number of the old site.

Type: Int32
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-SecureSocketsLayer
Enables Secure Socket Layer (SSL ) encryption for the specified port. If you choose to use SSL, you must assign a
server certificate to the Central Administration IIS web site by using the IIS administration tools. The Central
Administration web application won't be accessible until you do this.
The default value is False.
If this parameter is omitted or set to False the Central Administration site will use HTTP for the specified port.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WindowsAuthProvider
Specifies the authorization provider for this Web application. If no authentication provider is specified, the default
value NTLM is used.
The type must be one of two values: Kerberos or NTLM.

Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

New-SPClaimProvider
In ths Article

Registers a new claim provider in the farm.

Syntax
New-SPClaimProvider -AssemblyName <String> -Description <String> -DisplayName <String> -Type <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Default] [-Enabled] [<CommonParameters>]

Description
The New -SPClaimProvider cmdlet registers a new claim provider in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

New-SPClaimProvider -Name "MyClaimProvider" -Type "MyClaimProvider.Providers.CustomProvider" -


AllWebApplications

This example registers a claim provider in the farm.


------------------EXAMPLE 2------------------

New-SPClaimProvider -Name "MyClaimProvider" -Type "MyClaimProvider.Providers.CustomProvider" -Scope (Get-


SPWebApplication https://test)

This example registers a claim provider scoped to a given Web application.

Parameters
-AssemblyName
The type must be a valid name of an assembly; for example, ClaimAssembly1.
Specifies the name of the assembly with the claim provider.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Default
Specifies that the claim provider applies to all Web applications and zones.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the claim provider.
The type must be a valid name of an assembly; for example, ClaimAssembly1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies the display name of the new claim provider.
The type must be a valid name of a claim provider; for example, ClaimProvider1.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enabled
Turns on the claim provider.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the type of the claim.
The type must be a valid name of a claim type; for example MyClaimProvider.Providers.CustomProvider.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPClaimsPrincipal
In ths Article

Creates a claims principal.

Syntax
New-SPClaimsPrincipal [-ClaimValue] <String> [[-ClaimType] <String>]
[-TrustedIdentityTokenIssuer] <SPTrustedIdentityTokenIssuerPipeBind> [-IdentifierClaim]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

New-SPClaimsPrincipal [-ClaimValue] <String> [-ClaimType] <String>


[-AssignmentCollection <SPAssignmentCollection>] -ClaimProvider <SPClaimProvider> [<CommonParameters>]

New-SPClaimsPrincipal [-EncodedClaim] <String> [-AssignmentCollection <SPAssignmentCollection>]


[<CommonParameters>]

New-SPClaimsPrincipal [-Identity] <String> [-IdentityType] <SPIdentifierTypes>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

New-SPClaimsPrincipal [-Identity] <String> [-TrustedIdentityTokenIssuer] <SPTrustedIdentityTokenIssuerPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The New -SPClaimsPrincipal cmdlet creates a claims principal.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------------EXAMPLE 1-----------------------------

New-SPSite https://sitename/sites/newsite -owner (New-SPClaimsPrincipal contoso\johndoe -


TrustedIdentityTokenIssuer "NTLM")

This example creates a claim principal for a Windows user.


-------------------------EXAMPLE 2-----------------------------

New-SPSite https://localhost/sites/newsite -owner (New-SPClaimsPrincipal contoso\allusers -


TrustedIdentityTokenIssuer "NTLM")

This example creates a claim principal for a Windows group.


-------------------------EXAMPLE 3-----------------------------

New-SPSite https://sitename/sites/newsite -owner (New-SPClaimsPrincipal -ClaimValue "john@contoso.com" -


ClaimType Email -TrustedIdentityTokenIssuer "LiveID STS" -IdentifierClaim Yes)

This example creates a claim principal for a trusted identity token issuer claim.
-------------------------EXAMPLE 4-----------------------------

$ip = New-SPIdentityProvider -ASPNetMembershipProvider "myMembershipProvider" -ASPNetRoleProvider


"myRoleProvider"
New-SPSite https://sitename/sites/newsite -owner (New-SPClaimsPrincipal "john@contoso.com" -
TrustedIdentityTokenIssuer $ip)

This example creates a claim principal for a ASPNet Membership User.


-------------------------EXAMPLE 5-----------------------------

New-SPSite https://sitename/sites/newsite -owner (New-SPClaimsPrincipal "Sales Manager Role" -IdentityProvider


"myRoleProvider")

This example creates a claim principal for a ASPNet Role.


-------------------------EXAMPLE 6-----------------------------

$cp = New-SPClaimsPrincipal -Identity "redmond\SiteOwner" -IdentityType 1


New-SPSite https://servername:port -OwnerAlias $cp.ToEncodedString() -Template "STS#0"

This example creates a claim principal for a Basic Claim Role, which is also called an encoded claim).

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClaimProvider
Specifies the security token service identity provider that will contain the claims principal.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of identity
provider (for example, MyIDprovider1); or an instance of a valid SPIdentityProvider object.

Type: SPClaimProvider
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClaimType
Specifies the type of claim to create. The value I indicates a unique user identity claim, and the value C indicates all
other claims.
The type must be either of the following values: I or C.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClaimValue
Specifies the claim value of the claims object. The claims value specifies the user, group, or computer that the claim
is authenticating.
The type must be a valid claim value; for example, john@contoso.com.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-EncodedClaim
Converts a simple claim to a full encoded claim.
The type must be a valid claim value; for example, i:001w|redmond\user.
Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IdentifierClaim
Specifies if the new claim is an identity claim.

Type: SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the new claims principal.
The type must be a valid name of a claims principal.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IdentityType
Specifies the type of the new claims principal.
The type must be one of the following: WindowsSamAccountName, WindowsSecurityGroupSid, FormsUser,
FormsRole, or EncodedClaim.

Type: SPIdentifierTypes
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustedIdentityTokenIssuer
Specifies the ID of the authentication provider.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of an
Authentication provider (for example, MyAuthprovider1); or an instance of a valid SPTrustedIdentityTokenIssuer
object.
Type: SPTrustedIdentityTokenIssuerPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPClaimTypeEncoding
In ths Article

Registers a new type of claim.

Syntax
New-SPClaimTypeEncoding -ClaimType <String> -EncodingCharacter <Char>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
Use the New -SPClaimTypeEncoding cmdlet to register the following:
--A new type of claim
--The Unicode character to which it should be encoded when the SPClaim.ToEncodedString method is invoked
--The SPClaim.ClaimType property is set to a valid valu e
For more information about the SPClaim methods and properties, see
M:Microsoft.SharePoint.Administration.Claims.SPClaim.ToEncodedString and
P:Microsoft.SharePoint.Administration.Claims.SPClaim.ClaimType respectively.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE-------

New-SPClaimTypeEncoding -EncodingCharacter '1' -ClaimType


"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country"

This example registers a new type of claim.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClaimType
Specifies the type of claim for which you want to create a mapping.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EncodingCharacter
Specifies the Unicode character to which you want to create a mapping.

Type: Char
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Suppresses confirmation messages to any claim type that is added.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPClaimTypeEncoding
minutes to read • Edit Online

New-SPClaimTypeMapping
In ths Article

Creates a claim mapping rule for a security token service (STS ) identity provider.

Syntax
New-SPClaimTypeMapping [-IncomingClaimType] <String> [-IncomingClaimTypeDisplayName] <String>
[[-LocalClaimType] <String>] [-AssignmentCollection <SPAssignmentCollection>] [-SameAsIncoming]
[<CommonParameters>]

Description
The New -SPClaimTypeMapping cmdlet creates a claim mapping rule for a security token service (STS ) identity
provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1----------------------------

$map1 = New-SPClaimTypeMapping -IncomingClaimType


"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName
"EmailAddress" -SameAsIncoming
$map2 = New-SPClaimTypeMapping -IncomingClaimType
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" -IncomingClaimTypeDisplayName "PUID" -
LocalClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/thumbprint"
New-SPTrustedIdentityTokenIssuer -Name "LiveIDSTS" -Description "LiveID Provider" -Realm
"urn:domain.company.com" -ImportTrustCertificate $cert -ClaimsMappings $map1[,$map2..] -SignInUrl
"https://login.live.com/login.srf" -IdentifierClaim $map2.InputClaimType

This example creates a claim map from an incoming token to a SharePoint token.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncomingClaimType
Specifies the URI of the incoming claim type.
The type must be a valid URI, in the form http://schemas.microsoft.com/email.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncomingClaimTypeDisplayName
Specifies the display name of the incoming claim type.
The type must be a valid name of an incoming claim type; for example, Email.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocalClaimType
Specifies the URI of the local claim type. If the SameAsIncoming parameter is False, this is a required parameter.
The type must be a valid URI, in the form http://schemas.microsoft.com/email.

Type: String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SameAsIncoming
Specifies that the claim type specified in the IncomingClaimType parameter is used for the LocalClaimType
parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPConfigurationDatabase
In ths Article

Creates a new configuration database.

Syntax
New-SPConfigurationDatabase [-DatabaseName] <String> [-DatabaseServer] <String> [[-DirectoryDomain] <String>]
[[-DirectoryOrganizationUnit] <String>] [[-AdministrationContentDatabaseName] <String>]
[[-DatabaseCredentials] <PSCredential>] [-FarmCredentials] <PSCredential> [-Passphrase] <SecureString>
[-SkipRegisterAsDistributedCacheHost] [-AssignmentCollection <SPAssignmentCollection>]
[-DatabaseFailOverServer <String>] [-LocalServerRole <SPServerRole>] [-ServerRoleOptional]
[<CommonParameters>]

Description
The New -SPConfigurationDatabase cmdlet creates a new configuration database on the specified database server.
This is the central database for a new SharePoint farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

New-SPConfigurationDatabase -DatabaseName "SharePointConfigDB1" -DatabaseServer "SQL-01" -Passphrase


(ConvertTo-SecureString "MyPassword" -AsPlainText -force) -FarmCredentials (Get-Credential)

This example prompts the user to provide user credentials for the default Farm Administrator account.
------------------EXAMPLE 2-----------------------

New-SPConfigurationDatabase -DatabaseName "SharePointConfigDB1" -DatabaseServer "SQL-01" -Passphrase


(ConvertTo-SecureString "MyPassword" -AsPlainText -force) -FarmCredentials (Get-Credential) -
SkipRegisterAsDistributedCacheHost

This example prompts the user to provide user credentials for the default Farm Administrator account and skips
registering the server as Distributed Cache host. Applies to SharePoint Server 2013 and SharePoint Server 2016,
SharePoint Server 2019 only.
------------------EXAMPLE 3-----------------------

New-SPConfigurationDatabase -DatabaseName "SharePointConfigDB1" -DatabaseServer "SQL-01" -Passphrase


(ConvertTo-SecureString "MyPassword" -AsPlainText -force) -FarmCredentials (Get-Credential) -LocalServerRole
Custom
This example prompts the user to provide user credentials for the default Farm Administrator account and sets the
Server Role to Custom. Applies to SharePoint Server 2016, SharePoint Server 2019 only.

Parameters
-AdministrationContentDatabaseName
Specifies the name for the Central Administration content database for the new farm. If no name is specified, a
default name is used.

Type: String
Required: False
Position: 5
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseCredentials
Specifies the Credential object for the database user. Use this parameter if you use SQL Server Authentication. If
no database credentials are provided, Windows authentication is used.

Type: PSCredential
Required: False
Position: 6
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DatabaseFailOverServer
Specifies the SQL Server Database Mirror partner server for the Configuration and Central Administration
database.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DatabaseName
Specifies the name of the new configuration database.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DatabaseServer
Specifies the database server on which to create the configuration database. If no value is specified, the default
value is used.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DirectoryDomain
Specifies the directory domain for the new farm. If no domain is specified, the domain in which the local computer
is located is used.

Type: String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DirectoryOrganizationUnit
Specifies the directory organizational unit for the new configuration database. If no organizational unit is specified,
the organizational unit in which the local computer is located is used.

Type: String
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FarmCredentials
Specifies credentials for the Farm Administrator account.
Type: PSCredential
Required: True
Position: 7
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-LocalServerRole
Specifies the Server Role. Valid options for all versions of SharePoint Server 2016, SharePoint Server 2019 are:
Custom , SingleServerFarm , Application , WebFrontEnd , DistributedCache , Search

With the addition of Feature Pack 1, new options include: ApplicationWithSearch , WebFrontEndWithDistributedCache

Type: SPServerRole
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Passphrase
Specifies the secure password phrase for the new farm. This passphrase is used to join other machines to this farm.

Type: SecureString
Required: True
Position: 8
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ServerRoleOptional
Configures the farm to not require a server role to be specified. If no server role is specified, the server defaults to
the Custom role.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteMapDatabaseName
Do not use. Specifies the database name of the Site Map site.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteMapDatabaseServer
Do not use. Specifies the database server name of the Site Map site.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipRegisterAsDistributedCacheHost
By default all the servers in the farm are registered as a cache host (that is, DistributedCacheService is running by
default).
Use this parameter to not register the server computer as a distributed cache host. If you want to have a dedicated
cache host, then use this parameter to make sure that caching service is not installed on the computer.

Type: SwitchParameter
Required: False
Position: 9
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

New-SPContentDatabase
In ths Article

Creates a new content database and attaches it to the specified Web application.

Syntax
New-SPContentDatabase [-Name] <String> [-WebApplication] <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-AssignNewDatabaseId] [-Confirm] [-ClearChangeLog]
[-DatabaseCredentials <PSCredential>] [-DatabaseServer <String>] [-MaxSiteCount <Int32>]
[-WarningSiteCount <Int32>] [-WhatIf] [-ChangeSyncKnowledge] [-DatabaseAccessCredentials <PSCredential>]
[-UseLatestSchema] [<CommonParameters>]

Description
The New -SPContentDatabase cmdlet creates a new content database and attaches it to the specified Web
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE--------------------

New-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication https://sitename

This example creates a new content database for the sitename Web application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignNewDatabaseId
Creates a new database ID automatically when the content database is attached.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ChangeSyncKnowledge
Specifies Groove sync client to resync their content when a Content Database attach is used.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClearChangeLog
Clears any pending changes from the change log in the content database.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseAccessCredentials
Specifies the credential for the SPDataAccess role.
Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL Server
Authentication.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the content database specified in the Name parameter.
The type must be a valid SQL Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxSiteCount
Specifies the maximum number of Web sites that can use the content database.
The type must be a positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the new content database to create within the farm.
The type must be a valid name of a SharePoint content database; for example, SPContentDB1.
Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseLatestSchema
Specifies to use the latest schema. In an on-premises environment, this parameter will have no effect at all.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WarningSiteCount
Specifies the number of sites that can be created before a warning event is generated and the owner of the site
collection is notified.
The type must be a positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Attaches the content database to the specified SharePoint Web application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPContentDeploymentJob
In ths Article

Creates a content deployment job.

Syntax
New-SPContentDeploymentJob -Name <String> -SPContentDeploymentPath <SPContentDeploymentPathPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>]
[-EmailAddresses <String[]>] [-EmailNotifications <ContentDeploymentNotificationSettings>]
[-HostingSupportEnabled] [-IncrementalEnabled] [-Schedule <String>] [-ScheduleEnabled]
[-Scope <SPWebPipeBind[]>] [-SqlSnapshotSetting <ContentDeploymentSqlSnapshotSetting>] [-WhatIf]
[<CommonParameters>]

Description
The New -SPContentDeploymentJob cmdlet adds a new content deployment job to a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPContentDeploymentPath "Path 1" | New-SPContentDeploymentJob -Name "Deployment Job" -


SPContentDeploymentPath $_ -IncrementalEnabled:$true -ScheduleEnabled:$false

This example creates a new content deployment job called Deployment Job by using the deployment path Path 1.
The job is configured to be an incremental job with no schedule.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description for the content deployment job. The name can be a maximum of 4096 alphanumeric
characters.
The type must be a valid string.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailAddresses
Specifies the e-mail addresses of individuals who receive notification e-mails about this ContentDeploymentJob
object.
The type must be a list of valid e-mail addresses.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailNotifications
Specifies how e-mail notifications are sent about this ContentDeploymentJob object.
The type must be one of the following:
-Never specifies that e-mail notifications will not be sent when a job succeeds or fails.
SendEmailOnSuccess specifies that e-mail notifications will be sent if a content deployment job succeeds.
SendEmailOnFailure specifies that e-mail notifications will be sent if a content deployment job fails.
SendEmailOnAlways specifies that e-mail notifications will be sent when a job succeeds or fails.
Type: ContentDeploymentNotificationSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostingSupportEnabled
Enables special hosting- behavior. The default value is False.
Normally, a content deployment job is enabled or disabled by using the SharePoint Central Administration Web
site. However, in the case of hosting, the tenant administrator does not have permissions to access the Central
Administration page to configure jobs. Therefore, when the HostingSupportEnabled parameter is set to True, the
hoster creates the job, so that tenants can enable or disable their deployment jobs from their tenant administration
site.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncrementalEnabled
Specifies that only incremental changes are deployed to the destination site collection.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new content deployment job.
The type must be a valid name of a content deployment job; for example, DeployJob1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Schedule
Sets the schedule for the deployment job.
The type must be a valid SPSchedule object.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleEnabled
Specifies to enable the schedule for the deployment job. If the schedule is not enabled the job can be run only
manually.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Sets the scope of the deployment job. SPSites passed in must exist in the current path of the source site collection.
The default scope is the entire site collection. Valid values include an SPWeb object or an array of SPWeb objects.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint Foundation Web site (for example, MySPSite1); or an instance of a valid SPWeb object.

Type: SPWebPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SPContentDeploymentPath
Specifies the deployment path to associate with the new deployment job.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a content
deployment job (for example; DeployJob1); or an instance of a valid SPContentDeploymentJob object.

Type: SPContentDeploymentPathPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlSnapshotSetting
Creates a database snapshot of the source SharePoint Foundation content database to use for the export process.
The type must be one of the following values:
None
CreateNew
The CreateNew value requires thatSQL Server Enterprise Edition be installed.
Type: ContentDeploymentSqlSnapshotSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPContentDeploymentPath
In ths Article

Creates a new content deployment path.

Syntax
New-SPContentDeploymentPath -DestinationCentralAdministrationURL <Uri> -DestinationSPSite <String>
-DestinationSPWebApplication <Uri> -Name <String> -PathAccount <PSCredential> -SourceSPSite <SPSitePipeBind>
-SourceSPWebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Authentication <PathAuthenticationOption>] [-CompressionEnabled] [-Confirm]
[-DeploySecurityInformation <SPIncludeSecurity>] [-DeployUserNamesEnabled] [-Description <String>]
[-EventReceiversEnabled] [-KeepTemporaryFilesOptions <TemporaryFilesOption>] [-PathEnabled] [-WhatIf]
[<CommonParameters>]

Description
The New -SPContentDeploymentPath cmdlet adds a new content deployment path for a content deployment job.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE----------------------

C:\PS>$source = Get-SPSite "http://source/"

C:\PS>$credentials=Get-Credential

New-SPContentDeploymentPath -Name "Deployment Path" -SourceSPWebApplication $source.WebApplication -


SourceSPSite $source DestinationCentralAdministrationURL "http://destination:8080" -DestinationSPWebApplication
"http://destination" -DestinationSPSite "http://destination" -KeepTemporaryFilesOptions "Failure" -PathAccount
$credentials -PathEnabled:$true

This example creates a new deployment path called Deployment Path that connects a source at http://source to a
destination at http://destination. The path is enabled and configured to keep temporary files on job failure.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Authentication
Sets the Windows-based authentication type that the source front-end Web server uses to communicate with the
destination Web application.
The type must be one of the following values: WindowsAuth or BasicAuth.

Type: PathAuthenticationOption
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CompressionEnabled
Turns on compression during the export.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeploySecurityInformation
Specifies the user and group information to include during the export operation for this content deployment path.
The default value is All.
The type must be one of the following values: None, All, or WssOnly- Applies only SharePoint Foundation security
settings. Includes user memberships and role assignments such as default roles, for example, Web Designer or any
custom roles that extend from the default roles. The access control list (ACL ) for each object is migrated. No user
information defined in the DAP or LDAP servers is included.
Type: SPIncludeSecurity
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeployUserNamesEnabled
Specifies whether to include user names during a deployment.
Valid values are one of the following:
$True Retains the original author and editor information, time and date stamp, and user lookup value.
$False Retains the original date and time stamp, but replaces the author and editor data with the System Account,
and replaces the user lookup value with an empty string ("").

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Sets the description for the content deployment path. The description can contain a maximum of 4096
alphanumeric characters.
The type must be a valid string.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationCentralAdministrationURL
Specifies the SharePoint Central Administration URL for the destination farm.
The type must be a valid URL, in the form http://server_name.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationSPSite
Specifies the destination site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
http://server_name; or an instance of a valid SPSite object.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DestinationSPWebApplication
Specifies the destination Web application.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of Web application (for example, MyOfficeApp1); or an instance of a valid
SPWebApplication object.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventReceiversEnabled
Turns on event receivers during import.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeepTemporaryFilesOptions
Specifies that temporary files are kept after content deployment is finished.
The type must be one of the following values: Never, Always, or OnFailure.

Type: TemporaryFilesOption
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new content deployment path.
The type must be a valid name of a content deployment path; for example, DeployPath1.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PathAccount
Specifies the user ID that is an administrator on the Central Administration page on the destination farm.
The type must be a valid SharePoint user.

Type: PSCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PathEnabled
Enables the new content deployment path.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceSPSite
Specifies the source site collection for the deployment path. Must be a site collection in the source specified in the
SourceSPWebApplication parameter.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
http://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceSPWebApplication
Specifies the source Web application for the deployment path.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of SharePoint Web application (for example, MyOfficeApp1); or an instance of
a valid SPWebApplication object.
Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEduClass
In ths Article

Do not use

Syntax
New-SPEduClass [-AssignmentCollection <SPAssignmentCollection>] [-Building <String>] -ClassId <String>
-ClassName <String> [-DayOfWeek <String>] [-EndDate <DateTime>] [-EndTime <String>] [-Room <String>]
-Site <SPSitePipeBind> [-StartDate <DateTime>] [-StartTime <String>] [-Year <String>] [<CommonParameters>]

Description
Do not use

Examples
Example 1

Do not use

Parameters
-AssignmentCollection
Do not use

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Building
Do not use

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ClassId
Do not use

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ClassName
{Do not use

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DayOfWeek
Do not use

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-EndDate
Do not use

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-EndTime
Do not use

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Room
Do not use
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Site
Do not use

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-StartDate
Do not use

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-StartTime
Do not use

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Year
Do not use

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String
Microsoft.SharePoint.PowerShell.SPSitePipeBind System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089]] Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

New-SPEnterpriseSearchAdminComponent
In ths Article

Creates a new admin component for the given topology and search service instance.

Syntax
New-SPEnterpriseSearchAdminComponent -SearchServiceInstance <SearchServiceInstancePipeBind>
-SearchTopology <SearchTopologyPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Creates a new search admin component and adds it to an inactive search topology in a specific search service
instance. The change is effectuated when the search topology is enabled.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$si = Get-SPEnterpriseSearchServiceInstance
$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa
New-SPEnterpriseSearchAdminComponent -SearchTopology $topology -SearchServiceInstance $si -SearchApplication
$ssa

This example adds a new Search Administration Component to the inactive topology for the existing Search
Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the search topology.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchServiceInstance
Specifies the search service instance that will host the new admin component.

Type: SearchServiceInstancePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchTopology
Specifies the search topology where the new admin component should be added.

Type: SearchTopologyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchAnalyticsProcessingComponent
In ths Article

Creates a new analytics processing component for the given topology and search service instance.

Syntax
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchServiceInstance <SearchServiceInstancePipeBind>
-SearchTopology <SearchTopologyPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Creates a new analytics processing component and adds it to an inactive search topology in a specific search
service instance. The change is effectuated when the search topology is enabled.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$si = Get-SPEnterpriseSearchServiceInstance
$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa
New-SPEnterpriseSearchAnalyticsProcessingComponent -SearchTopology $topology -SearchServiceInstance $si -
SearchApplication $ssa

This example adds a new Search Analytics Processing Component to the inactive topology for the existing Search
Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the search topology.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchServiceInstance
Specifies the search service instance that will host the new analytics processing component.

Type: SearchServiceInstancePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchTopology
Specifies the search topology where the new analytics processing component should be added.

Type: SearchTopologyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchContentEnrichmentConfiguration
In ths Article

Creates a new ContentEnrichmentConfiguration object.

Syntax
New-SPEnterpriseSearchContentEnrichmentConfiguration [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
This cmdlet creates a new ContentEnrichmentConfiguration object that the user can change.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$config = New-SPEnterpriseSearchContentEnrichmentConfiguration

This example creates a new ContentEnrichmentConfiguration object.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Related Links
Get-SPEnterpriseSearchContentEnrichmentConfiguration
Set-SPEnterpriseSearchContentEnrichmentConfiguration
Remove-SPEnterpriseSearchContentEnrichmentConfiguration
minutes to read • Edit Online

New-SPEnterpriseSearchContentProcessingComponent
In ths Article

Creates a new content processing component for the given topology and search service instance.

Syntax
New-SPEnterpriseSearchContentProcessingComponent -SearchServiceInstance <SearchServiceInstancePipeBind>
-SearchTopology <SearchTopologyPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Creates a new content processing component and adds it to an inactive search topology in a specific search service
instance. The change is effectuated when the search topology is enabled.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$si = Get-SPEnterpriseSearchServiceInstance
$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa
New-SPEnterpriseSearchContentProcessingComponent -SearchTopology $topology -SearchServiceInstance $si -
SearchApplication $ssa

This example adds a new Search Content Processing Component to the inactive topology for the existing Search
Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the search topology.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchServiceInstance
Specifies the search service instance that will host the new content processing component.

Type: SearchServiceInstancePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchTopology
Specifies the search topology where the new content processing component should be added.

Type: SearchTopologyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchCrawlComponent
In ths Article

Creates a new crawl component for the given topology and search service instance.

Syntax
New-SPEnterpriseSearchCrawlComponent -SearchServiceInstance <SearchServiceInstancePipeBind>
-SearchTopology <SearchTopologyPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Creates a new crawl component and adds it to an inactive search topology in a specific search service instance. The
change is effectuated when the search topology is enabled.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$si = Get-SPEnterpriseSearchServiceInstance
$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa
New-SPEnterpriseSearchCrawlComponent -SearchTopology $topology -SearchServiceInstance $si -SearchApplication
$ssa

This example adds a new Search Crawl Component to the inactive topology for the existing Search Service
Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the search topology.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchServiceInstance
Specifies the search service instance that will host the new crawl component.

Type: SearchServiceInstancePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchTopology
Specifies the search topology where the new crawl component should be added.

Type: SearchTopologyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchCrawlContentSource
In ths Article

Creates a content source for a Search service application.

Syntax
New-SPEnterpriseSearchCrawlContentSource [-AssignmentCollection <SPAssignmentCollection>]
[-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm]
[-CrawlPriority <CrawlPriority>] [-CustomProtocol <String>] [-LOBSystemSet <String[]>]
[-MaxPageEnumerationDepth <Int32>] [-MaxSiteEnumerationDepth <Int32>] -Name <String>
-SearchApplication <SearchServiceApplicationPipeBind> [-SharePointCrawlBehavior <SharePointCrawlBehavior>]
[-StartAddresses <String>] [-Tag <String>] -Type <ContentSourceType> [-WhatIf] [<CommonParameters>]

Description
The New -SPEnterpriseSearchCrawlContentSource cmdlet creates a new content source.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchCrawlContentSource -SearchApplication $ssa -Type File -name FileServer -StartAddresses
file://someserver/public

This example creates a new content source of type file to crawl a file system.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BDCApplicationProxyGroup
Specifies the proxy to use for a business type content source. This proxy group must contain a default Business
Data Connectivity Metadata Store proxy.

Type: SPServiceApplicationProxyGroupPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlPriority
Specifies the priority of this content source.
The value must be one of the following integers: 1= Normal, 2=High.

Type: CrawlPriority
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomProtocol
Specifies the custom protocol, handled by the custom connector, to use for this content source.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LOBSystemSet
Specifies a comma-separated list of Business Data Connectivity metadata store system names and system instance
names for a business type content source.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxPageEnumerationDepth
Specifies, for a web or custom type content source, the number of page hops that the crawler can make from the
start address to a content item.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxSiteEnumerationDepth
Specifies, for a web or custom type content source, the number of site hops that the crawler can take from the start
address to a content item.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the content source to create.
The type must be a valid name of a ContentSource object (for example, ContentSource1).

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the content source.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid Search service
application name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.
Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SharePointCrawlBehavior
Specifies crawl behavior for a sharepoint type content source. The behavior can be either:
CrawlSites to crawl only particular site collections.
CrawlVirtualServers to crawl the entire server and all site collections on the server.

Type: SharePointCrawlBehavior
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartAddresses
Specifies the comma-separated list of URLs at which to start a crawl for this content source.
The type must be a valid URL, in the form https://server_name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Specifies the URL for the page to modify the settings for a custom content source. The string that specifies the URL
can contain a maximum of 1,024 characters.
The type must be a valid URL, in the form https://server_name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the name of the content source type. The value Business is for the Business Data Connectivity metadata
store. The value Exchange is for Microsoft Exchange public folders. The value Custom is for a custom content
source type.
The type must be the valid name of a content source type; for example, custom.
Type: ContentSourceType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchCrawlCustomConnector
In ths Article

Registers a protocol for custom crawling.

Syntax
New-SPEnterpriseSearchCrawlCustomConnector -ModelFilePath <String> -Protocol <String>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Name <String>] [-WhatIf] [<CommonParameters>]

Description
The New -SPEnterpriseSearchCrawlCustomConnector cmdlet registers, for a search system, the protocol that is
used to crawl the custom repository.
If the Name parameter is not provided, in the administration application user interface (UI) the name protocol
identifies the protocol specified.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchCrawlCustomConnector -SearchApplication $ssa -ModelFilePath \\models\myFileTypeModel.mft
-Protocol "mftml://"

This example creates a custom connector for a file type whose model is located at \\models\myFileTypeModel.mft
and has the protocol name mftml://.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ModelFilePath
Specifies the path to a model file.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the display name of the custom connector that appears on the SharePoint Central Administration Web
site.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Protocol
Specifies the string version of the protocol; for example, dctm://.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that is associated with the protocol.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchCrawlDatabase
In ths Article

Creates a crawl database which can be added to a search service application.

Syntax
New-SPEnterpriseSearchCrawlDatabase -DatabaseName <String>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DatabasePassword <SecureString>] [-DatabaseServer <String>] [-DatabaseUsername <String>]
[-FailoverDatabaseServer <String>] [-WhatIf] [<CommonParameters>]

Description
The New -SPEnterpriseSearchCrawlDatabase cmdlet is used during initial configuration and farm scale-out to
create a new crawl database, which can be added to a search service application. A crawl database stores crawl
history for a search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchCrawlDatabase -SearchApplication $ssa -DatabaseName newCrawlDB

This example creates a new crawl database named newCrawlDB for the mySearchServiceApp search service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database to create for the crawl database.
The type must be a valid name of a SQL Server database; for example, CrawlStoreDB1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the name of the password for the Microsoft SQL Server database server.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.
The type must be a valid SQL Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the account name specified in the Database Server parameter.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Server that is used for failover when SQL Server mirroring is used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl database.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchCrawlExtension
In ths Article

Adds an extension rule to a Search service application.

Syntax
New-SPEnterpriseSearchCrawlExtension [[-Name] <String>] -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The New -SPEnterpriseSearchCrawlExtension cmdlet adds a file name extension to the list of file types that you
want to include in the index. After a new IFilter is registered, run this cmdlet so that the new file type will be
crawled. If a file type is added without registering an associated IFilter, only the file properties will be crawled and
included in the index. After you run this cmdlet, you must run a full crawl of all content sources that might contain
this file type to guarantee that files of this type are in the index.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchCrawlExtension -Name "pdf" -SearchApplication $ssa

This example adds the PDF file type to the list of file name extensions to include in the index.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the new file name extension.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the extension collection.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid search application
name (for example, SearchApp1), or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchCrawlMapping
In ths Article

Creates a crawl mapping rule for a shared search application.

Syntax
New-SPEnterpriseSearchCrawlMapping [-Url] <String> -SearchApplication <SearchServiceApplicationPipeBind>
-Target <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The New -SPEnterpriseSearchCrawlMapping cmdlet is run when the search functionality is initially configured, and
when access is changed through a different mechanism to create the crawl mapping rule; for example, when a rule
is changed to use file:\\ rather than http://.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchCrawlMapping -SearchApplication $ssa -Url "file://location1" -Target "https://location2"

This example will change the query results link from the file share where the item was crawled to the Web site
location from which the item can be browsed.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl mapping collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Target
Specifies the target URI for the crawl mapping to get.
The type must be a valid URI; for example, file:\\ server_name\sitedocs.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the source URI for the crawl mapping.
The type must be a valid URL, in the form https://server_name.
Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchCrawlRule
In ths Article

Creates a new crawl rule.

Syntax
New-SPEnterpriseSearchCrawlRule [-AccountName <String>] [-AccountPassword <SecureString>]
[-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationType <CrawlRuleAuthenticationType>]
[-Confirm] [-ContentClass <String>] [-CrawlAsHttp <Boolean>] [-FollowComplexUrls <Boolean>]
[-IsAdvancedRegularExpression <Boolean>] -Path <String> [-PluggableSecurityTimmerId <Int32>]
[-Priority <Int32>] -SearchApplication <SearchServiceApplicationPipeBind> [-SuppressIndexing <Boolean>]
-Type <CrawlRuleType> [-WhatIf] [<CommonParameters>]

Description
The New-SPEnterpriseSearchCrawlRule cmdlet creates special rules for crawling items that are contained in the
specified path.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchCrawlRule -SearchApplication $ssa -Path https://ExampleSharePointSite -CrawlAsHttp 1 -
Type InclusionRule

This example creates an inclusion type crawl rule for the site at https://ExampleSharePointSite. The rule specifies
that the site be crawled as an HTTP site.

Parameters
-AccountName
Specifies the account to use when applying the crawl rule.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AccountPassword
Specifies the account to use when applying the crawl rule.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationType
Specifies one of the following authentication types to access matching URLs:
BasicAccountRuleAccess -- Specifies the account name and password that are required for this authentication type.
CertificateRuleAccess -- Specifies the valid client certificate name that is required for this authentication type.
NTLMAccountRuleAccess -- Specifies the account name for integrated authentication.
FormRuleAccess -- Specifies a valid URL for HTTP POST or HTTP GET, public and private parameters, and a list of
error pages that are used by this authentication type.
CookieRuleAccess -- Specifies private parameters and a list of error pages that are used by this authentication type.
AnonymousAccess-- Specifies that the matching URLs have to be accessed anonymously.

Type: CrawlRuleAuthenticationType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentClass
Specifies the string that is sent to the protocol handler for any content that matches the crawl rule.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlAsHttp
Specifies whether the crawler should crawl content from a hierarchical content source as HTTP content.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FollowComplexUrls
Specifies whether the index engine should crawl content with URLs that contain a question mark (?).

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsAdvancedRegularExpression
Specifies whether the rule has a full regular expression syntax.
The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies a unique path to which a crawl rule applies.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PluggableSecurityTimmerId
{{Fill PluggableSecurityTimmerId Description}}

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Priority
Defines where in the list of crawl rules this crawl rule should be applied.
The priority value cannot be less than 0 or greater than or equal to the number of crawl rules for the search
application.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the Search application that is associated with the crawl rule to be modified.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SuppressIndexing
Specifies whether the crawler should exclude the content of items that this rule applies to from the content index.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Type
Specifies the type of crawl rule. A value of zero (0) includes the rule, a value of 1 excludes the rule.

Type: CrawlRuleType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchFileFormat
In ths Article

Adds a new file format to the parsing system.

Syntax
New-SPEnterpriseSearchFileFormat [-FormatId] <String> [-FormatName] <String> [-MimeType] <String>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The New-SPEnterpriseSearchFileFormat cmdlet adds a new file format and a corresponding file name extension to
the search parsing system. This binds the file format to a filter-based format handler in the search parsing system.
Thus, the search parsing system can only parse the new file format if the user has installed a corresponding filter-
based format handler, an IFilter, for the new file format. If the installed IFilter registers more than one file name
extension, the user must use the New-SPEnterpriseSearchFileFormat cmdlet to add a new file format to the parsing
system for each of these file name extensions. The user must also ensure that the file name extension of the new
file format is a member of the file-type inclusion list. The file-type inclusion list specifies which files that are
crawled, based on their file name extensions. The system will only consider the new file format after a restart of the
content processing components.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchFileFormat -SearchApplication $ssa -FormatId foo -FormatName FooApp -MimeType "text/foo"

This example uses the New-SPEnterpriseSearchFileFormat cmdlet to add a new file format FooApp with the
belonging file name extension foo to the parsing system in the search service application referenced by $ssa

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FormatId
Specifies the file name extension of the format to add.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FormatName
Specifies the name of the format to add.
Usually this is the name of the application handling the format.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MimeType
Specifies the mime type of the format to add.

Type: String
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SearchApplication
Specifies the search application for which to add the new file format. The type must be a valid GUID, in the form
12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an
instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchFileFormat
Set-SPEnterpriseSearchFileFormatState
Remove-SPEnterpriseSearchFileFormat
minutes to read • Edit Online

New-SPEnterpriseSearchIndexComponent
In ths Article

Creates a new index component for the given topology and search service instance.

Syntax
New-SPEnterpriseSearchIndexComponent -SearchServiceInstance <SearchServiceInstancePipeBind>
-SearchTopology <SearchTopologyPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-IndexPartition <UInt32>] [-RootDirectory <String>] [-SearchApplication <SearchServiceApplicationPipeBind>]
[-WhatIf] [<CommonParameters>]

Description
Creates a new index component and adds it to an inactive search topology in a specific search service instance. The
change is effectuated when the search topology is enabled.

Examples
------------------EXAMPLE-----------------

$si = Get-SPEnterpriseSearchServiceInstance
$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa
New-SPEnterpriseSearchIndexComponent -SearchTopology $topology -SearchServiceInstance $si -SearchApplication
$ssa -IndexPartition 1 -RootDirectory E:\Index

This example adds a new Search Index Component to the inactive topology for the existing Search Service
Application. The directory of the Index Component is set to E:\Index with a Partition number of 1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IndexPartition
Specifies the index partition number to assign to the new search index component.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RootDirectory
Specifies the root directory that will hold the index location for the new search index component. This is needed if
you want to isolate the index on dedicated discs in order to avoid I/O contention with other parts of the system,
other system sharing the same disks, or because you do not want to risk the index filling up the OS disk (generally
C: )
If you specify the root directory to be the root of a volume, e.g. E:, the index will not be cleaned up if you delete the
SSA. You will then have to delete the SSA manually.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the search topology.
Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchServiceInstance
Specifies the search service instance that will host the new index component.

Type: SearchServiceInstancePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchTopology
Specifies the search topology where the new index component should be added.

Type: SearchTopologyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchLanguageResourcePhrase
In ths Article

Adds a language resource phrase to a shared search application.

Syntax
New-SPEnterpriseSearchLanguageResourcePhrase [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-Language <String> [-Mapping <String>] -Name <String> -Owner <SearchObjectOwner>
-SearchApplication <SearchServiceApplicationPipeBind> [-SourceId <Guid>] -Type <LanguageResourceType>
[-WhatIf] [<CommonParameters>]

Description
The New-SPEnterpriseSearchLanguageResourcePhrase cmdlet adds a query keyword phrase to a shared search
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $ssa -Language en-us -Type
QuerySuggestionBlockList -Name secret

This example adds a new entry to the QuerySuggestionBlockList for the en-us language.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Language
Adds the phrase for the specified source language.
The type must be a valid name of a language; for example, en-us or ja-jp.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mapping
Allows a term or phrase to be mapped to another term or phrase. For example, the nickname "John" could be
mapped to "Jonathan".
This parameter only applies to nicknames and substitutions.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the term to add to the list specified in the Type parameter.
The type must be a valid name of a language resource phrase (for example, LanguageResourcePhrase1).
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding LanguageResourcePhrase is
created.
The owner must be one of the following valid levels:
Search Service Application
Site Subscription
Site Collection
Site

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the language resources.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SourceId
Identifies the search result source for which the LanguageResourcePhrase applies to.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the type of the new phrase.
The type must be one of the following valid types of phrases:
QuerySuggestionBlockList
QuerySuggestionAlwaysSuggest
Nickname
QuerySuggestionSubstitution

Type: LanguageResourceType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchLinksDatabase
In ths Article

Creates a new links database for a search service application.

Syntax
New-SPEnterpriseSearchLinksDatabase -DatabaseName <String>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DatabasePassword <SecureString>] [-DatabaseServer <String>] [-DatabaseUsername <String>]
[-FailoverDatabaseServer <String>] [-WhatIf] [<CommonParameters>]

Description
Use the New-SPEnterpriseSearchLinksDatabase cmdlet during initial configuration and farm scale out to create a new
links database, which can be added to a search service application. A links database stores query logging and
analytics information.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchLinksDatabase -DatabaseName LinksDB_1 -SearchApplication $ssa

This example adds a new links database LinksDB_1 to the search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the links database to obtain. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-
567890bcdefgh; a valid name of a LinksStore object, in the form LinksStore1; or an instance of a valid LinksStore
object.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password of the account to connect to the database.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the server to use for the host SQL database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the name of the account to connect to the database.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the server to use for failover in the case of SQL Server mirroring.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the links database. The type must be a valid GUID, in the form
12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an
instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPEnterpriseSearchLinksDatabase
Get-SPEnterpriseSearchLinksDatabase
Remove-SPEnterpriseSearchLinksDatabase
Repartition-SPEnterpriseSearchLinksDatabases
minutes to read • Edit Online

New-SPEnterpriseSearchMetadataCategory
In ths Article

Adds a crawled property category to a search service application.

Syntax
New-SPEnterpriseSearchMetadataCategory [-AssignmentCollection <SPAssignmentCollection>]
[-AutoCreateNewManagedProperties <Boolean>] [-Confirm] [-DiscoverNewProperties <Boolean>]
[-MapToContents <Boolean>] -Name <String> [-PropSet <Guid>]
-SearchApplication <SearchServiceApplicationPipeBind> [-WhatIf] [<CommonParameters>]

Description
This cmdlet creates the new crawled property category. SPEnterpriseSearchMetadataCategory represents a
category in the enterprise search metadata property schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$guid = [System.Guid]::NewGuid()
New-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa -Name MyCategory -DiscoverNewProperties $true -
PropSet $guid

This example adds a new metadata category named MyCategory to the default search service application. The
DiscoverNewProperties parameter is set to true. Therefore, new crawled properties will be added to the
MyCategory metadata category and the unique category identifier is set with the PropSet parameter.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AutoCreateNewManagedProperties
Specifies that when a new crawled property in this category is found, a corresponding managed property is
created and mapped to this new crawled property.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DiscoverNewProperties
Specifies that if there are unknown properties in this category, these new properties are discovered during a crawl.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapToContents
Specifies that all crawled properties of type string are mapped to corresponding managed properties of this
category.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the identity of the new metadata category.
The type must be a valid name of a metadata category, for example, MetadataCategory1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropSet
Creates a new metadata category with the specified property set.
Note that the specified property set is the identifier of the category. Therefore, two categories cannot share a
property set.
The type must be a valid GUID that specifies the property set, in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the enterprise search metadata categories.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchMetadataCrawledProperty
In ths Article

Adds a crawled property.

Syntax
New-SPEnterpriseSearchMetadataCrawledProperty [-AssignmentCollection <SPAssignmentCollection>]
-Category <CategoryPipeBind> [-Confirm] [-IsMappedToContents <Boolean>] -IsNameEnum <Boolean> -Name <String>
-PropSet <Guid> -SearchApplication <SearchServiceApplicationPipeBind> [-SiteCollection <Guid>]
[-Tenant <Guid>] -VariantType <Int32> [-WhatIf] [<CommonParameters>]

Description
This cmdlet is used when the search functionality is configured for the first time and to add new crawled properties
after the first configuration. SPEnterpriseSearchMetadataCrawledProperty represents a crawled property in the
enterprise search metadata property schema. Or, crawled properties are automatically created during regular
crawls (see SPEnterpriseSearchMetadataCategory).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa -Identity People
$crawlprop = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Category $cat -Limit 1
New-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name "MyCrawlProp" -PropSet
$crawlprop.PropSet -Category $crawlprop.CategoryName -IsNameEnum $false -VariantType $crawlprop.VariantType -
IsMappedToContents $false

This example maps the new crawled property MyCrawlProp to the People metadata category for the default search
service application. The mapping uses the constraints from the existing People category.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Category
Specifies to which metadata category the crawled property should be added
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid name of a
metadata category, for example, MetadataCategory1, or an instance of a valid Category object.

Type: CategoryPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsMappedToContents
Specifies that the crawled property should be mapped to managed properties. Specify true to map a crawled
property to a managed property.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsNameEnum
Specifies whether the crawled property name is of type integer. Specified by true or false.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Name
Specifies the identity of the new crawled property.
The type must be a valid crawled property name, for example "urn:schemas-microsoft-
com:sharepoint:portal:profile:UserName"

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropSet
Specifies the property set that belongs to an existing category.
A valid GUID that specifies the property set, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawled property.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteCollection
Specifies that the crawled properties returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
Specifies that the crawled properties returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VariantType
Adds the crawled property as the specified variant type. For more information about valid values for this property,
see VARIANT Type Constants (https://go.microsoft.com/fwlink/p/?LinkId=143322&clcid=0x409)
(https://go.microsoft.com/fwlink/p/?LinkId=143322&clcid=0x409).

The type must be an integer that specifies the variant data type of the property set.

NOTE
This parameter is required although the value is not used in SharePoint Server 2013 through SharePoint Server 2019. You will
see an Obsolete warning when running the cmdlet. You may ignore this message.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchMetadataManagedProperty
In ths Article

Adds a managed property to a shared search application.

Syntax
New-SPEnterpriseSearchMetadataManagedProperty [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DefaultForQueryIndependentRank <UInt32>] [-Description <String>] [-EnabledForQueryIndependentRank <Boolean>]
[-EnabledForScoping <Boolean>] [-FullTextQueriable <Boolean>] [-IncludeInAlertSignature <Boolean>]
[-IncludeInMd5 <Boolean>] -Name <String> [-NameNormalized <Boolean>] [-NoWordBreaker <Boolean>]
[-Queryable <Boolean>] [-RemoveDuplicates <Boolean>] [-RespectPriority <Boolean>] [-Retrievable <Boolean>]
[-SafeForAnonymous <Boolean>] -SearchApplication <SearchServiceApplicationPipeBind> [-SiteCollection <Guid>]
[-Tenant <Guid>] -Type <Int32> [-UserFlags <Int16>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet creates a new managed property. SPEnterpriseSearchMetadataManagedProperty represents a
managed property in the enterprise search metadata property schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchMetadataManagedProperty -Name AboutMeUpdate -SearchApplication $ssa -Type 4

This example creates a new managed property named AboutMeUpdate in the default search service application
and sets it type to DateTime.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultForQueryIndependentRank
Specifies that the managed property is mandatory when it is used in query-independent rank (relevance).

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Adds a description to the metadata managed property.
The type must be a valid string.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForQueryIndependentRank
Specifies that the managed property is mandatory when it is used in the custom ranking model for the query-
independent work of ranking.
The type must be one of the following query-independent ranking features in the custom model XML:
queryIndependentFeature
categoryFeature
languageFeature
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForScoping
Specifies that the managed property can be used in a scope definition.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FullTextQueriable
Specifies that the managed property can be used in enterprise search SQL queries.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeInAlertSignature
Specifies whether this managed property should be included in the alert signature.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeInMd5
Specifies that the managed property is included in the hash used by the crawler to determine whether a document
has changed.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new managed property.
The type must be a valid name of a managed property, for example, ManagedProperty1.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NameNormalized
Specifies if the values of the managed property should be normalized, that is, enable to return results independent
of letter casing and diacritics used in the query. If value is set to true, the values are normalized.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoWordBreaker
Specifies that the values for this managed property are processed by a word breaker.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Queryable
Specifies whether this managed property is queryable or not.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveDuplicates
Specifies that duplicate values for the managed property are removed.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RespectPriority
Specifies that when a mapped crawled property contains multiple values and RespectPriority is set to true, only the
first mapped crawled property is copied. Otherwise, all mapped crawled properties that have a value are copied.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Retrievable
Specifies whether this managed property is retrievable or not.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SafeForAnonymous
Specifies whether it is acceptable to display the contents of the property in search results for anonymous searches.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the managed property collection.
The type must be a valid search application name (for example, SearchApp1), or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteCollection
Specifies that the managed properties returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Tenant
Specifies that the managed properties returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the data type of the new managed property.
The type must be one of the following data types:
1 = Text
2 = Integer
3 = Decimal
4 = DateTime
5 = YesNo
6 = Binary
7 = Double

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserFlags
Reserved for future use.

Type: Int16
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchMetadataMapping
In ths Article

Adds a managed property mapping.

Syntax
New-SPEnterpriseSearchMetadataMapping -CrawledProperty <CrawledPropertyPipeBind>
-ManagedProperty <ManagedPropertyPipeBind> -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-SiteCollection <Guid>] [-Tenant <Guid>]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet maps a crawled property to a managed property. SPEnterpriseSearchMetadataMapping represents a
snapshot of a mapping between a managed property and one or more crawled properties in the enterprise search
metadata property schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity UserName
$cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa -Identity People
$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Category $cat -Limit 1
$ncp = New-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name "MyCrawlProp" -PropSet
$cp.PropSet -Category $cp.CategoryName -IsNameEnum $false -VariantType $cp.VariantType -IsMappedToContents
$true
New-SPEnterpriseSearchMetadataMapping -SearchApplication $ssa -ManagedProperty $mp -CrawledProperty $ncp

This example maps the created crawled property MyCrawlProp to the managed property UserName for the
default search service application.

![NOTE ] The VarientType parameter is marked as obsolete but is still required when executing the
New-SPEnterpriseSearchMetadataCrawledProperty cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawledProperty
Specifies the crawled property to map.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid URL in the form
https://server_name, or an instance of a valid CrawledProperty object.

Type: CrawledPropertyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedProperty
Specifies the managed property to which the crawled property should be mapped.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid name of a
managed property, for example, ManagedProperty1, or an instance of a valid ManagedProperty object.

Type: ManagedPropertyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the metadata mapping.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteCollection
Specifies that the metadata mapping returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
Specifies that the metadata mapping returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchQueryAuthority
In ths Article

Adds an authoritative page to a shared search application.

Syntax
New-SPEnterpriseSearchQueryAuthority [-Url] <String> -Level <Single> -Owner <SearchObjectOwner>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The New-SPEnterpriseSearchQueryAuthority cmdlet adds an authoritative page to adjust query rank.
SPEnterpriseSearchQueryAuthority represents authoritative sites that rank higher in relevance than demoted sites,
which are de-emphasized in relevance.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchQueryAuthority -SearchApplication $ssa -Url https://contoso.com -Level 1.5

This example designates the URL https://contoso.com as an authoritative page with a relative importance of 1.5.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Level
Specifies the level of the new authoritative page. Authoritative pagesare expert pages that link to the most relevant
information. A search service application can have multiple authoritative pages. The Level property is used to
specify the relative relevance adjustment of the authoritative pages. This parameter may receive a floating point
value of 0.0 - 2.0, where 0.0 has the most positive impact on relevance.

Type: Single
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding Query Authority is created.
The owner must be one of the following valid levels:- Search Service Application- Site Subscription

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the authority page collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.
Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the query authority page to create.
The type must be a valid URL, in the form https://server_name.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchQueryDemoted
In ths Article

Adds a demoted site rule to a shared search application.

Syntax
New-SPEnterpriseSearchQueryDemoted [-Url] <String> -Owner <SearchObjectOwner>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The New-SPEnterpriseSearchQueryDemoted cmdlet adjusts query rank by adding a demoted site rule to the shared
search application. Query demoted sites are de-emphasized in relevance.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchQueryDemoted -Url https://examplesite -SearchApplication $ssa

This example adds a demoted site rule for the URL https://examplesite.com to a search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding Demoted object is created. The
owner must be one of the following valid levels:- Search Service Application- Site Subscription

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the demoted site rule collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the identity of the new demoted site rule.
The type must be a valid URL, in the form https://server_name.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchQueryKeyword
In ths Article

Adds a keyword term to a shared search application.

Syntax
New-SPEnterpriseSearchQueryKeyword [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Contact <String>] [-Definition <String>] [-EndDate <DateTime>] [-ReviewDate <DateTime>]
-Site <SPSitePipeBind> [-StartDate <DateTime>] -Term <String> [-WhatIf] [<CommonParameters>]

Description
The New-SPEnterpriseSearchQueryKeyword cmdlet changes query results by creating a new keyword. A query
keyword is a query component of a query topology. SPEnterpriseSearchQueryKeyword represents relevance
setting through keywords.
You can use this cmdlet for keywords in site collections that are in SharePoint Server. You cannot use this cmdlet
after a site collection is upgraded to SharePoint Server because keywords and Best Bets are automatically migrated
to query rules.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

New-SPEnterpriseSearchQueryKeyword -Term Tangible -Site https://myserver/sites/team

This example creates a new query keyword for the site https://myserver/sites/team with the term Tangible.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Contact
Specifies the user name associated with the new keyword.
The type must be a valid user name; for example, KeywordUser1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Definition
Specifies the definition of the new keyword term.
The type must be a valid string; for example, a keyword term definition.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
Specifies the expiration date of the keyword term. The default value is MaxDate.
The type must be a valid DateTime type, in the form 2010,12,05.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ReviewDate
Specifies the review date of the keyword term. The default value is MaxDate.
The type must be a valid date, in the form 2010,12,05.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Associates the new keyword term to the specified results URL.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
Specifies the activation date for the keyword term. The default value is the current date.
The type must be a valid date, in the form 2010,12,05.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Term
Specifies the keyword term to create.
The type must be a valid string that contains a keyword term (for example, KeywordTerm1).

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchQueryProcessingComponent
In ths Article

Creates a new query processing component for the given topology and search service instance.

Syntax
New-SPEnterpriseSearchQueryProcessingComponent -SearchServiceInstance <SearchServiceInstancePipeBind>
-SearchTopology <SearchTopologyPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Creates a new query processing component and adds it to an inactive search topology in a specific search service
instance. The change is effectuated when the search topology is enabled.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$si = Get-SPEnterpriseSearchServiceInstance
$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa
New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $topology -SearchServiceInstance $si -
SearchApplication $ssa

This example adds a new Search Query Processing Component to the inactive topology for the existing Search
Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the search topology.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchServiceInstance
Specifies the search service instance that will host the new query processing component.

Type: SearchServiceInstancePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchTopology
Specifies the search topology where the new query processing component should be added.

Type: SearchTopologyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchQueryScope
In ths Article

Adds a query results scope to a shared search application.

Syntax
New-SPEnterpriseSearchQueryScope [-AlternateResultsPage <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-CompilationType <Int32>] [-Confirm] -Description <String>
-DisplayInAdminUI <Boolean> [-ExtendedSearchFilter <String>] -Name <String> [-OwningSiteUrl <Uri>]
-SearchApplication <SearchServiceApplicationPipeBind> [-WhatIf] [<CommonParameters>]

Description
After you upgrade a Search service application to SharePoint Server, you can view shared scopes, but you cannot
create, update, or delete them. Therefore, you cannot use this cmdlet for shared scopes after upgrade. However,
you can convert shared scopes to result sources, which serve a similar purpose. Similarly, after you upgrade a
SharePoint Server site collection to SharePoint Server mode, you can view local scopes, but you cannot create,
update, or delete them. Therefore, you cannot use this cmdlet for local scopes after you upgrade a site collection.
However, you can convert local scopes to result sources, which serve a similar purpose.
Use the New-SPEnterpriseSearchQueryScope cmdlet to create a new shared scope. SPEnterpriseSearchQueryScope
represents a query results scope used by all shared search applications on the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchQueryScope -Name MustCrawl -Description "Sites we must crawl" -DisplayInAdminUI $true -
SearchApplication $ssa

This example adds a scope named MustCrawl that will be displayed in the administration UI to the search service
application named MySSA.

Parameters
-AlternateResultsPage
Specifies the location to display results for the new query scope.
The type must be a valid URL, in the form https://server_name.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompilationType
Specifies the compilation type of the new scope. The value 0 specifies the conditionally compiled scope type and
the value 1 specifies the always compiled scope type.
The type must be either of the following: 0 or 1.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Adds a description of the new query scope.
The type must be a valid string; for example, a description of a query scope.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayInAdminUI
Specifies that the new scope is displayed in the administration application user interface (UI). The default setting is
to hide the new scope in the administration application UI.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExtendedSearchFilter
{{Fill ExtendedSearchFilter Description}}

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the identity of the scope to create.
The type must be a valid name of a scope (for example, Scope1).

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OwningSiteUrl
Specifies the SharePoint site that is associated with the new scope.
The type must be a valid SharePoint site URL, in the form https://server_name.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the query scope collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchQueryScopeRule
In ths Article

Adds a shared scope rule to a query scope.

Syntax
New-SPEnterpriseSearchQueryScopeRule -RuleType <String> -Scope <ScopePipeBind> -Url <Uri>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-FilterBehavior <String>]
[-ManagedProperty <ManagedPropertyPipeBind>] [-MatchingString <String>] [-PropertyValue <String>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-UrlScopeRuleType <String>] [-WhatIf]
[<CommonParameters>]

Description
After you upgrade a Search service application to SharePoint Server, you can view shared scopes, but you cannot
create, update, or delete them. Therefore, you cannot use this cmdlet for shared scopes after upgrade. However,
you can convert shared scopes to result sources, which serve a similar purpose. Similarly, after you upgrade a
SharePoint Server site collection to SharePoint Server mode, you can view local scopes, but you cannot create,
update, or delete them. Therefore, you cannot use this cmdlet for local scopes after you upgrade a site collection.
However, you can convert local scopes to result sources, which serve a similar purpose.
The New-SPEnterpriseSearchQueryScopeRule cmdlet creates a new shared scope rule.
SPEnterpriseSearchQueryScopeRule represents a query results scope rule that can be applied to a scope.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$ssa = Get-SPEnterpriseSearchServiceApplication
C:\PS>$scope = Get-SPEnterpriseSearchQueryScope -Identity MustCrawl -SearchApplication $ssa
New-SPEnterpriseSearchQueryScopeRule -Scope $scope -RuleType AllContent -Url https://criticalSite

This example creates a new scope rule of type AllContent for the URL https://criticalSite.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilterBehavior
Specifies the type of scope rule to create for the query scope. The default value is Include.
The type must be one of the following values: Exclude, Include, or Require.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedProperty
Specifies the managed property to use for the PropertyQuery scope rule.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
managed property (for example, ManagedProperty1); or an instance of a valid ManagedProperty object.

Type: ManagedPropertyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchingString
Specifies the string to use when matching the URL rule type.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertyValue
Specifies the property value to use when matching the PropertyQuery rule type.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleType
Specifies the type of scope rule to create.
The type must be one of the following values: AllContent, Url, or PropertyQuery.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Applies the query scope rule to the specified scope.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a scope
(for example, Scope1); or an instance of a valid Scope object.

Type: ScopePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the query scope rule collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.
Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the results URL that is associated with the query scope rule.
The type must be a valid URL, in the form https://server_name.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UrlScopeRuleType
Specifies the value to use when matching the URL rule type.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchRankingModel
In ths Article

Adds a ranking model to a shared search application.

Syntax
New-SPEnterpriseSearchRankingModel -Owner <SearchObjectOwner> -RankingModelXML <String>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet adds a new ranking model to the assignment collection. The name, description and identifier (ID ) for
the new ranking model are contained in the .xml file specified in RankingModelXML.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$owner = Get-SPEnterpriseSearchOwner -Level SPWeb -SPWeb https://sharepoint/team
[String]$rankmodel = Get-Content .\rankModel.xml
New-SPEnterpriseSearchRankingModel -SearchApplication $ssa -Owner $owner -RankingModelXML $rankmodel

This example creates a ranking model for the site https://sharepoint/team for the search service application Search
Service Application from the file rankModel.xml which is stored in the current directory.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the scope where the ranking model is available. The available scopes are: SSA, Tenant, Site Collection or
Site. A ranking model can be available in multiple scopes.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RankingModelXML
Specifies the name of the XML representation of the new ranking model.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the ranking model.
The type must be a valid GUID in the 9bf36458-fc99-4f7b-b060-867e5a63adce, a valid search application name
(for example, SearchApp1), or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchResultItemType
In ths Article

Creates a new result item type.

Syntax
New-SPEnterpriseSearchResultItemType [-Name] <String> [-Rules] <PropertyRuleCollection>
[[-RulePriority] <Int32>] [[-DisplayProperties] <String>] [[-SourceID] <Guid>] [-DisplayTemplateUrl] <String>
-Owner <SearchObjectOwner> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-OptimizeForFrequentUse <Boolean>] [-SearchApplication <SearchServiceApplicationPipeBind>]
[-SearchApplicationProxy <SearchServiceApplicationProxyPipeBind>] [-WhatIf] [<CommonParameters>]

New-SPEnterpriseSearchResultItemType [[-Name] <String>] [[-Rules] <PropertyRuleCollection>]


[[-RulePriority] <Int32>] [[-DisplayProperties] <String>] [[-SourceID] <Guid>]
[[-DisplayTemplateUrl] <String>] -ExistingResultItemType <ResultItemTypePipeBind>
-ExistingResultItemTypeOwner <SearchObjectOwner> -Owner <SearchObjectOwner>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-OptimizeForFrequentUse <Boolean>]
[-SearchApplication <SearchServiceApplicationPipeBind>]
[-SearchApplicationProxy <SearchServiceApplicationProxyPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Use the New-SPEnterpriseSearchResultItemType cmdlet to create a new result item type.
Result item types enable you to change the look of search results based on the type of result. You start by defining
a collection of rules, which will be evaluated against the properties of results. Then you define the display template
to use for rendering that type of result. Once you have created the result item type, results matching the rules of
the result item type will render using the specified display template.
Example use cases:
Change the look of results for a particular file name extension, for example Word documents.
Change the look of a particular content type in search results.
Change the look of results from a particular author.
Add a result action to results from a particular result source as part of a custom search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------
$rule = Get-SPEnterpriseSearchPropertyRule -PropertyName "ContentTypeId" -Operator "StartsWith"
$rule.AddValue('0x010063C2F478ACC511DFB869B5BFDFD720851252')
$ruleCollection = Get-SPEnterpriseSearchPropertyRuleCollection
$ruleCollection.Add($rule)
$displayProperties =
"WorkId,Rank,Title,Size,Path,Description,SiteName,HitHighlightedSummary,HitHighlightedProperties,ViewsLifeTime"
$displaytemplateUrl = "~sitecollection/_catalogs/masterpage/Display
Templates/Search/Item_MyCustomDisplayTemplate.js"
$web = Get-SPWeb https://webUrl
$tenantOwner = Get-SPEnterpriseSearchOwner -Level SPSite -SPWeb $web
$proxy = Get-SPEnterpriseSearchServiceApplicationProxy
New-SPEnterpriseSearchResultItemType -SearchApplicationProxy $proxy `
>> -Name "CustomResultType" `
>> -Rules $ruleCollection `
>> -RulePriority 1 `
>> -DisplayProperties $displayProperties `
>> -DisplayTemplateUrl $displaytemplateUrl `
>> -Owner $tenantOwner

This example first defines the rule to apply to the search results in order to target results with a specific property
and adds the rule to the rule collection.
Thereafter the example defines the properties of the result that shall be displayed and the URL to the display
template governing the appearance of the rendered results.
Finally, the example defines the rule item type by its name, the rule collection, the display properties, the display
template and the tenant owner.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayProperties
Specifies which result properties to display.

Type: String
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayTemplateUrl
Specifies the URL of the display template that shall be used for rendering the results. Specify an absolute URL.

Type: String
Required: True
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExistingResultItemType
Specifies an existing result item type to which new rules or displayed properties can be added.

Type: ResultItemTypePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExistingResultItemTypeOwner
Specifies the search object owner that defines the scope at which an existing result item type was created.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the result item type.
Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OptimizeForFrequentUse
Enable this flag if you always want the properties of this result item type to be requested, regardless of whether the
result type is triggered. This will improve performance as long as it is only enabled on the most frequently used
result item types.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the result item type is created.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RulePriority
Specifies which priority the collection of rules has compared to other rules.

Type: Int32
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rules
Specifies the collection of rules to evaluate the result properties against.

Type: PropertyRuleCollection
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the result item type. The type must be a valid GUID, in the form
12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an
instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplicationProxy
Specifies the proxy of the search application that contains the result item type. The type must be a valid GUID, in
the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application proxy name (for example,
SearchAppProxy1); or an instance of a valid SearchServiceApplicationProxy object.

Type: SearchServiceApplicationProxyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SourceID
Identifies the search result source that the result item type applies to. Leave this parameter blank to apply to all
result sources.

Type: Guid
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPEnterpriseSearchResultItemType
Get-SPEnterpriseSearchResultItemType
Remove-SPEnterpriseSearchResultItemType
Get-SPEnterpriseSearchOwner
Get-SPEnterpriseSearchPropertyRule
Get-SPEnterpriseSearchPropertyRuleCollection
minutes to read • Edit Online

New-SPEnterpriseSearchResultSource
In ths Article

Creates a new result source.

Syntax
New-SPEnterpriseSearchResultSource [-AssignmentCollection <SPAssignmentCollection>]
[-AuthenticationType <FederationAuthType>] [-AutoDiscover <Boolean>] [-Confirm] [-Description <String>]
[-MakeDefault <Boolean>] -Name <String> -Owner <SearchObjectOwner> [-Password <String>] -ProviderId <Guid>
[-QueryTemplate <String>] [-RemoteUrl <String>] -SearchApplication <SearchServiceApplicationPipeBind>
[-SsoId <String>] [-UserName <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet creates a result source. Use result sources to scope search results and federate queries to external
sources, such as internet search engines. After defining a result source, configure search web parts and query rule
actions to use it. Result Sources replace Search Scopes, which are now deprecated. This cmdlet supports the same
create operations as are supported through the "Manage Result Sources" page in Central Administration, except
the operations "Form Authentication" and "Cookie Authentication". For permissions and the most current
information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint
Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$owner = Get-SPEnterpriseSearchOwner -Level SSA
New-SPEnterpriseSearchResultSource -SearchApplication $ssa -Owner $owner -ProviderId fa947043-6046-4f97-9714-
40d4c113963d -Name "Custom SharePoint Result Source"

This example creates a new search service application level result source, named "Custom SharePoint Result
Source".

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationType
Specifies the authentication type of the new result source.
A specific set of authentication types are supported for each search provider type and, if parameter is not specified,
the authentication type will default based on search provider type.
This cmdlet supports the following set of authentication mechanisms and corresponding types: Default SharePoint
Authentication (FederationAuthType.LocalNTAuth), Basic Authentication
(FederationAuthType.SingleAccountBasicAuth - specify UserName and Password), Default Remote SharePoint
Authentication (FederationAuthType.PerUserBasicAuth), Single Sign On (FederationAuthType.SSO - requires
SsoId to be specified), Anonymous (FederationAuthType.Anonymous), Digest Authentication
(FederationAuthType.SingleAccountDigest - specify UserName and Password), NTLM Application Pool Identity
(FederationAuthType.ApplicationPoolIdentity), NTLM User Name and Password
(FederationAuthType.SingleAccountNTLM - specify UserName and Password).

When using a Local SharePoint Search/Local SharePoint People Search provider, then
FederationAuthType.LocalNTAuth (default) and FederationAuthType.SingleAccountBasicAuth are supported.
When using a Remote SharePoint Search/Remote SharePoint People Search provider, then
FederationAuthType.PerUserBasicAuth (default) and FederationAuthType.SSO are supported.
When using OpenSearch 1.0/1.1 search provider, then the following authentication types are supported:
FederationAuthType.Anonymous (default), FederationAuthType.SingleAccountBasicAuth,
FederationAuthType.SingleAccountDigest, FederationAuthType.SingleAccountNTLM, and
FederationAuthType.ApplicationPoolIdentity.
All authentication types are listed in the enum FederationAuthType.

Type: FederationAuthType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutoDiscover
Specifies whether to use automatic discovery of the Exchange server endpoint for the new result source.
Setting value to true ($true) states that automatic discovery should be used. If not specified or set to false ($false),
automatic discovery will not be used.
Only applicable when using an Exchange search provider.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the new result source.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MakeDefault
Specifies whether the new result source should be set as default or not, for the scope specified by the Owner
parameter.
Setting value to true ($true) states that the result source should be set as default. If not specified or set to false, the
new result source will not be set as default.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new result source.
Names must be unique at each administrative level.
For example, two result sources in a site cannot share a name, but one in a site and one provided by the site
collection can.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding result source is created.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password of the user credentials to use to connect to the new result source.
Used when authentication type (AuthenticationType) is set to a type that consumes user credentials
(FederationAuthType.SingleAccountBasicAuth, FederationAuthType.SingleAccountDigest or
FederationAuthType.SingleAccountNTLM ).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProviderId
Specifies the search provider to be used by the new result source.
Is specified as a Guid or GUID string, which must be one of the following: FA947043-6046-4F97-9714-
40D4C113963D (Local SharePoint Search), E4BCC058-F133-4425-8FFC -1D70596FFD33 (Local SharePoint
People Search), 1E0C8601-2E5D -4CCB -9561-53743B5DBDE7 (Remote SharePoint Search), E377CAAA-FCAF -
4a1b-B7A1-E69A506A07AA (Remote SharePoint People Search), 3A17E140-1574-4093-BAD6-E19CDF1C0122
(Exchange Search), 3A17E140-1574-4093-BAD6-E19CDF1C0121 (OpenSearch 1.0/1.1).

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueryTemplate
Specifies the query transformation template of the new result source.
Incoming queries are changed according to the template, to use this new query text instead. Include the incoming
query in the new text by using the query variable "{searchTerms}". Use this to scope results.
For example, to only return OneNote items, set the new text to "{searchTerms} fileextension=one". Then, an
incoming query "sharepoint" becomes "sharepoint fileextension=one". Default value is {searchTerms}.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoteUrl
Specifies the connection URL template of the new result source.
Must be set when using a search provider that consumes it: Remote SharePoint Search, Remote SharePoint People
Search, OpenSearch 1.0/1.1 and Exchange (if AutoDiscover is not turned on).
When using other search providers the parameter is ignored.
For Remote SharePoint Search/Remote SharePoint People Search, specify the address of the root site collection of
the remote SharePoint farm.
For OpenSearch 1.0/1.1, specify the URL of the OpenSearch source.
Include the query in the URL by using the query variable "{searchTerms}", which will be automatically replaced
with the query. For Exchange, specify the Exchange EWS URL from which to retrieve results.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name, for example, SearchApp1, or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SsoId
Specifies the reverse proxy certificate Secure Store Id to use to connect to the new result source.
Must be specified if authentication type (AuthenticationType) is set to FederationAuthType.SSO (Single Sign On).
If you are connecting to your intranet through a reverse proxy, enter the SSO Id of the Single Sign On entry which
stores the certificate used to authenticate against the reverse proxy.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserName
Specifies the user name of the user credentials to use to connect to the new result source.
Used when authentication type (AuthenticationType) is set to a type that consumes user credentials
(FederationAuthType.SingleAccountBasicAuth, FederationAuthType.SingleAccountDigest or
FederationAuthType.SingleAccountNTLM ).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchResultSource
Set-SPEnterpriseSearchResultSource
Remove-SPEnterpriseSearchResultSource
Get-SPEnterpriseSearchOwner
minutes to read • Edit Online

New-SPEnterpriseSearchSecurityTrimmer
In ths Article

Adds a custom security trimmer to a shared search application.

Syntax
New-SPEnterpriseSearchSecurityTrimmer [-Id] <Int32> [-RulePath <String>]
-SearchApplication <SearchServiceApplicationPipeBind> -TypeName <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Properties <String>] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet creates a new object to configure the security trimmer. SPEnterpriseSearchSecurityTrimmer represents
a security trimmer that performs customized security trimming of search results at query time, when the results are
returned to the user.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchSecurityTrimmer -SearchApplication $ssa -TypeName
"SearchCustomSecurityTrimmer.CustomSecurityTrimmerPost, SearchCustomSecurityTrimmer, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=48e046c834625a88, processorArchitecture=MSIL" -Id 1

This example adds a new custom security trimmer for trimming the returned result set. This new security trimmer
is added to the search application by using the id 1. The strong named assembly contains the class
CustomSecurityTrimmerPost, which implements the ISecurityTrimmerPost interface.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id
Specifies the identity of the security trimmer to use for the specified search application.
If this parameter specifies an existing custom security trimmer, the trimmer will be removed and replaced with the
custom trimmer.
Remove the existing trimmer before you add a new one.

Type: Int32
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Properties
Specifies the name-value pairs that specify the configuration properties.
The type must be in the following name/value pair format: Name1~Value1~Name2~Value2~

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RulePath
Specifies the content path where the security trimmer will be applied.
The string must be a valid URI in the form file:\\server_name\content, and it must correspond to an existing crawl
rule.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Adds the security trimmer to the specified search application.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid search application
name, for example, SearchApp1, or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TypeName
Specifies the strong named assembly name of a security trimmer type. The strong name must refer to a type
whose assembly is deployed to the global assembly cache on a query server and that type must implement the
ISecurityTrimmerPre, ISecurityTrimmerPost or ISecurityTrimmer2 interface. Security trimming can be done in two
places: before query execution (ISecurityTrimmerPre) or after the results set has returned (ISecurityTrimmerPost or
ISecurityTrimmer2). For how to reference a strong name assembly, see https://msdn.microsoft.com/en-
us/library/s1sx4kfb.aspx (https://msdn.microsoft.com/en-us/library/s1sx4kfb.aspx )

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchServiceApplication
In ths Article

Adds a search service application to a farm.

Syntax
New-SPEnterpriseSearchServiceApplication [[-Name] <String>]
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DatabaseName <String>] [-DatabasePassword <SecureString>] [-DatabaseServer <String>]
[-DatabaseUsername <String>] [-Partitioned] [-WhatIf]
[-AdminApplicationPool <SPIisWebServiceApplicationPoolPipeBind>] [-CloudIndex <Boolean>]
[-FailoverDatabaseServer <String>] [<CommonParameters>]

Description
This cmdlet is used when the search functionality is first configured or when a new shared search application is
added to a farm. SPEnterpriseSearchServiceApplication represents a self-contained aggregation of indexed content
and properties available for search and provides an anchor class for setting global search properties. A farm can
include multiple search service applications.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$appPool = New-SPServiceApplicationPool -Name 'SharePoint Web Services Default' -Account 'CONTOSO\ServiceApps'


New-SPEnterpriseSearchServiceApplication -Name "Search Service Application" -ApplicationPool $appPool

This example creates a new search service application named NewSSA in a new application pool.
A search service application that is created in this manner will have active search topology, but no search
components.

Parameters
-AdminApplicationPool
Specifies the application pool to be used with the SearchAdminWebServiceApplication that is associated with
SearchServiceApplication. If not specified, ApplicationPool will be used.
Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies the IIS application pool to use for the new search application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL of a search
application, in the form https://server_name; or an instance of a valid SPIisWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CloudIndex
When CloudIndex is true, this becomes a cloud Search service application that crawls on premises content in a
cloud hybrid search solution.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database to create for the new search application.
The type must be a valid name of a SQL Server database, for example, SearchAppDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password for the user ID that is used for accessing the search application database on SQL Server.
The type must be a valid password.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.
The type must be a valid SQL Server host name, for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the user ID to use for accessing the search application SQL Server database.
The type must be a valid user name, for example, SearchUserName1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-FailoverDatabaseServer
Specifies the name of the SQL server that hosts the mirror instances of search databases.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the names of the new search application.
The type must be a valid name of a search application, for example, SearchApp1.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Partitioned
Specifies that the search service application uses web-hosted mode. Web-hosted mode segregates results for a
given hosted subscription.
This property has no effect on SharePoint Server 2019.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchServiceApplicationProxy
In ths Article

Adds a new search application proxy to a farm.

Syntax
New-SPEnterpriseSearchServiceApplicationProxy [[-Name] <String>]
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-MergeWithDefaultPartition] [-Partitioned] [-WhatIf] [<CommonParameters>]

New-SPEnterpriseSearchServiceApplicationProxy [[-Name] <String>] -Uri <String>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-MergeWithDefaultPartition] [-Partitioned]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
This cmdlet creates a proxy for a search service application. The search service application proxy can be used by a
web application or another service consumer to use the functionality that is provided by the search application.
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://msdn.microsoft.com/en-us/library/dd878348(VS.85).aspx).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchServiceApplicationProxy -Name 'Search Service Application Proxy' -SearchApplication $ssa

This example adds a search service application proxy to a search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MergeWithDefaultPartition
Merges the index partition for the proxy with the default index partition collection for the search service
application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the display name of the search application proxy to create.
The type must be a valid string, for example, SearchAppProxy1.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Partitioned
Specifies that the search service application must use web-hosted mode. web-hosted mode segregates results for a
given hosted subscription.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the URI to the search application to use for search.
The type must be a valid URI, in the form file:\\server_name\searchapp.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Uri
Specifies the URI to the search application to use for search.
The type must be a valid URI, in the form file:\\server_name\searchapp.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchSiteHitRule
In ths Article

Adds a new site hit rule for a search application.

Syntax
New-SPEnterpriseSearchSiteHitRule -Behavior <String> -HitRate <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-SearchService <SearchServicePipeBind>] [-WhatIf]
-Name <String> [<CommonParameters>]

Description
The New-SPEnterpriseSearchSiteHitRule cmdlet sets the maximum limits for crawling a site. The new site hit rule is
used by all search service applications on the current farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE------------------

New-SPEnterpriseSearchSiteHitRule -Name myHost -Behavior 0 -HitRate 40

This example creates a new site hit rule on the myHost host that limits to 40 the number of simultaneous requests.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Behavior
Defines a rule to be followed when the farm's search service crawls the given site.
If a value of zero is specified, the hit rate is the maximum number of simultaneous requests. If a value of 1 is
specified, then hit rate is the number of seconds to delay between requests to the server.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HitRate
Value to use for maximum requests or seconds of delay, according to behavior.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the host to which the site hit rule should be applied.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchService
Specifies the search service in the farm that hosts the crawl.
The type must be an instance of a valid SearchService object; otherwise, the local service on the server that hosts
the Windows PowerShell cmdlet will be used.
Type: SearchServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPEnterpriseSearchTopology
In ths Article

Creates a new search topology in the given search service application.

Syntax
New-SPEnterpriseSearchTopology -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Clone] [-Confirm]
[-SearchTopology <SearchTopologyPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet creates a new, inactive search topology in the given search service application. If the Clone switch is
used, a cloned topology is created. Otherwise, an empty topology is created.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchTopology -SearchApplication $ssa

This example creates a new, empty search topology in the search service application referenced by $ssa.
------------------EXAMPLE 2------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa
New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone -SearchTopology $topology

This example creates a new search topology in the search service application referenced by $ssa by cloning the
existing topology referenced by $topology.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Clone
Specifies that the new search topology is to be created by cloning an existing search topology.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Specifies that the new search topology is to be created by cloning an existing search topology.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application to which the search topology will belong.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchTopology
Specifies the existing search topology of which the new topology will be a clone.

Type: SearchTopologyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchTopology
Set-SPEnterpriseSearchTopology
Remove-SPEnterpriseSearchTopology
minutes to read • Edit Online

New-SPExcelBIServer
In ths Article

Configures Analysis Services servers to work with Excel Services.

Syntax
New-SPExcelBIServer [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>]
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> -ServerId <String> [-WhatIf] [<CommonParameters>]

Description
Use the New -SPExcelBIServer cmldet to configure Analysis Services servers to work with Excel Services.

Examples
------------------EXAMPLE------------------

New-SPExcelBIServer -ExcelServiceApplication "MyExcel" -ServerID "MSS01"

This example configures the analysis server to work the Excel Service application named MyExcel and ServerID of
MSS01.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the Analysis server

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelFileLocation list
object.The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
Excel Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a
valid SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ServerId
The name of the Analysis Services server

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inputs
Microsoft.Office.Excel.Server.Cmdlet.SPExcelServiceApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

New-SPExcelBlockedFileType
In ths Article

Adds a file type to the list of file types that Excel Services Application prevents from loading.

Syntax
New-SPExcelBlockedFileType -ExcelServiceApplication <SPExcelServiceApplicationPipeBind> -FileType <FileType>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The New-SPExcelBlockedFileType cmdlet adds an entry to the list of file types that Excel Services Application
prevents from loading. Excel Services Application does not load any files that correspond to a file type that is on
this list. The specified file type is prevented from loading by all instances of Excel Services Application for the
specified Excel Services Application Web service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$sa = Get-SPExcelServiceApplication
New-SPExcelBlockedFileType -FileType XLSM -ExcelServiceApplication $sa

This example adds an entry for XLSM to the list of file types that Excel Services Application currently prevents from
loading.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPBlockedExcelFileType list
object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-FileType
Specifies the file types that are blocked from loading.
The type must be one of the following file extensions: XLSX, XLSB, or XLSM.

Type: FileType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPExcelDataConnectionLibrary
In ths Article

Adds a new data connection library to Excel Services Application.

Syntax
New-SPExcelDataConnectionLibrary -Address <String> -ExcelServiceApplication <SPExcelServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>] [-WhatIf]
[<CommonParameters>]

Description
The New-SPExcelDataConnectionLibrary cmdlet adds a data connection library to the list of trusted data connection
libraries for an Excel Services Application Web service application. Excel Services Application loads only data
connection files that are stored in a data connection library that is on the list of trusted data connection libraries.
Data connection libraries contain data connection files, which contain all the resources that Excel Services
Application and the Excel client require to connect to an external data source. Data connection libraries enable you
to reuse and share data connections. Data connections can be loaded by using information from the workbook file;
however, using a data connection library to load data connections allows data connections to be managed
separately from workbooks.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$sa = Get-SPExcelServiceApplication
New-SPExcelDataConnectionLibrary -Address "https://portal/site/salesDCL" -Description "This is the DCL where
all the connections to the sales data are stored." -ExcelServiceApplication $sa

This example adds a new data connection library (DCL ) and then sets its description to the list of trusted data
connection libraries that is in the Excel Services Application Web service application named MyExcelService.
Workbooks can use connection files stored in that library to refresh data on the Excel Services Application Web
service application.

Parameters
-Address
Specifies the address of the data connection library. The address must be unique in the list of trusted data
connection libraries.
The type must be a valid URL, in the form https://server_name.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a friendly description for the data connection library.
The type must be a valid string; for example, this is a custom OLEDB provider.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelDataConnectionLibrary
list object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPExcelDataProvider
In ths Article

Adds a new safe data provider to Excel Services Application.

Syntax
New-SPExcelDataProvider -ExcelServiceApplication <SPExcelServiceApplicationPipeBind> -ProviderId <String>
-ProviderType <DataProviderType> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Description <String>] [-WhatIf] [<CommonParameters>]

Description
The New-SPExcelDataProvider cmdlet adds a data provider to the list of safe data providers in an Excel Services
Application Web service application. Excel Services Application refreshes external data connections only if the data
provider for a connection is on the list of safe data providers. Excel Services Application includes a set of common
data providers on this list. Therefore, using cmdlets to modify safe data providers typically occurs only in custom
data connection scenarios.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Get-SPExcelServiceApplication -identity "MyExcelService" | New-SPExcelDataProvider -providerID "CustomOLEDB" -


ProviderType OleDb -description "This is a custom OLEDB provider"

This example adds a new custom OLEDB data provider to the list of safe data providers for the Excel Services
Application Web service application named MyExcelService.
------------------EXAMPLE 2------------------

Get-SPExcelServiceApplication | New-SPExcelDataProvider -providerID "CustomOLEDB" -ProviderType OleDb -


description "This is a custom OLEDB provider"

This example adds a new custom OLEDB data provider to the list of safe data providers for all Excel Services
Application Web service application in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a friendly description for the new data provider.
The type must be a valid string; for example, "This is a custom OLEDB provider".

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelDataProvider list object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ProviderId
Specifies the name of the provider. This ID should be present in the connection strings generated by this provider
and the ID must be unique for the provider type.
The type must be a valid name of a provider; for example CustomOLEDB.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProviderType
Specifies the supported type of data provider to add to safe provider list.
The type must be one of the following: OleDb, Odbc, or OdbcDsn.

Type: DataProviderType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPExcelFileLocation
In ths Article

Adds a new trusted location to Excel Services Application.

Syntax
New-SPExcelFileLocation -Address <String> -ExcelServiceApplication <SPExcelServiceApplicationPipeBind>
[-AbortOnRefreshOnOpenFail] [-AssignmentCollection <SPAssignmentCollection>]
[-AutomaticVolatileFunctionCacheLifetime <Int32>] [-ChartAndImageSizeMax <Int32>]
[-ConcurrentDataRequestsPerSessionMax <Int32>] [-Confirm] [-DefaultWorkbookCalcMode <DefaultWorkbookCalcMode>]
[-Description <String>] [-DisplayGranularExtDataErrors] [-ExternalDataAllowed <AllowExternalData>]
[-IncludeChildren] [-LocationType <LocationType>] [-ManualExtDataCacheLifetime <Int32>]
[-NewWorkbookSessionTimeout <Int32>] [-PeriodicExtDataCacheLifetime <Int32>] [-RequestDurationMax <Int32>]
[-RESTExternalDataAllowed] [-SessionTimeout <Int32>] [-ShortSessionTimeout <Int32>] [-UdfsAllowed]
[-WarnOnDataRefresh] [-WhatIf] [-WorkbookSizeMax <Int32>] [-ChartRenderDurationMax <Int32>]
[<CommonParameters>]

Description
The New-SPExcelFileLocation cmdlet adds a new location to the list of trusted file locations in an Excel Services
Application Web service application. Excel Services Application loads only workbooks that are stored in a trusted
file location. Properties of trusted file locations control how workbooks can be used when loaded on Excel Services
Application. Excel Services Application always enforces the properties defined by the trusted file location from
which a workbook was loaded. The properties that the trusted file location uses are determined through
comparison of the file path for the workbook with the Address parameter of the trusted file location.
The longest match takes precedence. For example, if https://portal/site/ and https://portal/site/subsite are trusted
locations and you load a workbook from the subsite, the application uses the properties from the subsite trusted
location because it has the longest matching address.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Get-SPExcelServiceApplication -identity "MyExcelService" | New-SPExcelFileLocation -address


"https://myPortal/myTeam" -includechildren -locationType SharePoint -description "This is my team's site on
myPortal." -workbooksizemax 50 -externaldataallowed DclAndEmbedded -WarnOnDataRefresh:$false

This example adds a new trusted file location to the list of trusted file locations that is in the Excel Services
Application Web service application named MyExcelService.
This example enables workbooks to load from any child or subfolder that starts with https://myPortal/myTeam. All
workbooks loaded from this location must be smaller than 50 megabytes (MB ) in size. The workbooks can refresh
external data by using connections that are embedded in the workbook file or stored in a data connection library. A
warning message that the workbook is attempting to refresh external data will not be displayed.
------------------EXAMPLE 2------------------

Get-SPExcelServiceApplication -identity "MyExcelService" | New-SPExcelFileLocation -address


https://myPortal/myTeam/managers -locationType SharePoint -description "This is the manager's subsite for
myTeam."

This example adds a new trusted file location to the list of trusted file locations that is in the Excel Services
Application Web service application named MyExcelService with a given address and description.

Parameters
-AbortOnRefreshOnOpenFail
Specifies that the loading of a Excel Services Application file automatically fails if an automatic data refresh
operation fails when the file is opened. The load is failed only if the following conditions are true:
The user has SharePoint Product and Technologies read-only permissions to the file.
The workbook file has data connections that are refreshed automatically when the Excel Services Application file is
opened.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Address
Specifies a Web folder, or file directory from which Excel Services Application can load workbooks.
The type must be a valid URL, in the form https://myPortal/myTeam; or a valid UNC path in form,
\\server_name\folder_name

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AutomaticVolatileFunctionCacheLifetime
Specifies the maximum time, in seconds, that a computed value for a volatile function is cached for automatic
recalculations. Valid values include:
-1 Calculates once when the workbook loads.
0 Always calculates.
1 to 2073600 Caches 1 second to 24 days. The default integer value is 300.
The type must be the integers -1 or 0, or an integer value in the range of 1 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ChartAndImageSizeMax
Specifies the maximum size, in megabytes, of a chart or image that can be opened. The default value is 1.
The type must be a valid integer greater than 0.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ChartRenderDurationMax
{{Fill ChartRenderDurationMax Description}}

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConcurrentDataRequestsPerSessionMax
Specifies the maximum number of concurrent external data requests allowed in each session. If a session must
issue more than this number of requests, additional requests must be queued. The scope of this setting is the
logical server. The default value is 5.
The type must be a positive integer.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultWorkbookCalcMode
Specifies the calculation mode of workbooks. Settings other than File override the workbook settings. The default
setting is File.
The type must be one of the following: File, Manual, Auto, or AutoDataTables.

Type: DefaultWorkbookCalcMode
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a friendly description for the new file location.
The type must be a valid string; for example, this is the file location of the monthly sales reports.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayGranularExtDataErrors
Displays granular error messages for external data failures for files in this location.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelFileLocation list object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ExternalDataAllowed
Specifies the type of external data access allowed for workbooks. None specifies that data refresh is disabled. Dcl
specifies that data is refreshed only when it uses a connection file in a trusted data connection library.
DclandEmbedded specifies that a data connection library can be used but is not required. The scope of this setting
is the trusted location. The default value is None.
The type must be any of the following settings:
None
Dcl
DclAndEmbedded

Type: AllowExternalData
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeChildren
Indicates that subordinate URLs, directories and libraries are trusted. For example, if the trusted file location is
https://portal and IncludeChildren is true, https://portal/subSite is also trusted, as is any URL subordinate to the
URL specified in Address.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocationType
Specifies the type of location. Location type indicates how Excel Services Application retrieves files from the
location specified in Address. The default setting is the SharePoint type. The default value is SharePoint.
The type must be one of the following: SharePoint, UNC, or HTTP.
Type: LocationType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManualExtDataCacheLifetime
Specifies the time, in seconds, that Excel Services Application waits before it re-issues a manual, or user-initiated,
external data request. During this time period, the results from the previous external data request can be returned
from an external data cache. The default value is 300.
The valid values are any one of the following items:
-1 Never refresh after first query.1 to 2073600- Caches 1 second to 24 days.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewWorkbookSessionTimeout
Specifies the time, in seconds, that a session for a new, unsaved, workbook remains active on Excel Services
Application with no user activity. Valid values include the following:
-1 Session never expires.
0 Session expires at the end of a single request.
1 to 2073600 Remains active 1 second to 24 days. The default value is 1800.
The type must be -1, 0, or an integer in the range of 1 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeriodicExtDataCacheLifetime
Specifies the time, in seconds, that Excel Services Application waits before it re-issues an on-open or periodic (that
is, automatic) external data request. During this time period, the results from the previous external data request can
be returned from an external data cache. A value of -1 specifies never to refresh after the first query. The default
value is 300.
The type must be -1, 0, or integer in the range of 1 to 2073600.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestDurationMax
Specifies the maximum duration, in seconds, for a single request in a session. After this time elapses, the request
times out. The default value is 300.
The type must be -1 (no limit) or an integer in the range of 1 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RESTExternalDataAllowed
Specifies whether requests from the Representational State Transfer (REST) Application Programming Interface
(API) are permitted to refresh external data connections. The RESTExternalDataAllowed parameter has no effect if
ExternalDataAllowed parameter is set to None.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionTimeout
Specifies the time, in seconds, that a session remains active on Excel Services Application with no user activity. Valid
values include the following:
-1 Session never expires.
0 session expires at the end of a single request.
1 to 2073600 Remains active 1 second to 24 days. The default value is 300.
The type must be -1, 0, or an integer in the range of 1 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShortSessionTimeout
Specifies the time, in seconds, that a user has to make the initial interaction with a spreadsheet. After this time has
elapsed, if the user is not active, the session is closed. The value must always be less than SessionTimeout. If the
ShortSessionTimeout value is greater than or equal to SessionTimeout, an error is returned. The default value is
75.
The type must be -1 or an integer in the range of 1 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UdfsAllowed
Specifies that user-defined functions can be called by workbooks that are loaded from the trusted file location that
is specified in Address.
The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WarnOnDataRefresh
Specifies that a warning is displayed to the user on the first refresh of data for the workbook. The default value is
True.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkbookSizeMax
Specifies the maximum size, in megabytes, of a workbook that can be loaded. The default value is 10.
The type must be an integer value in the range of 1 to 2000.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPExcelServiceApplication
In ths Article

Creates a new instance of Excel Services Application.

Syntax
New-SPExcelServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-Name <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-CachingOfUnusedFilesEnable] [-Confirm]
[-CrossDomainAccessAllowed] [-Default] [-EncryptedUserConnectionRequired <EncryptedConnectionMode>]
[-ExternalDataConnectionLifetime <Int32>] [-FileAccessMethod <FileAccessMethod>]
[-LoadBalancingScheme <LoadBalancingScheme>] [-MemoryCacheThreshold <Int32>] [-PrivateBytesMax <Int32>]
[-SessionsPerUserMax <Int32>] [-SiteCollectionAnonymousSessionsMax <Int32>]
[-TerminateProcessOnAccessViolation] [-ThrottleAccessViolationsPerSiteCollection <Int32>]
[-UnattendedAccountApplicationId <String>] [-UnusedObjectAgeMax <Int32>] [-WhatIf] [-WorkbookCache <String>]
[-WorkbookCacheSizeMax <Int32>] [-UseEffectiveUserName] [-WorkbookModelUsageTracker <String>]
[<CommonParameters>]

New-SPExcelServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-Name <String>]


[-AssignmentCollection <SPAssignmentCollection>] [-CachingOfUnusedFilesEnable] [-Confirm]
[-CrossDomainAccessAllowed] [-Default] [-EncryptedUserConnectionRequired <EncryptedConnectionMode>]
[-ExternalDataConnectionLifetime <Int32>] [-FileAccessMethod <FileAccessMethod>]
[-LoadBalancingScheme <LoadBalancingScheme>] [-MemoryCacheThreshold <Int32>] [-PrivateBytesMax <Int32>]
[-SessionsPerUserMax <Int32>] [-SiteCollectionAnonymousSessionsMax <Int32>]
[-TerminateProcessOnAccessViolation] [-ThrottleAccessViolationsPerSiteCollection <Int32>]
[-UnusedObjectAgeMax <Int32>] [-WhatIf] [-WorkbookCache <String>] [-WorkbookCacheSizeMax <Int32>]
[-UnattendedServiceAccount <PSCredential>] [-UseEffectiveUserName] [-WorkbookModelUsageTracker <String>]
[<CommonParameters>]

Description
The New-SPExcelServiceApplication cmdlet creates a new Excel Services Application Web service application with
new settings. After you create a new Excel Services Application Web service application, you can use the
Set-SPExcelServiceApplication cmdlet to modify the global settings of the new application.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

New-SPExcelServiceApplication -Name "MyExcelService" -ApplicationPool "SharePoint Services"

This example creates a new instance of Excel Services Application with the display name MyExcelService.
------------------EXAMPLE 2------------------
New-SPExcelServiceApplication -Name "My Excel Service" -ApplicationPool "SharePoint Services" -
SessionsPerUserMax 5

This example creates a new instance of Excel Services Application with the display name My Excel Service and
allows only five sessions per user for each back-end application server computer that is running Excel Services
Application.

Parameters
-ApplicationPool
Specifies the existing IIS application pool to run the Web service in for the new Excel Service application.
The type must be a valid SPIisWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CachingOfUnusedFilesEnable
Specifies that files that are no longer used by Excel Services Application can remain in the cache for later use. The
default is true when the parameter is not specified on the command.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrossDomainAccessAllowed
Specifies that trusted workbooks and data connection files can be requested and rendered by Web Parts or pages
that reside in other HTTP domains.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Default
Specifies that the proxy for this service application is added to the default proxy group of the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EncryptedUserConnectionRequired
Requires that encryption is used between the end user and the Excel Services Application server. The scope of this
setting is the logical server. The default value is None.
The type must be one of the following: None or Connection.

Type: EncryptedConnectionMode
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExternalDataConnectionLifetime
Specifies the maximum number of seconds that an external data connection can remain open in the connection
pool. Valid values include:
-1 Never recycle
1 to 2073600 Remain active 1 second to 24 days.
The default value is 1800.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileAccessMethod
Specifies the authentication method that Excel Services Application uses to retrieve files. UseFileAccessAccount
specifies that all workbooks always use the credentials of the service account running Excel Services Application.
UseImpersonation specifies that Excel Services Application retrieves the workbook files as the user who is making
the request. The default value is UseImpersonation.
The type must be one of the following: UseImpersonation or UseFileAccessAccount.

Type: FileAccessMethod
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LoadBalancingScheme
Specifies the load-balancing schema that is used by the Excel Services Application Web service application for
sending requests to different back-end computers that are running Excel Calculation Services. The default value is
WorkbookURL.
The type must be one of the following: RoundRobin, Local, or WorkbookURL.

Type: LoadBalancingScheme
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MemoryCacheThreshold
Specifies the percentage of the maximum private bytes that can be allocated to inactive objects. When the memory
cache threshold is exceeded, cached objects that are not currently in use are released. Setting this value to 0
disables caching of inactive objects. The default value is 90.
The type must be an integer in the range of 0 to 95.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a friendly name for the new Excel Services Application Web service application. The name that you use
must be a unique name of an Excel Services Application Web service application that is in this farm. The name can
be a maximum of 128 characters. The default value is Service_numofapplications+1.
The type must be a valid string; for example, MyExcelServiceApp1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateBytesMax
Specifies the maximum private bytes, in megabytes, used by Excel Services Application. When set to -1, the
maximum private bytes defaults to 50 percent of physical memory on the computer. Valid values include -1 for no
limit, and any positive integer. The default value is -1.
The type must be -1 or any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionsPerUserMax
Specifies the maximum number of sessions allowed for a user. If a user reaches this maximum, the oldest session
will be deleted when a new session is started. Valid values include -1 for no limit, and any positive integer. The
default value is 25.
The type must be -1 or any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollectionAnonymousSessionsMax
Specifies the maximum number of anonymous sessions allowed per site collection. A value of 0 specifies that no
anonymous sessions are allowed. Valid values include -1 for no limit, 0 to disable the setting, or any positive
integer. The default value is 25.
The type must be -1, 0, or any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TerminateProcessOnAccessViolation
Terminates Excel Services Application when an access violation occurs in the process.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ThrottleAccessViolationsPerSiteCollection
Specifies that if a workbook causes an access violation error on Excel Services Application, all files that originate
from that workbook's site collection are blocked from loading for the specified period (in seconds). Existing
sessions for files on that site collection are unaffected. Valid values include 0 to disable the setting, and the range of
1 to 2073600 seconds (24 days). The default value is 0.
The type must be an integer value in the range of 0 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UnattendedAccountApplicationId
Specifies that the application ID that is used to look up the unattended service account credentials from the secure
store service specified by UnattendedAccountSecureServiceAppName. The secure store service is contacted when
this parameter is set and specific error cases occur. Valid values are alphanumeric strings with a maximum of 256
characters. The default value is an empty string.
The type must be a valid string of alphanumeric characters; for example, UnattendedServiceAccountID.
The unattended account is a single account that all workbooks can use to refresh data. An unattended account is
required when workbook connections specify None for authentication, or when any non-Windows credentials are
used to refresh data.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UnattendedServiceAccount
{{Fill UnattendedServiceAccount Description}}

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UnusedObjectAgeMax
Specifies the maximum amount of time, in minutes, that objects not currently used in a session are kept in the
memory cache. Valid values include -1 for no maximum setting, and a positive integer in the range of 1 to 34560
minutes (24 days). The default value is -1.
The type must be -1, or an integer in the range of 1 to 34560.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseEffectiveUserName
{{Fill UseEffectiveUserName Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkbookCache
Specifies the local file system location of the cache that is used for storing workbooks used by Excel Services
Application.
If no value is specified, then the default value is a subdirectory in the system temporary directory.
The type must be a valid path in either of the following forms:
-- C:\folder_name -- \\server_name\folder_name

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkbookCacheSizeMax
Specifies the maximum allowable size, in megabytes, of an individual session. The default value is 0.
The type must be any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkbookModelUsageTracker
{{Fill WorkbookModelUsageTracker Description}}

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPExcelUserDefinedFunction
In ths Article

Adds a new user-defined function to Excel Services Application.

Syntax
New-SPExcelUserDefinedFunction -Assembly <String> -ExcelServiceApplication <SPExcelServiceApplicationPipeBind>
[-AssemblyLocation <AssemblyLocation>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Description <String>] [-Enable] [-WhatIf] [<CommonParameters>]

Description
The New-SPExcelUserDefinedFunction cmdlet adds a user-defined function to an Excel Services Application Web
service application. Excel Services Application uses only user-defined functions that have an entry in the list of
user-defined functions. User-defined functions are managed code assemblies that can be called from an Excel
Services Application workbook by using standard Excel Services Application formula syntax. The assemblies can
perform custom logic or other actions, such as refresh data. Windows PowerShell cmdlets operate on the entries
that are in the list of user-defined functions, but they do not operate on the assemblies.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPExcelServiceApplication | New-SPExcelUserDefinedFunction -Assembly


"SampleCompany.SampleApplication.SampleUdf" -AssemblyLocation GAC

This example adds the SampleComany.SampleApplication.SampleUdf file to every Excel Services Application Web
service application in the farm.
The user-defined function assembly is deployed to the global assembly cache (GAC ).

Parameters
-Assembly
Specifies the strongly typed name of the assembly. The name must be unique in the list of user-defined functions.
The name can be a maximum of 4096 alphanumeric characters.
The type must be a string of alphanumeric characters; for example:
-- SampleCompany.SampleApplication.SampleUdf -- C:\UDFs\SampleUdf.dll --
\\MyNetworkServer\UDFs\SampleUdf.dll
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssemblyLocation
Specifies the location where the assembly is stored. The default value is GAC.
The type must be one of the following: GAC or LocalFile.

Type: AssemblyLocation
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a friendly description for the user-defined function. The name can be a maximum of 4096 alphanumeric
characters. The default value is an empty string.
The type must be a valid string of alphanumeric characters; for example, this is the user-defined function for
consolidation reports.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Activates the user-defined function for use with Excel Services Application. The default value is True.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the list of user-defined functions.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPLogFile
In ths Article

Creates a new log file.

Syntax
New-SPLogFile [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The New-SPLogFile cmdlet ends the current log file and starts a new log file.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

New-SPLogFile

This example ends the current log file and starts a new log file.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

New-SPManagedAccount
In ths Article

Registers a new managed account.

Syntax
New-SPManagedAccount [-Credential] <PSCredential> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
The New-SPManagedAccount cmdlet registers a new managed account for the specified Credential or Username and
Password.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

$cred = Get-Credential
New-SPManagedAccount -Credential $cred

This example adds a new managed account to the farm by using credentials that are prompted.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Credential
Indicates the Credential object that specifies the credentials of the new managed account. If you use Credential, you
cannot specify Username and Password.

Type: PSCredential
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPManagedPath
In ths Article

Creates a new managed path for the given Web application for all host header site collections.

Syntax
New-SPManagedPath [-RelativeURL] <String> [-HostHeader] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Explicit] [-WhatIf] [<CommonParameters>]

New-SPManagedPath [-RelativeURL] <String> -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Explicit] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The New-SPManagedPath cmdlet adds a new managed path to a given Web application or for use with all host header
site collections. If the HostHeader switch is provided, the managed path is shared among all host-named site
collections; otherwise, a Web application must be specified to create this managed path within. The relative URL is
a partial URL that represents the managed path. When the slash mark (/) is used, the root is defined. If the Explicit
parameter is not provided, the new managed path is a wildcard path.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

New-SPManagedPath "Teams" -WebApplication "https://somesite"

This example creates a Teams managed path for a given Web application (https://somesite).

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Explicit
Specifies whether the managed path is explicit or wildcard.
If not provided, the managed path is a wildcard path.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostHeader
If this parameter is provided, this managed path applies to all host header site collections.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RelativeURL
Specifies the relative URL for the new managed path.
The type must be a valid partial URL such as site or sites/teams/.
Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the Web application group to add this path.
The type must be a valid URL, in the form https://server_name, or a GUID, in the form 1234-5678-0987645a.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPMarketplaceWebServiceApplicationProxy
In ths Article

Creates a service application proxy for the app identity data web service.

Syntax
New-SPMarketplaceWebServiceApplicationProxy -Name <String> -ServiceEndpointUri <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup] [-WhatIf]
[<CommonParameters>]

Description
Use the New-SPMarketplaceWebServiceApplicationProxy cmdlet to create a service application proxy for the app
identity data web service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

New-SPMarketplaceWebServiceApplicationProxy -Name ApplicationIdentityData -ServiceEndpointUri


http://server:7800/ApplicationIdentityData.svc -DefaultProxyGroup

This example adds a proxy named ApplicationIdentityData to the app identity web service.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies whether to add the service application proxy to the default proxy group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the service application proxy.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceEndpointUri
Specifies the URI of the app identity data web service.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPMetadataServiceApplication
In ths Article

Creates a new managed metadata service application.

Syntax
New-SPMetadataServiceApplication -Name <String> [-AdministratorAccount <String>]
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-CacheTimeCheckInterval <Int32>] [-Confirm] [-DatabaseCredentials <PSCredential>] [-DatabaseName <String>]
[-DatabaseServer <String>] [-FailoverDatabaseServer <String>] [-FullAccessAccount <String>] [-HubUri <String>]
[-MaxChannelCache <Int32>] [-PartitionMode] [-ReadAccessAccount <String>] [-RestrictedAccount <String>]
[-SyndicationErrorReportEnabled] [-WhatIf] [-DisablePartitionQuota] [-DeferUpgradeActions]
[<CommonParameters>]

New-SPMetadataServiceApplication -Name <String> [-AdministratorAccount <String>]


-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-CacheTimeCheckInterval <Int32>] [-Confirm] [-DatabaseCredentials <PSCredential>] [-DatabaseName <String>]
[-DatabaseServer <String>] [-FailoverDatabaseServer <String>] [-FullAccessAccount <String>] [-HubUri <String>]
[-MaxChannelCache <Int32>] [-PartitionMode] [-ReadAccessAccount <String>] [-RestrictedAccount <String>]
[-SyndicationErrorReportEnabled] [-WhatIf] -GroupsPerPartition <Int32> -LabelsPerPartition <Int32>
-PropertiesPerPartition <Int32> -TermSetsPerPartition <Int32> -TermsPerPartition <Int32>
[-DeferUpgradeActions] [<CommonParameters>]

Description
Use the New-SPMetadataServiceApplication cmdlet to create a new managed metadata service application.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE 1-------------

New-SPMetadataServiceApplication -Name "MetadataServiceApp1" -ApplicationPool "AppPool1" -DatabaseName


"MetadataDB1"

This example creates a new managed metadata service application.


-------------------EXAMPLE 2-------------

New-SPMetadataServiceApplication -Name "MetadataServiceApp2" -ApplicationPool "AppPool1" -DatabaseName


"MetadataDB2" -HubUri "https://sitename" -SyndicationErrorReportEnabled

This example creates a new managed metadata service application and specifies a content type hub to be used for
syndication. It also enables error reporting during syndication.
-------------------EXAMPLE 3-------------

New-SPMetadataServiceApplication -Name "MetadataServiceApp3" -ApplicationPool "AppPool1" -DatabaseName


"MetadataDB3" -PartitionMode

This example creates a new managed metadata service application that is partitioned, for use by sites in a
subscription.

Parameters
-AdministratorAccount
A comma-separated list of user accounts or service accounts in the format <domain>\<account> that may create
and run the service application. The accounts must already exist.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies an existing IIS application pool in which to run the new managed metadata service application.
The value must be a GUID that is the identity of an SPServiceApplicationPool object; the name of an existing
application pool, or an instance of an SPServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CacheTimeCheckInterval
Specifies an interval, in seconds, that a front-end Web Server should wait before asking the application server for
changes. This value is set per timer job, client application, or Web application.
The mininum value is 1, and there is no maximum value. The default value is 10.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL
authentication.
If SQL authentication is to be used, either DatabaseCredentials must be specified or both the DatabaseUserName
and DatabasePassword parameters must be set.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database to create for the new managed metadata service application.
The type must be a valid name of a SQL Server database; for example MeatadataDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.
The type must be a valid name of a SQL Server database; for example SqlServerHost1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
Specifies if the upgrade process is to be deferred and manually completed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisablePartitionQuota
Disables partition quotas.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host server for the failover database server.
The type must be a valid SQL Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FullAccessAccount
Specifies a comma-separated set of application pool accounts in the format <domain>\<account> that will be
given read/write permission to the managed metadata service's term store and content type gallery. The accounts
must already exist.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupsPerPartition
Sets the maximum number of Term Groups per partition.
Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HubUri
Specifies the fully qualified URL of the site collection that contains the content type gallery that the service will
provide access to.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LabelsPerPartition
Sets the maximum number of Labels per partition.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxChannelCache
Specifies the maximum number of Windows Communication Foundation (WCF ) channels that a front-end Web
server should hold open to the application server.
This value is set per timer job, client application, or Web application.
The minimum value is 0, and there is no maximum value. The default value is 4.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the service application to create. The name can contain a maximum of 128 characters.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-PartitionMode
Specifies that the service application restrict data by subscription.
Note This property cannot be changed after the service application has been created.
This property has no effect on SharePoint Server 2019.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertiesPerPartition
Sets the maximum number of Properties per partition.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReadAccessAccount
Specifies a comma-separated set of application pool accounts in the format <domain>\<account> that will be
given read-only permission to the managed metadata service's term store and content type gallery.
The accounts must already exist.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RestrictedAccount
Specifies a comma-separated set of application pool accounts in the format <domain>\<account> that will be
given permission to read the managed metadata service's term store and content type gallery; and permission to
write to open term sets and local term sets and to create new enterprise keywords.
The accounts must already exist.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SyndicationErrorReportEnabled
Enables reporting of errors when content types are imported.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TermSetsPerPartition
Sets the maximum number of Term Sets per partition.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TermsPerPartition
Sets the maximum number of Terms per partition.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPMetadataServiceApplicationProxy
In ths Article

Creates a new connection to a managed metadata service application.

Syntax
New-SPMetadataServiceApplicationProxy -Name <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-ContentTypePushdownEnabled] [-ContentTypeSyndicationEnabled] [-DefaultProxyGroup]
[-DefaultKeywordTaxonomy] [-DefaultSiteCollectionTaxonomy] [-PartitionMode]
[-ServiceApplication <SPMetadataServiceCmdletPipeBind>] [-Uri <String>] [-WhatIf] [<CommonParameters>]

Description
Use the New-SPMetadataServiceApplicationProxy cmdlet to create a new connection to a managed metadata service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online
documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE 1----------------

New-SPMetadataServiceApplicationProxy -Name "MetadataServiceProxy1" -ServiceApplication "MetadataServiceApp1"

This example creates a connection to a managed metadata service application in the local farm.
-------------------EXAMPLE 2----------------

New-SPMetadataServiceApplicationProxy -Name "MetadataServiceProxy3" -ServiceApplication "MetadataServiceApp3" -PartitionMode

This example creates a partitioned connection to a managed metadata service application in the local farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory
and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you
can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or
SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter
is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of
by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentTypePushdownEnabled
Specifies that existing instances of changed content types in subsites and libraries will be updated.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentTypeSyndicationEnabled
Specifies that this connection will provide access to the content types that are associated with the managed metadata service
application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultKeywordTaxonomy
Specifies that new enterprise keywords will be stored in the term store associated with the managed metadata service application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the connection be added to the default proxy group for the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultSiteCollectionTaxonomy
Specifies that the term set that is created when you create a new managed metadata column will be stored in the term store
associated with the managed metadata application.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the display name of the service application proxy to create. The name can contain a maximum of 128 characters.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionMode
Specifies that the service application restrict data by subscription.
This property cannot be changed after the service application proxy has been created.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the local managed metadata service application to connect to. The service application must exist on the local farm.
The type must be a valid GUID; a valid name of the service application; or an instance of a valid SPMetadataServiceApplication
object.

Type: SPMetadataServiceCmdletPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Uri
Specifies the URI of a remote managed metadata service application to connect to.
To specify the managed metadata service application that this proxy is connecting to, you must set only the URI parameter or only
the ServiceApplication parameter.
The type must be a valid URL, in the form urn:schemas-microsoft-
com:sharepoint:service:fa5c65ebed244a15817768825004f3a7#authority=urn:uuid:acdd6deff6sd4bb899f5beb42051bf3b7&authority=https://
<server>:32844/Topology/topology.svc.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more information, type the
following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPPerformancePointServiceApplication
In ths Article

Creates a new service application for the PerformancePoint Service.

Syntax
New-SPPerformancePointServiceApplication [-Name] <String>
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-AnalyticQueryCellMax <Int32>]
[-AnalyticQueryLoggingEnabled <Boolean>] [-ApplicationCacheEnabled <Boolean>]
[-ApplicationCacheMinimumHitCount <Int32>] [-ApplicationProxyCacheEnabled <Boolean>]
[-AssignmentCollection <SPAssignmentCollection>] [-CommentsDisabled <Boolean>] [-CommentsScorecardMax <Int32>]
[-Confirm] [-DatabaseFailoverServer <String>] [-DatabaseName <String>] [-DatabaseServer <String>]
[-DatabaseSQLAuthenticationCredential <PSCredential>] [-DataSourceQueryTimeoutSeconds <Int32>]
[-DecompositionTreeMaximum <Int32>] [-ElementCacheSeconds <Int32>] [-FilterRememberUserSelectionsDays <Int32>]
[-FilterTreeMembersMax <Int32>] [-IndicatorImageCacheSeconds <Int32>] [-MSMQEnabled <Boolean>]
[-MSMQName <String>] [-SelectMeasureMaximum <Int32>] [-SessionHistoryHours <Int32>]
[-ShowDetailsInitialRows <Int32>] [-ShowDetailsMaxRows <Int32>] [-ShowDetailsMaxRowsDisabled <Boolean>]
[-TrustedContentLocationsRestricted <Boolean>] [-TrustedDataSourceLocationsRestricted <Boolean>] [-WhatIf]
[-AnalyticResultCacheMinimumHitCount <Int32>] [-DataSourceUnattendedServiceAccountTargetApplication <String>]
[-FilterSearchResultsMax <Int32>] [-UseEffectiveUserName <Boolean>] [<CommonParameters>]

Description
The New-SPPerformancePointServiceApplication cmdlet creates a new PerformancePoint Service on the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE------------------------

New-SPPerformancePointServiceApplication -Name PPS_Application_01 -ApplicationPool PPS_Application_Pool_01

This example creates a new PerformancePoint Service application named PPSApp_01 and sets it to run under an
application pool named PPS_Application_Pool_01.

Parameters
-AnalyticQueryCellMax
Specifies the maximum number of returned cells in an analytic grid.
A valid integer value from 1 through 1,000,000,000. The default value is 100,000.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AnalyticQueryLoggingEnabled
Turns on verbose logging of query events.
The type must be one of the following: True or False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AnalyticResultCacheMinimumHitCount
The minimum number of times an analytic report needs to be accessed before caching starts happening.
The default value is 0.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationCacheEnabled
Specifies whether the rendered output cache on the application server is on (True) or off (False). The default value
is True.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationCacheMinimumHitCount
Specifies the minimum number of times rendered output must be requested before it is added to cache. The
default value is 2.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ApplicationPool
Specifies the existing IIS application pool to run the Web service in for the service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ApplicationProxyCacheEnabled
Specifies rendered output cache on the front end Web server. The default value is True.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CommentsDisabled
Specifies that users can add comments to scorecard cells.
The type must be one of the following: true or false.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CommentsScorecardMax
Specifies the maximum number of comments that can be added to a scorecard. The default value is 1000.
The type must be an integer value from 1 through 1,000,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseFailoverServer
Specifies the name of the database server that contains the PerformancePoint Services database that must be
mirrored.
This parameter was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the PerformancePoint Services database that will be created when the service application is
provisioned.
This parameter was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the database server where the PerformancePoint Services database will be created. This
should be the same server name that is used for the SharePoint content and configuration databases.
The value may be written as SQL instance\server if it is not referring to the default instance.
This parameter was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseSQLAuthenticationCredential
Determines whether to use Windows authentication or SQL Server authentication when connecting to a
PerformancePoint Services database.
This parameter was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataSourceQueryTimeoutSeconds
Specifies the time, in seconds, before a data source query times out. The default value is 300.
The type must be an integer value in the range of 1 to 36,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataSourceUnattendedServiceAccountTargetApplication
The name of the Secure Store Application that will be used by default to access data sources.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DecompositionTreeMaximum
Specifies the maximum number of items (per level) returned to the decomposition tree visualization.
A valid integer value from 1 through 1,000,000. The default value is 25.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ElementCacheSeconds
Specifies the first class object cache expiration time. The default value is 15.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilterRememberUserSelectionsDays
Specifies the number of days that user filter selections are remembered. The default value is 90.
The type must be an integer value from 1 through 10,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilterSearchResultsMax
The maximum number of items to return on a Dashboard when viewing a filter.
The default value is 5000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilterTreeMembersMax
Specifies the maximum number of records to show in filter treeview control. The default value is 500.
The type must be an integer value from 1 through 100,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IndicatorImageCacheSeconds
Specifies the time, in seconds, that key performance indicator (KPI) icons are cached. The default value is 10.
The type must be an integer value from 1 through 3,600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MSMQEnabled
Specifies that notifications are sent to Microsoft Message Queuing (MSMQ ) on content change.
The type must be one of the following: true or false. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MSMQName
Specifies the name of the queue. The queue name can contain a maximum of 380 characters, and cannot contain
the following characters: CR (ASCII 13), LF (ASCII 10), backslash (\), plus sign (+, comma (,), or quotation marks
("").

The type must be a valid MSMQ name; for example, MessageQueue1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new PerformancePoint Service application.
The type must be a valid name of a PerformancePoint Service application; for example, PerfPointApp1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SelectMeasureMaximum
Specifies the maximum number of measures to show in a dashboard Select Measure control. The default value is
1000.
The type must be an integer value from 1 through 1,000,000.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionHistoryHours
Specifies the number of hours between clearing expired user navigation history. The default value is 2.
The type must be an integer value from 1 through 48.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowDetailsInitialRows
Specifies the initial number of rows to retrieve for show details. The default value is 1,000.
The type must be an integer value from 1 through 100,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowDetailsMaxRows
Specifies the maximum number of rows to retrieve for show details.
The type must be an integer value from 1 through 1,000,000. The default value is 10,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowDetailsMaxRowsDisabled
Turns off the ShowDetailsInitialRows setting. If set to True, Analysis Services controls limit.
The type must be one of the following: True or False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-TrustedContentLocationsRestricted
Specifies that only specified locations are trusted. The default setting is false (trust all content locations).
The type must be one of the following: True or False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustedDataSourceLocationsRestricted
Specifies that only specified locations are trusted. The default setting is false (trust all data source locations).
The type must be one of the following: True or False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseEffectiveUserName
Enables the use of the Analysis Services Effective User Name feature.
The type must be one of the following: True or False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPPerformancePointServiceApplicationProxy
In ths Article

Creates a proxy for a PerformancePoint Service application.

Syntax
New-SPPerformancePointServiceApplicationProxy [-Name] <String>
-ServiceApplication <SPPerformancePointMonitoringServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Default] [-WhatIf] [<CommonParameters>]

Description
The New-SPPerformancePointServiceApplicationProxy cmdlet creates a proxy for a PerformancePoint Service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE--------------------

New-SPPerformancePointServiceApplicationProxy -Name PPS_Application_Proxy_01 -ServiceApplication


PPS_Application_01 -Default

This example creates a new PerformancePoint Service application proxy named PPS_Application_Proxy_01,
associated with the service application named PPS_Application_01 and is added to the Default proxy group.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Default
Specifies that the new application proxy will be added to the default service application proxy group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the PerformancePoint Service application proxy to create.
The type must be a valid name of a PerformancePoint Service application proxy; for example, PerfPointAppProxy1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ServiceApplication
Specifies the PerformancePoint Service application that is associated with the new service application proxy.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
PerformancePoint service application (for example, PerfPointApp1); or an instance of a valid
SPPerformancePointMonitoringServiceApplication object.

Type: SPPerformancePointMonitoringServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPPerformancePointServiceApplicationTrustedLocation
In ths Article

Creates a new trusted location for a PerformancePoint Service application.

Syntax
New-SPPerformancePointServiceApplicationTrustedLocation
-ServiceApplication <SPPerformancePointMonitoringServiceApplicationPipeBind>
-TrustedLocationType <TrustedFileType> -Type <RepositoryLocationType> -Url <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>] [-WhatIf]
[<CommonParameters>]

Description
The New-SPPerformancePointServiceApplicationTrustedLocation cmdlet creates a new trusted location for a
PerformancePoint Service application. The new trusted location can be a Content or Data Source trusted location
type and is enforced only when it is enabled in the PerformancePoint Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE---------------------

New-SPPerformancePointServiceApplicationTrustedLocation -ServiceApplication PPSApp_01 -url


"https://Some_Valid_Site_URL" -Type Site -TrustedLocationType Content

This example creates a new TrustedLocation for the PPSApp_01 service application. This creates a Content trusted
location of type Site with the specified URL.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the new safe data provider.
The type must be a valid string with a maximum of 4096 characters.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the PerformancePoint Service application to which the new trusted location will be added.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
PerformancePoint Service application (for example, PerfPointApp1); or an instance of a valid
SPPerformancePointMonitoringServiceApplication object.

Type: SPPerformancePointMonitoringServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TrustedLocationType
Specifies the type of trusted locations to create. If TrustedLocationType is not specified, this cmdlet creates all the
trusted locations for the specified PerformancePoint Service application.
The type must be one of the following: Content or Data Source.
Type: TrustedFileType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the type of trusted location.
The type must be one of the following: Site Collection, Site, Document Library, List

Type: RepositoryLocationType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the trusted location site, site collection, site, document library, or list. The type must be a valid
URL, in the form https://server_name, or https://server_name/sitecollection/site/list.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPPowerPointConversionServiceApplication
In ths Article

Creates a PowerPoint Conversion Service application.

Syntax
New-SPPowerPointConversionServiceApplication [-Name] <String>
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the New-SPPowerPointConversionServiceApplication cmdlet to create a new instance of a PowerPoint Conversion
Service application by using the Name parameter.
After the PowerPoint Conversion Service application is created, you can convert PowerPoint presentations to
various formats.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

New-SPPowerPointConversionServiceApplication -Name "MyWorkgroupPPTApp" -ApplicationPool "SharePoint Web


Services Default"

This example creates a new instance of the PowerPoint Conversion Service application named
MyWorkgroupPPTApp and assigns it to the default application pool.

Parameters
-ApplicationPool
Assigns an application pool that Internet Information Services (IIS ) will use for this service application.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the PowerPoint Conversion Service application.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPPowerPointConversionServiceApplicationProxy
Set-SPPowerPointConversionServiceApplication
minutes to read • Edit Online

New-SPPowerPointConversionServiceApplicationProxy
In ths Article

Creates a PowerPoint Conversion Service application proxy.

Syntax
New-SPPowerPointConversionServiceApplicationProxy [-Name] <String>
-ServiceApplication <SPPowerPointConversionServiceApplicationPipeBind> [-AddToDefaultGroup]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the New-SPPowerPointConversionServiceApplicationProxy cmdlet to create a PowerPoint Conversion Service
application proxy. The service application proxy is instantiated on the front-end web server and acts as an
intermediary between the client computer and the service application back end.

Examples
------------------EXAMPLE------------------

New-SPPowerPointConversionServiceApplicationProxy -Name "MyWorkgroupPPTAppProxy" -ServiceApplication


"MyWorkgroupPPTApp" -AddtoDefaultGroup

This example creates a new instance of the PowerPoint Conversion Service application proxy named
MyWorkgroupPPTAppProxy, binds it to the MyWorkgroupPPTApp service application and then adds it to the
default service application proxy group

Parameters
-AddToDefaultGroup
Adds the newly created proxy to the default service application proxy group. If not specified, the proxy is not added
to a group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the service application proxy.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the name of the service application to bind.

Type: SPPowerPointConversionServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPPowerPointConversionServiceApplication
Set-SPPowerPointConversionServiceApplication
minutes to read • Edit Online

New-SPProfileServiceApplication
In ths Article

Adds a User Profile Service Application to a farm.

Syntax
New-SPProfileServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-Name <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-MySiteHostLocation <SPSitePipeBind>]
[-PartitionMode] [-ProfileDBCredentials <PSCredential>] [-ProfileDBName <String>] [-ProfileDBServer <String>]
[-ProfileSyncDBCredentials <PSCredential>] [-ProfileDBFailoverServer <String>] [-ProfileSyncDBName <String>]
[-ProfileSyncDBServer <String>] [-ProfileSyncDBFailoverServer <String>] [-SocialDBCredentials <PSCredential>]
[-SocialDBName <String>] [-SocialDBServer <String>] [-SocialDBFailoverServer <String>] [-WhatIf]
[-DeferUpgradeActions] [<CommonParameters>]

New-SPProfileServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-Name <String>]


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] -MySiteHostLocation <SPSitePipeBind>
[-MySiteManagedPath <SPPrefixPipeBind>] [-PartitionMode] [-ProfileDBCredentials <PSCredential>]
[-ProfileDBName <String>] [-ProfileDBServer <String>] [-ProfileSyncDBCredentials <PSCredential>]
[-ProfileDBFailoverServer <String>] [-ProfileSyncDBName <String>] [-ProfileSyncDBServer <String>]
[-ProfileSyncDBFailoverServer <String>] [-SiteNamingConflictResolution <String>]
[-SocialDBCredentials <PSCredential>] [-SocialDBName <String>] [-SocialDBServer <String>]
[-SocialDBFailoverServer <String>] [-WhatIf] [-DeferUpgradeActions] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set.
You may only use parameters from one parameter set and you may not combine parameters from different
parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets
(https://go.microsoft.com/fwlink/?LinkID=187810).

The New-SPProfileServiceApplication cmdlet adds and creates a new profile service application, or creates an
instance of a profile service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

New-SPProfileServiceApplication -Name 'User Profile Service Application' -ApplicationPool 'SharePoint Web


Services Default' -ProfileDBName Profile -SocialDBName Social -ProfileSyncDBname Sync

This example creates a new User Profile Service application.


Parameters
-ApplicationPool
Specifies the existing IIS application pool in which to run the Web service for the service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
Specifies if the upgrade process is to be deferred and manually completed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MySiteHostLocation
Specifies the site collection where the My Site will be created.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid URL, in the
form https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteManagedPath
Specifies the managed path where personal sites will be created.
The type must be a valid URL, in the form https://server_name.

Type: SPPrefixPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the display name for the new User Profile Service application. The name must be a unique name of a
User Profile Service application in this farm. The name can be a maximum of 64 characters.
The type must be a valid name of a service application; for example, UserProfileSvcApp1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionMode
Specifies that the service application restrict data by site group. After the PartitionMode parameter is set and the
service application is created, it cannot be changed.
This property has no effect on SharePoint Server 2019.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileDBCredentials
Specifies the set of security credentials, such as a user name and a password, that is used to connect to the User
Profile database that this cmdlet creates.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileDBFailoverServer
Associates a content database with a specific failover server that is used in conjunction with SQL Server database
mirroring. The server name is the required value.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileDBName
Specifies the name of the database where the User Profile database is created.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileDBServer
Specifies the database where the User Profile database will be created.
The type must be a valid name of a SQL Server database; for example, ProfileAppDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileSyncDBCredentials
Specifies the set of security credentials, such as a user name and a password, that will be used to connect to the
Profile Sync database that is specified in the ProfileSyncDBName parameter.
The type must be a valid PSCredential object.
Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileSyncDBFailoverServer
Associates a Profile Sync database with a specific failover server that is used in conjunction with SQL Server
database mirroring. The server name is the required value.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileSyncDBName
Specifies the database where the Profile Sync database will be created.
The type must be a valid name of a SQL Server database; for example, ProfileSyncAppDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileSyncDBServer
Specifies the database server that will host the Profile Sync database that is specified in the ProfileSyncDBName
parameter.
The type must be a valid name of a SQL Server host; for example, SQLServerProfileSyncHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteNamingConflictResolution
Specifies the format to use to name personal sites.
Use one of the following integer values:
1 Personal site collections are to be based on user names without any conflict resolution. For example,
https://portal_site/location/username/
2 Personal site collections are to be based on user names with conflict resolution by using domain names. For
example, .../username/ or .../domain_username/
3 Personal site collections are to be named by using domain and user name always, to avoid any conflicts. For
example, https://portal_site/location/domain_username/
The default value is 1 (do not resolve conflicts).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SocialDBCredentials
The set of security credentials, including a user name and a password, that is used to connect to the Social database
that this cmdlet creates.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SocialDBFailoverServer
Associates a Social database with a specific failover server that is used in conjunction with SQL Server database
mirroring. The server name is the required value.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SocialDBName
Specifies the database where the Social database will be created.
The type must be a valid name of a SQL Server host; for example, SQLServerSocialHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SocialDBServer
Specifies the database server that will host the Social database that is specified in SocialDBName.
The type must be a valid name of a SQL Server host; for example, SQLServerSocialHost1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPProfileServiceApplicationProxy
In ths Article

Creates a User Profile Service application proxy on the local farm.

Syntax
New-SPProfileServiceApplicationProxy -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup] [-Name <String>]
[-PartitionMode] [-WhatIf] [<CommonParameters>]

New-SPProfileServiceApplicationProxy -Uri <Uri> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-DefaultProxyGroup] [-Name <String>] [-PartitionMode] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The New-SPProfileServiceApplicationProxy creates a User Profile Service application proxy on the local farm. The
proxy is added to the default proxy group for the local farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$sa = New-SPProfileServiceApplication -Name 'User Profile Service Application' -ApplicationPool 'SharePoint Web
Services Default' -ProfileDBName Profile -SocialDBName Social -ProfileSyncDBname Sync
New-SPProfileServiceApplicationProxy -Name 'User Profile Service Application Proxy' -ServiceApplication $sa -
DefaultProxyGroup

This example creates a new User Profile Service application proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the User Profile Service application proxy be added to the default proxy group for the local farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the display name for the new User Profile Service application. The name that you use must be a unique
name of a User Profile Service application in this farm. The name can be a maximum of 128 characters.
The type must be a name of a valid User Profile Service application proxy; for example, UserProfileSvcProxy1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionMode
Specifies that the service application restrict data by site group. After the PartitionMode parameter is set and the
service application is created, it cannot be changed.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the local User Profile Service application that is associated with the new proxy.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription User Profile Service application (for example, ProfileSvcApp1); or an instance of a valid
SPServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Uri
The URI of the remote user profile service application this proxy should communicate with. This value is required
only if you plan to connect a User Profile Service application from a remote farm.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPProjectServiceApplication
In ths Article

Creates a new Project Server Service application.

Syntax
New-SPProjectServiceApplication [-Name] <String> -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Proxy] [<CommonParameters>]

Description
The New-SPProjectServiceApplication cmdlet creates a new Project Server Service application.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
------------------EXAMPLE 1-----------------------

New-SPProjectServiceApplication -Name "PsiApplication" -ApplicationPool "PsiApplicationPool" -Proxy

This example creates a Project Server Service application with the name PsiApplication and an application pool
with the name PsiApplicationPool and it creates a Project Server Service application proxy for the application.
------------------EXAMPLE 2-----------------------

Get-SPIisWebServiceApplicationPool "PsiApplicationPool" | New-SPProjectServiceApplication -Name


"PsiApplication"

This example creates a Project Server Service application with the name PsiApplication. The result is piped using
an application pool object.

Parameters
-ApplicationPool
Specifies the existing IIS application pool to run the Web service in for the new service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.
Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the new Project Server Service application.
The type must be a valid name of a Project Server Service application; for example, ProjectWebApp1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Proxy
Specifies that a proxy for new service application is automatically created.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPProjectServiceApplicationProxy
In ths Article

Creates a proxy for a Project Server Service application.

Syntax
New-SPProjectServiceApplicationProxy [-Name] <String> -ServiceApplication <PsiServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The New-SPProjectServiceApplicationProxy cmdlet creates a proxy for a Project Server Service application.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
-------------------EXAMPLE 1------------------

New-SPProjectServiceApplicationProxy -Name PsiApplicationProxy -ServiceApplication PsiApplication

This example creates a Project Server Service application proxy with the name PsiApplicationProxy for the
application PsiApplication.
-------------------EXAMPLE 2------------------

Get-SPServiceApplication | ?{ $_.Name -eq "PsiApplication" } | New-SPProjectServiceApplicationProxy -Name


"PsiApplicationProxy" -Default

This example creates a Project Server Service application proxy with the name PsiApplicationProxy for the
application PsiApplication and adds the proxy to the Default proxy group.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the new proxy.
The type must be a valid name of a Project Server Service application proxy; for example, ProjectSvcProxy1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the Project Server Service application to associate with the new proxy.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Project
Server service application (for example, ProjectWebApp1); or an instance of a valid PsiServiceApplication object.

Type: PsiServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

New-SPRequestManagementRuleCriteria
In ths Article

Creates criteria for the rule to match.

Syntax
New-SPRequestManagementRuleCriteria [-Value] <String> [-CustomHeader] <String> [-CaseSensitive]
[[-MatchType] <SPRequestManagementRuleMatchType>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

New-SPRequestManagementRuleCriteria [-Value] <String> [-Property] <SPRequestManagementRulePropertyType>


[-CaseSensitive] [[-MatchType] <SPRequestManagementRuleMatchType>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the New-SPRequestManagementRuleCriteria cmdlet to create criteria for the rule to match.

Examples
------------------EXAMPLE-----------------------

New-SPRequestManagementRuleCriteria -Property Host -Value Client01 -MatchType Equals

This example creates a new rule that matches the Host 'Client01'.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CaseSensitive
Specifies whether or not the match is case sensitive.

Type: SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomHeader
Specifies the custom header for the rule.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchType
Defines operators for the match.
The following are the valid values:
--Equals
--Regex
--StartsWith
--EndsWith

Type: SPRequestManagementRuleMatchType
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Property
Specifies a header for a value to match.
The following are the valid values:
--Url
--Urlreferrer
--UserAgent
--Host
--IP
--HttpMethod
--SoapAction
--CustomHeader

Type: SPRequestManagementRulePropertyType
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Value
Specifies a value for the rule to match.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPRequestManagementSettings
Set-SPRequestManagementSettings
minutes to read • Edit Online

New-SPSecureStoreApplication
In ths Article

Creates a new Secure Store application.

Syntax
New-SPSecureStoreApplication -ServiceContext <SPServiceContextPipeBind> -TargetApplication <TargetApplication>
[-Administrator <SPClaim[]>] [-AssignmentCollection <SPAssignmentCollection>]
[-CredentialsOwnerGroup <SPClaim[]>] -Fields <TargetApplicationField[]> [-TicketRedeemer <SPClaim[]>]
[<CommonParameters>]

Description
The New-SPSecureStoreApplication cmdlet creates a new Secure Store application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$usernameField = New-SPSecureStoreApplicationField -Name "UserName" -Type WindowsUserName -Masked:$false


$passwordField = New-SPSecureStoreApplicationField -Name "Password" -Type WindowsPassword -Masked:$true
$fields = $usernameField,$passwordField
$userClaim = New-SPClaimsPrincipal -Identity "CONTOSO\janedoe" -IdentityType WindowsSamAccountName
$contosoTargetApp = New-SPSecureStoreTargetApplication -Name "ContosoTargetApplication" -FriendlyName "Contoso
Target Application" -ApplicationType Group
New-SPSecureStoreApplication -ServiceContext http://contoso -TargetApplication $contosoTargetApp -Fields
$fields -Administrator $userClaim

This example creates a new group target application ContosoTargetApplication and then a new application for that
target application. This new application has two fields; UserName of type WindowsUserName and Password of
type WindowsPassword. The user with identity janedoe on the CONTOSO domain is set as the target application
administrator.

Parameters
-Administrator
Specifies the administrator of the new Secure Store application.
Type: SPClaim[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CredentialsOwnerGroup
Specifies the claims object for the groups that own the group credentials.

Type: SPClaim[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Fields
Specifies the field information for the application. The default fields are username and password.

Type: TargetApplicationField[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context for the target application.
Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetApplication
Specifies information about the target application. For example, the TargetApplication object includes data values
for application name, display name, contact info, enable ticketing flag and URL address to set the credential. The
schema for the TargetApplication object is defined in the ISecureSToreProviderExtended interface that exposes the
target application metadata.

Type: TargetApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TicketRedeemer
Specifies the ticket redeemer claim value.

Type: SPClaim[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPSecureStoreApplicationField
In ths Article

Creates a new Secure Store application fields object.

Syntax
New-SPSecureStoreApplicationField [-Masked] -Name <String> -Type <SecureStoreCredentialType>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The New-SPSecureStoreApplicationField cmdlet creates a new Secure Store application field object for a target
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

New-SPSecureStoreApplicationField -Name "UserName" -Type WindowsUserName -Masked:$false

This example creates a new credential field of type WindowsUserName with the name UserName and the masked
property (which when true will hide characters as they are typed in by the user) set to false. This cmdlet is typically
used in conjunction with the New-SPSecureStoreApplication cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Masked
Masks the visible characters that are typed in the field.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new target application field.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the type of credential field to add to a target application.
The type must be one of the following: UserName, Password, Pin, Key, Generic, WindowsUserName, or
WindowsPassword.

Type: SecureStoreCredentialType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPSecureStoreServiceApplication
In ths Article

Creates a new Secure Store Service application in the farm.

Syntax
New-SPSecureStoreServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-AuditingEnabled] [-Name <String>] [-AssignmentCollection <SPAssignmentCollection>]
[-AuditlogMaxSize <Int32>] [-Confirm] [-DatabaseCredentials <PSCredential>] [-DatabaseName <String>]
[-DatabasePassword <SecureString>] [-DatabaseServer <String>] [-DatabaseUsername <String>]
[-FailoverDatabaseServer <String>] [-PartitionMode] [-Sharing] [-WhatIf] [-DeferUpgradeActions]
[<CommonParameters>]

Description
The New-SPSecureStoreServiceApplication cmdlet creates a new Secure Store Service application in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

New-SPSecureStoreServiceApplication -ApplicationPool 'SharePoint Web Services Default' -AuditingEnabled:$false


-DatabaseName 'Secure Store' -Name 'Secure Store Service Application'

This example creates a new Secure Store Service application with the name Contoso Secure Store with auditing
disabled and creates a database with the name ContosoSSDatabase on the given database server for use with the
service application.

Parameters
-ApplicationPool
Specifies the existing IIS application pool to run the Web service in for the new service application.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuditingEnabled
Turns on auditing for the Secure Store Service.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuditlogMaxSize
Specifies the number of days to retain the audit log.
The type must be a valid integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL
authentication.
Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the Secure Store service database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password for the user specified in DatabaseUserName. Use this parameter only if SQL authentication
is used to access the metadata service application database.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the user name to use for connecting to the database for the Secure Store service application. Use this
parameter only if SQL authentication is used to access the service application database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
Specifies if the upgrade process is to be deferred and manually completed.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host server for the failover database server.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new Secure Store Service application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionMode
Specifies that the service application restricts data by subscription ID. This property cannot be changed after the
service application is created.
This property has no effect on SharePoint Server 2019.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Sharing
Specifies that the Secure Store service application is published and shared across the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPSecureStoreServiceApplicationProxy
In ths Article

Creates a new Secure Store Service application proxy in the farm.

Syntax
New-SPSecureStoreServiceApplicationProxy -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup] [-Name <String>] [-WhatIf]
[<CommonParameters>]

New-SPSecureStoreServiceApplicationProxy -Uri <Uri> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-DefaultProxyGroup] [-Name <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The New-SPSecureStoreServiceApplicationProxy cmdlet creates a new Secure Store Service application proxy for a
Secure Store Service application in the farm.
The New-SPSecureStoreServiceApplicationProxy cmdlet does not specify whether the service application proxy is
partitioned or not. If you want to specify a partitioned service application proxy, a partitioned service application
can be created by using the New-SPSecureStoreServiceApplication cmdlet. The result of the
New-SPSecureStoreServiceApplication cmdlet can be passed to the New-SPSecureStoreServiceApplicationProxy
cmdlet. Similarly, if you want to specify an unpartitioned service application proxy, an unpartitioned service
application can be created by using the New-SPSecureStoreServiceApplication cmdlet. The result of the
New-SPSecureStoreServiceApplication cmdlet can be passed to the New-SPSecureStoreServiceApplicationProxy
cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$sa = New-SPSecureStoreServiceApplication -ApplicationPool 'SharePoint Web Services Default' -


AuditingEnabled:$false -DatabaseName 'Secure Store' -Name 'Secure Store Service Application'
New-SPSecureStoreServiceApplicationProxy -Name 'Secure Store Service Application Proxy' -ServiceApplication $sa

This example creates a new Secure Store Service application and proxy.
------------------EXAMPLE 2------------------

$nameofproxy = "Connection to: HostedSecureStoreInParentFarm"


$proxy = Get-SPServiceApplicationProxy | where {$_ -match $nameofproxy}
$prop = $proxy.Properties
$type = $prop["Microsoft.Office.Server.Utilities.SPPartitionOptions"].GetType()
$partition = [enum]::Parse( $type, 1 )
$prop["Microsoft.Office.Server.Utilities.SPPartitionOptions"] = $partition
$proxy.Update()

This example converts an unpartitioned secure store service application proxy in the child to a partitioned one.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the service application proxy be added to the farm's default proxy group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new service application proxy to create.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the local Secure Store Service application associated with the new proxy.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Uri
Specifies the URI of a remote Secure Store Service application associated with the new proxy.
The type must be a valid URI, in the form file:\\server_name\sitedocs.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPSecureStoreTargetApplication
In ths Article

Creates a new Secure Store target application.

Syntax
New-SPSecureStoreTargetApplication -ApplicationType <TargetApplicationType> -FriendlyName <String>
-Name <String> [-AssignmentCollection <SPAssignmentCollection>] [-ContactEmail <String>]
[-SetCredentialsUri <Uri>] [-TimeoutInMinutes <Int32>] [<CommonParameters>]

Description
The New-SPSecureStoreTargetApplication cmdlet creates a new Secure Store Target application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

New-SPSecureStoreTargetApplication -Name "ContosoTargetApplication" -FriendlyName "Contoso Target Application"


-ApplicationType Group

This example creates a new group type target application with the given name and friendly display name.

Parameters
-ApplicationType
Specifies the type of target application.
The type must be one of the following: Individual, Group, IndividualWithTicketing, GroupWithTicketing,
RestrictedIndividual, or RestrictedGroup.

Type: TargetApplicationType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ContactEmail
Specifies the contact information for the target application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FriendlyName
Specifies the name of the new target application.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the display name of the new target application.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SetCredentialsUri
Specifies the URI for setting the user application credentials.
The type must be a valid URI, in the form file:\\server_name\sitedocs.
Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeoutInMinutes
The time, in minutes, a ticket is valid if it is not redeemed by the target application. Make sure that the ticket time-
out value is long enough to last between the time when the ticket is issued to the time that it is redeemed The
default value is 2.
The type must be a valid integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPServiceApplicationPool
In ths Article

Creates a new Web service application pool.

Syntax
New-SPServiceApplicationPool [-Name] <String> [-Account] <SPProcessAccountPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The New-SPServiceApplicationPool cmdlet creates a new Web service application pool in Internet Information
Services (IIS ).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-----------------------

New-SPServiceApplicationPool -Name 'SharePoint Web Services Default' -Account (Get-SPManagedAccount


'contoso\serviceAccount')

This example creates a new Web service application pool.


For the Account parameter, the name of a managed account in the farm can be given. Use the
Get-SPManagedAccount cmdlet to view the existing managed account in the farm. Also, a process account from the
output of the Get-SPProcessAccount cmdlet can be used.

Parameters
-Account
Specifies the credentials that will be the identity of the new application pool.

Type: SPProcessAccountPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new Web service application pool.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPServiceApplicationProxyGroup
In ths Article

Creates a new service application proxy group.

Syntax
New-SPServiceApplicationProxyGroup [-Name] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
The New-SPServiceApplicationProxyGroup cmdlet creates a new service application proxy group specified by the
Name parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

New-SPServiceApplicationProxyGroup -Name RemoteProxyGroup

This example creates a new service application proxy with the name RemoteProxyGroup.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new service application proxy group.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPSite
In ths Article

Creates a new site collection at the specified URL.

Syntax
New-SPSite [-Url] <String> -OwnerAlias <SPUserPipeBind> [-AdministrationSiteType <SPAdministrationSiteType>]
[-AssignmentCollection <SPAssignmentCollection>] [-CompatibilityLevel <Int32>] [-Confirm]
[-ContentDatabase <SPContentDatabasePipeBind>] [-Description <String>]
[-HostHeaderWebApplication <SPWebApplicationPipeBind>] [-Language <UInt32>] [-Name <String>]
[-OverrideCompatibilityRestriction] [-OwnerEmail <String>] [-QuotaTemplate <SPQuotaTemplatePipeBind>]
[-SecondaryEmail <String>] [-SecondaryOwnerAlias <SPUserPipeBind>]
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [-Template <SPWebTemplatePipeBind>] [-WhatIf]
[-CreateFromSiteMaster] [<CommonParameters>]

Description
The New-SPSite cmdlet creates a new site collection with the URL and owner that the Url and OwnerAlias
parameters. This cmdlet can create site collections in either the SharePoint Server mode which uses the legacy
versions of templates and features, or can be created in SharePoint Server mode which uses the new versions of
templates and features.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

New-SPSite https://webApp/sites/test -OwnerAlias "DOMAIN\JDoe" -Language 1033 -Template STS#0

This example creates an English site collection at https://<site name>/sites/test that is owned by user
DOMAIN\Jdow.
------------------EXAMPLE 2-----------------------

$w = Get-SPWebApplication https://webApp
New-SPSite https://www.contoso.com -OwnerAlias "DOMAIN\jdow" -HostHeaderWebApplication $w -Name "Contoso" -
Template STS#0

This example creates a host-named site collection. Because the template is provided, the root web of this site
collection will be created.
------------------EXAMPLE 3-----------------------
Get-SPWebTemplate | Where{ $_.Title -eq "Team Site" } | ForEach-Object{ New-SPSite https://

This example creates a site collection by using the "Team Site" Web template.
------------------EXAMPLE 4-----------------------

New-SPSite -URL https://webApp/sites/testsite -OwnerAlias "DOMAIN\JDow" -Language 1033 -CompatibilityLevel 14 -


Template STS#0

This example creates an English 14 mode site collection by using the Team site template at https://<site
name>/sites/testsite that is owned by user DOMAIN\Jdow

Parameters
-AdministrationSiteType
Specifies the site type.
Valid values are None or TentantAdministration.

Type: SPAdministrationSiteType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object.
This value sets the initial CompatibilityLevel value for the site collection.
When this parameter is not specified, the CompatibilityLevel will default to the highest possible version for the web
application depending on the SiteCreationMode setting.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the name or GUID of the content database in which to create the new site. If no content database is
specified, the site collection is selected automatically.
The type must be a valid database name in the form, SiteContent1212, or a GUID in the form, 1234-5678-9807.

Type: SPContentDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CreateFromSiteMaster
Specifies whether to create a new site using the Site Master.
The valid values are True or False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Describes the new site.
If no value is specified, the value is left blank.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostHeaderWebApplication
Specifies that if the URL provided is to be a host-named site collection, the HostHeaderWebApplication parameter
must be the name, URL, GUID, or SPWebApplication object for the web application in which this site collection is
created.
If no value is specified, the value is left blank.
The type must be a valid name in one of the following forms:
--A WebApplication
--A URL (for example, https://server_name)
--A GUID (for example, 1234-5678-9876-0987)

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Language
Specifies the language ID for the new site collection.
If no language is specified, the site collection is created with the same language that was specified when the
product was installed.
This must be a valid language identifier (LCID ).

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the title of the new site collection.
If no name is specified, the default name is applied.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-OverrideCompatibilityRestriction
Specifies whether to use compatibility restriction for site.
The valid values are True or False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OwnerAlias
Specifies the user login name of the site owner.
The type must be a valid user alias, in the form, Domain\username.

Type: SPUserPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OwnerEmail
Specifies the email address of site owner. If no value is specified, the value is left blank.
The type must be a email address in the form, someone@example.com.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QuotaTemplate
Specifies the quota template for the new site.The template must exist already.
If no template is specified, no quota is applied.

Type: SPQuotaTemplatePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryEmail
Specifies the email address of the secondary site owner. If no value is specified, the value is left blank.
The type must be a email address, in the form, someone@example.com.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryOwnerAlias
Specifies the user login credentials of the secondary site owner.
If no value is specified, the value is left blank.
The type must be a valid user alias, in the form, Domain\username.

Type: SPUserPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the Site Group to get site collections.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the Web template for the root web of the new site collection.
The template must be already installed.
If no template is specified, no template is provisioned.

Type: SPWebTemplatePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL that the new site collection uses.
If the URL is not a host header site, the URL must start with the web application URL.
Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPSiteMaster
In ths Article

Creates a site master.

Syntax
New-SPSiteMaster [-ContentDatabase] <SPContentDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-CompatibilityLevel <Int32>] [-Confirm] [-Language <UInt32>]
-Template <SPWebTemplatePipeBind> [-WhatIf] [<CommonParameters>]

Description
Use the New -SPSiteMaster cmdlet to create a site master information in the farm.

Examples
------------------EXAMPLE-----------------------

New-SPSiteMaster -ContentDatabase WSS_Content -Template STS#0

This example creates a site master in the database WSS_Content.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial
CompatibilityLevel value for the site collection.
When this parameter is not specified, the CompatibilityLevel will default to the highest possible version for the web
application depending on the SiteCreationMode setting.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the name of the database to create the site master in. For example, WSS_Content.

Type: SPContentDatabasePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Language
Specifies the locale ID to use. For example, use 1033 for English.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the name of the template.
The values are the following:
-- SPSPERS#2
-- SPSPERS#6
-- SPSPERS#7
-- SPSPERS#8
-- SPSPERS#9
-- SPSPERS#10
-- STS#0

Type: SPWebTemplatePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPContentDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

New-SPSiteSubscription
In ths Article

Creates a new site subscription.

Syntax
New-SPSiteSubscription [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The New-SPSiteSubscription cmdlet creates a new subscription to which the SPSites object can belong. Sites that
are members of a site subscription can share settings and configuration information. A site collection can be a
member of only one site subscription and once set, cannot be changed.
Site subscriptions are not persisted in a database until used in conjunction with either an SPSite or the Site
Subscription Settings Service. After a site subscription is applied to any site collection in the farm, the site
subscription can be retrieved by using the Get-SPSiteSubscription cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

$subscription = New-SPSiteSubscription

This example creates a new site subscription.


------------------EXAMPLE 2-----------------------

$subscription = New-SPSiteSubscription
Set-SPSite -Identity https://siteUrl -SiteSubscription $subscription

This example creates a new Site Subscription and sets it on the site collection https://siteUrl.
------------------EXAMPLE 3-----------------------

New-SPSite -URL https://siteUrl -OwnerAlias "DOMAIN\JDow" -Language 1033 -SiteSubscription (New-


SPSiteSubscription)

This example creates a new Site Collection at https://siteUrl along with a new Site Subscription.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

New-SPSiteSubscriptionFeaturePack
In ths Article

Creates a new SharePoint Feature set that can be used to limit the features available to a site subscription.

Syntax
New-SPSiteSubscriptionFeaturePack [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the New-SPSiteSubscriptionFeaturePack cmdlet to create a new SharePoint Feature set that limits the Features
available to a specified site subscription.
SharePoint Feature sets are on an Allow List of SharePoint Features that can be associated with any site
subscription. If a Feature set is assigned to a site subscription, only SPFeatures objects in that Feature set are
available for use on the site collections and Webs that are members of the site subscription. Feature sets contain a
list of the GUIDs of each Feature that is on an Allow List for associated site subscriptions.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

$fs = New-SPSiteSubscriptionFeaturePack

This example creates a new SharePoint Feature Pack and stores it in a variable.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPStateServiceApplication
In ths Article

Creates a new state service application.

Syntax
New-SPStateServiceApplication [-Name] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Database <SPStateDatabasePipeBind>] [<CommonParameters>]

Description
The New-SPStateServiceApplication cmdlet creates a new state service application on the farm. A state service
application is the container for state service databases.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

$db = New-SPStateServiceDatabase -Name 'StateSvcDB1'


New-SPStateServiceApplication -Name 'State Service' -Database $db

This example creates a new state service database and a state service application associated with the database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Database
Specifies the state service database that is associated with the new service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a state
database (for example, StateSvcDB1); or an instance of a valid SPStateServiceDatabase object.

Type: SPStateDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the new service application.
The type must be a valid name of a service application; for example, StateSvcApp1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

New-SPStateServiceApplicationProxy
In ths Article

Creates a proxy for a state service application.

Syntax
New-SPStateServiceApplicationProxy [-ServiceApplication] <SPStateServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-DefaultProxyGroup] [-Name <String>] [<CommonParameters>]

Description
The New-SPStateServiceApplicationProxy cmdlet creates a proxy for a state service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-------------------

$db = New-SPStateServiceDatabase -Name 'State Service'


$sa = New-SPStateServiceApplication -Name 'State Service' -Database $db
New-SPStateServiceApplicationProxy -Name 'State Service Proxy' -ServiceApplication $sa -DefaultProxyGroup

This example creates a State Service database and Service Application. It then associates a new State Service Proxy
with the State Service application and adds it to the Default proxy group.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the service application proxy is added to the farm's default proxy group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the display name of the new proxy.
The type must be a valid name of a SQL Server database; for example, SessionStateDB1. Service application proxy;
for example, StateSvcAppProxy1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the state service application to associate with the new proxy.
The type must be a valid name of a state service application (for example, StateServiceApp1); a valid GUID, in the
form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPStateServiceApplication object.

Type: SPStateServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

New-SPStateServiceDatabase
In ths Article

Creates and provisions a new state service database and installs the state database schema into it.

Syntax
New-SPStateServiceDatabase [-Name] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-DatabaseCredentials <PSCredential>] [-DatabaseServer <String>]
[-ServiceApplication <SPStateServiceApplicationPipeBind>] [-Weight <Int32>] [<CommonParameters>]

Description
The New-SPStateServiceDatabase cmdlet creates and a new state service database. This cmdlet installs the session
state database schema in the state service database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

New-SPStateServiceDatabase -Name 'State Service'

This example creates a new state service database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-DatabaseCredentials
Specifies the database credentials for SQL Authentication used to access the state service database. If this
parameter is not specified, Windows authentication is used.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the state service database.
The type must be a valid SQL Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name for the state service database that is stored in SQL Server.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the state service application to add the state database to.
The type must be a valid name of a state service application (for example, StateServiceApp1); a valid GUID, in the
form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPStateServiceApplication object.

Type: SPStateServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Weight
Specifies the weight for the state database. The default value is 1.
This parameter is used when new rows of data are allocated among the collection of databases that are associated
with a service application
The type must be a valid integer in the range of 1 to 10.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPSubscriptionSettingsServiceApplication
In ths Article

Creates a new subscription settings service application.

Syntax
New-SPSubscriptionSettingsServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseCredentials <PSCredential>]
[-DatabaseName <String>] [-DatabaseServer <String>] [-FailoverDatabaseServer <String>] [-Name <String>]
[-WhatIf] [-DeferUpgradeActions] [<CommonParameters>]

Description
Use the New-SPSubscriptionSettingsServiceApplication cmdlet to create a subscription settings service application
that can be used to store settings that are shared across all site collections in a single site subscription. This cmdlet
is used only in an environment where site subscriptions are used to delegate administration or partition services
that are used for storing settings that are shared across all site collections in a single site subscription. This cmdlet
is used only in an environment where site subscriptions are used to delegate administration or partition services.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE---------------

$sa = New-SPSubscriptionSettingsServiceApplication -ApplicationPool 'SharePoint Web Services Default' -Name


'Subscriptions Settings Service Application' -DatabaseName 'Subscription'
New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $sa

This example creates a Subscriptions Settings Service application.

Parameters
-ApplicationPool
Specifies the IIS application pool to use for the new subscription settings application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.
Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL Server
Authentication.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the subscription settings database.
If not provided, one will be generated.
The type must be a valid name of a SQL Server database; for example, SubscriptionSettingsApp1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host SQL Server instance for the database specified in the DatabaseName parameter. If
not provided, the default database server will be used.
The type must be a valid SQL Server instance name; for example, SQLServerHost1.
The type must be a valid name of a SQL Server database; for example, SubscriptionSettingsApp1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
Specifies if the upgrade process is to be deferred and manually completed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host SQL Server instance for the failover database server.
The type must be a valid SQL Server instance name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the friendly name of the new subscription settings service.
The type must be a valid name of a subscription settings service application; for example,
SubscriptionSettingsApp1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPSubscriptionSettingsServiceApplicationProxy
In ths Article

Creates an application proxy to a subscription settings service application.

Syntax
New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

New-SPSubscriptionSettingsServiceApplicationProxy -Uri <String>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the New-SPSubscriptionSettingsServiceApplicationProxy cmdlet to create an application proxy to a subscription
settings service application. This is required for the local farm to consume a subscription settings service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------------

$sa = New-SPSubscriptionSettingsServiceApplication -ApplicationPool 'SharePoint Web Services Default' -Name


'Subscriptions Settings Service Application' -DatabaseName 'Subscription'
New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $sa

This example creates a new Subscription Settings Service application and proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the subscription settings service application associated with the new proxy.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription settings service application (for example, SubscriptionSettingsApp1); or an instance of a valid
SPServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Uri
Specifies the address of the subscription settings service application to associate the new application proxy with.
The type must be a valid URI, in the form file:\\server_name\sitedocs.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPTranslationServiceApplication
In ths Article

Provisions a new instance of the Machine Translation service.

Syntax
New-SPTranslationServiceApplication [-Name] <String> -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseCredential <PSCredential>]
[-DatabaseName <String>] [-DatabaseServer <String>] [-Default] [-FailoverDatabaseServer <String>]
[-PartitionMode] [-WhatIf] [-DeferUpgradeActions] [<CommonParameters>]

Description
Use the New-SPTranslationServiceApplication cmdlet to provision a new instance of the Machine Translation
service on the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE---------------

New-SPTranslationServiceApplication -Name TranslationService -ApplicationPool 'SharePoint Web Services Default'


-DatabaseServer Server1 -DatabaseName TranslationServiceDatabase

This example creates a Machine Translation service application named TranslationService which will run in the
SharePoint Web Services Default service application pool. The database will be called TranslationServiceDatabase
and will be hosted on the Server1 SQL server instance.

Parameters
-ApplicationPool
Specifies the managed application pool that the instance of Translation Service will run in.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredential
Specifies the SQL Server credentials used for this Translation Service instance. This parameter to be used only
used for SQL authentication; if not present, Windows authentication is used instead.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the database name which is to be used for this Translation Service instance.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the database server which is to be used for this Translation Service instance.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Default
Determines whether or not the proxy for this service application should be added to the default proxy group for
this Web application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
Specifies if the upgrade process is to be deferred and manually completed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the SQL server instance that will be used as a backup to the primary SQL Server instance.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the unique identifier of Translation Service instance to be created.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-PartitionMode
Restricts this service to behave uniquely on a partitioned set of site collections. This cannot be changed after the
application is provisioned.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPTranslationServiceApplication
New -SPTranslationServiceApplicationProxy
Set-SPTranslationServiceApplicationProxy
minutes to read • Edit Online

New-SPTranslationServiceApplicationProxy
In ths Article

Creates a Machine Translation Service application proxy on the local farm.

Syntax
New-SPTranslationServiceApplicationProxy -Name <String>
-ServiceApplication <TranslationServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DefaultProxyGroup] [-PartitionMode] [-WhatIf] [<CommonParameters>]

New-SPTranslationServiceApplicationProxy -Name <String> -Uri <String>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup] [-PartitionMode] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The New-SPTranslationServiceApplicationProxy cmdlet creates a Machine Translation Service application proxy on
the local farm. The proxy is added to the default proxy group for the local farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE---------

$sa = New-SPTranslationServiceApplication -Name TranslationService -ApplicationPool 'SharePoint Web Services


Default' -DatabaseServer Server1 -DatabaseName TranslationServiceDatabase
New-SPTranslationServiceApplicationProxy -Name TranslationServiceProxy -ServiceApplication $sa -
DefaultProxyGroup

This example creates a Machine Translation Service application and proxy in the default proxy group named
TranslationServiceProxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the Machine Translation Service application proxy be added to the default proxy group for the local
farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the display name for the new Machine Translation Service application. The name that you use must be a
unique name of a Machine Translation Service application in this farm. The name can be a maximum of 128
characters.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionMode
Specifies that the service application restrict data by site group. After the PartitionMode parameter is set and the
service application is created, it cannot be changed.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the local Machine Translation Service application that is associated with the new proxy.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Machine
Translation Service application (for example, MachTrans1); or an instance of a valid SPServiceApplication object.

Type: TranslationServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Uri
Specifies the URI of the remote machine translation service application this proxy should communicate with. This
value is required only if you plan to connect a Machine Translation Service application from a remote farm.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPTranslationServiceApplication
Set-SPTranslationServiceApplication
Set-SPTranslationServiceApplicationProxy
minutes to read • Edit Online

New-SPTrustedIdentityTokenIssuer
In ths Article

Creates an identity provider in the farm.

Syntax
New-SPTrustedIdentityTokenIssuer -ClaimsMappings <SPClaimMappingPipeBind[]> -Description <String>
-IdentifierClaim <String> -Name <String> -Realm <String> -SignInUrl <String>
[-AssignmentCollection <SPAssignmentCollection>] [-ClaimProvider <SPClaimProviderPipeBind>]
[-ImportTrustCertificate <X509Certificate2>] [-UseWReply] [-Confirm] [-RegisteredIssuerName <String>]
[-SignOutUrl <String>] [-WhatIf] [<CommonParameters>]

New-SPTrustedIdentityTokenIssuer -ClaimsMappings <SPClaimMappingPipeBind[]> -Description <String>


-IdentifierClaim <String> -Name <String> -Realm <String> -SignInUrl <String>
[-AssignmentCollection <SPAssignmentCollection>] [-ClaimProvider <SPClaimProviderPipeBind>]
-MetadataEndPoint <Uri> [-UseWReply] [-Confirm] [-SignOutUrl <String>] [-WhatIf] [<CommonParameters>]

New-SPTrustedIdentityTokenIssuer -Description <String> -Name <String> -Realm <String> -SignInUrl <String>


[-AssignmentCollection <SPAssignmentCollection>] [-ImportTrustCertificate <X509Certificate2>] [-UseWReply]
[-Confirm] [-IdentifierClaimIs <String>] [-RegisteredIssuerName <String>] [-SignOutUrl <String>]
[-UseDefaultConfiguration] [-WhatIf] [<CommonParameters>]

Description
The New-SPTrustedIdentityTokenIssuer cmdlet creates an identity provider in the farm. This object is created and
used only for setting this type of identity provider in a Web application. The specified claim type cannot be NTLM,
Classic NTLM, Negotiate, or Classic Negotiate. For ASP.NET Membership provider or Role providers, no objects
are persisted. For security token service (STS ) identity providers, this cmdlet creates and persists the identity
provider object in the SPFarm object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------- EXAMPLE---------------------------

New-SPTrustedIdentityTokenIssuer -Name "LiveIDSTS" - Description "LiveID STS" -Certificate (Get-ChildItem


"cert:Certificates (LocalComputer)\Personal\Certificates -Name "LiveID Cert") -SignInUrl
https://int.contoso.com/ -IdentifierClaim "http://schemas.contoso.com/2007/05/Claims/Puid"

This example creates a new identity provider in the farm named LiveIDSTS.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClaimProvider
Specifies the IP STS that can resolve and search claims for claims people picker.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of identity
provider (for example, MyIDprovider1); or an instance of a valid SPIdentityProvider object.

Type: SPClaimProviderPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClaimsMappings
Specifies the mapping of the claims from the original token to the SharePoint token.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a claim
mapping rule (for example, Email); or an instance of a valid SPClaimMapping object.

Type: SPClaimMappingPipeBind[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the new identity provider.
The type must be a valid string; for example, LiveID STS.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IdentifierClaim
Specifies which claim type from the trusted STS will be used for the new identity provider.
The type must be a valid claim type from the trusted STS; for example,
http://schemas.microsoft.com/2007/05/Claims/Puid.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IdentifierClaimIs
Specifies which of the default mapped claims should be used as the identifier claim.
Only used if the UseDefaultConfiguration parameter is set to true, otherwise use the IdentifierClaim parameter.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ImportTrustCertificate
Specifies the X.509 certificate object from trusted authentication provider farm.
The type must be a name of a valid X.509 certificate; for example, Certificate1.

Type: X509Certificate2
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MetadataEndPoint
Specifies the URI for the metadata endpoint of the trusted provider.
Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new identity provider.
The type must be a valid name of an identity provider; for example, LiveIDSTS.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Realm
Specifies the realm, or resource partition, associated with this trust.
The type must be a name of a valid realm; for example, MD_REALM.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegisteredIssuerName
Specifies the Registered Issuer Name instead of not using the metadata endpoint.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignInUrl
Specifies the sign-in URLs for this trusted STS identity provider.
The type must be a valid URL, in the form https://int.live.com/.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignOutUrl
Specifies the sign out URI for the trusted provider. This lets SharePoint to sign the user out from the trusted
provider when they sign out from SharePoint.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseDefaultConfiguration
Specifies if the default set of claim mappings should be used.
If UseDefaultConfiguration parameter is used, then the IdentifierClaimIs parameter must be used.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseWReply
Includes a WReply with the token request.
WReply is a URL at the relying party to which the requestor is redirected once sign-out processing is complete.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPTrustedRootAuthority
In ths Article

Creates a trusted root authority.

Syntax
New-SPTrustedRootAuthority [-Name] <String> -Certificate <X509Certificate2>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

New-SPTrustedRootAuthority [-Name] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


-MetadataEndPoint <Uri> [-WhatIf] [<CommonParameters>]

Description
The New-SPTrustedRootAuthority cmdlet creates a trusted root authority. If a certificate file is used, it must have only
one X509 certificate without private keys, otherwise an exception is raised.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$cert = Get-PfxCertificate C:\LiveIDSigningCert.pfx


New-SPTrustedRootAuthority -Name "WFEFarm1" -Certificate $cert

This example creates a new trusted root authority, WFEFarm1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Certificate
Specifies the X.509 certificate of the trusted root authority.
The value must be a name of a valid X.509 certificate; for example, Certificate1.

Type: X509Certificate2
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MetadataEndPoint
Specifies the Uri of the metadata endpoint.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the trusted root authority to create.
The value must be a valid name of a trusted root authority; for example, WFEFarm1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPTrustedSecurityTokenIssuer
In ths Article

Creates a trust between a server to server principal.

Syntax
New-SPTrustedSecurityTokenIssuer [-Name] <String> -Certificate <X509Certificate2>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>] [-IsTrustBroker]
[-RegisteredIssuerName <String>] [-WhatIf] [<CommonParameters>]

New-SPTrustedSecurityTokenIssuer [-Name] <String> -MetadataEndPoint <Uri>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>] [-IsTrustBroker]
[-RegisteredIssuerName <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the New-SPTrustedSecurityTokenIssuer cmdlet to establish a trust between a server to server principal.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE-----------

New-SPTrustedSecurityTokenIssuer -Name "SPFarmA" -MetadataEndPoint https://mysite/my/_layouts/metadata/test/1/


-isSelfIssuer "false"

This example creates a new trusted security token named SPFarmA.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Certificate
Specifies the X509Certificate object that represents the public key of the signing certificate of the security token
issuer.

Type: X509Certificate2
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the issuer.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsTrustBroker
Specifies whether the trust is established with a self-issuer partner app (that is, Exchange Server or Lync).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MetadataEndPoint
Specifies the URI for the metadata endpoint of the issuer.
Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the issuer.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegisteredIssuerName
Specifies the name of the registered token issuer instead of using metadata endpoint.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPTrustedSecurityTokenIssuer
Remove-SPTrustedSecurityTokenIssuer
Set-SPTrustedSecurityTokenIssuer
minutes to read • Edit Online

New-SPTrustedServiceTokenIssuer
In ths Article

Creates a trust with a SharePoint farm.

Syntax
New-SPTrustedServiceTokenIssuer [-Name] <String> -Certificate <X509Certificate2>
[-AssignmentCollection <SPAssignmentCollection>] [-Description <String>] [-Confirm] [-WhatIf]
[<CommonParameters>]

New-SPTrustedServiceTokenIssuer [-Name] <String> [-AssignmentCollection <SPAssignmentCollection>]


[-Description <String>] [-Confirm] -MetadataEndPoint <Uri> [-WhatIf] [<CommonParameters>]

Description
The New-SPTrustedServiceTokenIssuer cmdlet creates a trust with a SharePoint farm. If a certificate file is used, it
must have only one X509 certificate without private keys, otherwise an exception is raised.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$cert = Get-PfxCertificate C:\LiveIDSigningCert.pfx


New-SPTrustedServiceTokenIssuer -Name "WFEFarm1" -Description "WFE Farm 1" -Certificate $cert

This example shows how to create a new SharePoint Farm trust using the trust certificate from a file.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Certificate
The type must be a name of a valid X.509 certificate; for example, Certificate1.
Specifies the X.509 certificate object from trusted authentication provider farm.

Type: X509Certificate2
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the trust.
The type must be a valid string; for example, WFE Farm Trust1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MetadataEndPoint
Specifies the URI for the metadata endpoint of the trusted provider.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the trust.
The type must be a valid name of a trusted service issuer; for example, WFEFarmTrust1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPUsageApplication
In ths Article

Creates a new usage application.

Syntax
New-SPUsageApplication [[-Name] <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DatabaseName <String>] [-DatabasePassword <SecureString>] [-DatabaseServer <String>]
[-DatabaseUsername <String>] [-FailoverDatabaseServer <String>] [-UsageService <SPUsageServicePipeBind>]
[-WhatIf] [<CommonParameters>]

Description
The New-SPUsageApplication cmdlet creates a new usage application in the local farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE-------------------------

New-SPUsageApplication -Name "Usage Application For Farm ABC"

This example creates a new usage application for the specified name.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the logging database. If the logging database does not exist, a logging database is
automatically created.
The type must be a valid name of a SQL Server database; for example, UsageLogDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password for the user specified in DatabaseUserName. Use this parameter only if SQL Server
Authentication is used to access the logging database.
The type must be a valid password.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the SPServer object where the logging database is created.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; the IP address of a server
computer, in the form 208.77.188.166; a valid name of a SQL Server host service (for example, SQLServerHost1);
or an instance of a valid SPServer object.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the user name to use for connecting to the logging database. Use this parameter only if SQL Server
Authentication is used to access the logging database.
The type must be a valid user name; for example, UserName1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host SQL Server instance for the failover database server.
The type must be a valid SQL Server instance name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the friendly name of the new usage application.
The type must be a valid name of a usage application; for example, UsageApplication1.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UsageService
Filters to return the usage application with the specified parent SPUsageService object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage
service (for example, UsageService1); or an instance of a valid SPUsageService object.

Type: SPUsageServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPUsageLogFile
In ths Article

Starts a new usage log file on the current server computer.

Syntax
New-SPUsageLogFile [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The New-SPUsageLogFile cmdlet starts a new usage log file on the current server computer. The usage data in
memory is flushed to the current usage log file before the new log file is created.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE-------------------

New-SPUsageLogFile

This example terminates the current usage log file and creates a new one.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

New-SPUser
In ths Article

Adds an existing user to a SharePoint site with the designated permissions.

Syntax
New-SPUser [-UserAlias] <String> -Web <SPWebPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DisplayName <String>] [-Email <String>] [-Group <SPGroupPipeBind>] [-PermissionLevel <String[]>]
[-SiteCollectionAdmin] [-WhatIf] [<CommonParameters>]

Description
The New-SPUser cmdlet adds an existing user to a SharePoint web site with the designated permissions. This user
has the given permissions in all subsites that inherit permissions. The user account must already exist in the user
directory.
If your environment is in Active Directory mode, the user must already exist in Active Directory Domain Services
(AD DS ) and only the UserAlias parameter is required; all other fields are pulled from AD DS. If only an alias is
given and the farm is in Active Directory Account Create mode, the Email parameter is also required.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1----------------------

New-SPUser -UserAlias 'Contoso\Jdow'-DisplayName 'Jane Dow' -Web https://contoso.com

This example adds a new user named Jane Dow to the Contoso domain.
------------------EXAMPLE 2----------------------

Get-SPWeb https://sitename | New-SPUser -UserAlias Contoso\Jdow

This example adds Contoso\Jdow to all webs in the https://sitename site collection. Because this site collection uses
inherited permissions, only the top-level web site needs to be touched.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies a string that contains the display name of the user.
The type must be a valid user name; for example, Joe.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email
Specifies the email address of the new user.
The type must be a valid email address, in the form someone@contoso.com.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Group
Specifies the user group to which the new user belongs.
Type: SPGroupPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PermissionLevel
Adds a user to a permission level.
The type must be a valid permission level for the web application; for example, Full Control, Read, Contribute, or
All.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollectionAdmin
Specifies whether to add the user as an administrator to the site collection.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAlias
Specifies the user alias from Active Directory Domain Services (AD DS ).

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Web
Specifies the URL or GUID of the web on which to create this user.
The type must be a valid URL, in the form https://server_name, or a GUID, in the form 1234-5678-9876-0987.

Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPUserLicenseMapping
In ths Article

Creates a license mapping object.

Syntax
New-SPUserLicenseMapping -Claim <SPClaim> -License <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

New-SPUserLicenseMapping -ClaimType <String> -License <String> -OriginalIssuer <String> -Value <String>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-ValueType <String>]
[-WebApplication <SPWebApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

New-SPUserLicenseMapping -License <String> -Role <String> -RoleProviderName <String>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WebApplication <SPWebApplicationPipeBind>]
[-WhatIf] [<CommonParameters>]

New-SPUserLicenseMapping -License <String> -SecurityGroup <String>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WebApplication <SPWebApplicationPipeBind>]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the New-SPUserLicenseMapping cmdlet to create a new license mapping object. This cmdlet must be used first
before the Add-SPUserLicenseMapping cmdlet can be used.
The object created by using the New-SPUserLicenseMapping cmdlet is stored in memory and is not written to any
database in SharePoint Server. After the object is created you can pipe the result to the Add-SPUserLicenseMapping
cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------- EXAMPLE---------------------------)

$a = New-SPUserLicenseMapping -SecurityGroup EntSecGroup -License Enterprise


$a | Add-SPUserLicenseMapping
This example creates a license mapping object for the Active Directory secured group named 'EntSecGroup' and
then pipes the result to the Add-SPUserLicenseMapping cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Claim
Specifies the claims principal to license. The value must be an authentic claims principal.

Type: SPClaim
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClaimType
Specifies the type of the claim. The value must be an authentic name of a claim type.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-License
Specifies the name of a supported SharePoint user license. For the full list of supported licenses on a SharePoint
farm, see the Get-SPUserLicense cmdlet.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OriginalIssuer
Specifies the original issuer of the claim. The value must be the authentic name of an original issuer.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Role
Specifies the name of a forms-based role. The value must be an authentic name of a forms-based role.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RoleProviderName
Specifies the name of a role provider. The value must be an authentic name of a role provider.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecurityGroup
Specifies the name of an AD DS security group. The value must be a name of an Active Directory security group.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Value
Specifies the value of the claim. The value must be an authentic claim value.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ValueType
Specifies the value type of the claim. The value must be an authentic name of a claim value type.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the URL, GUID, web application name, or web application object instance where the mapping is to be
added. If you omit this parameter, the mapping is applied to the entire farm.
The type must be an URL in the form http://server_name or http://server_name/sites/sitename, a GUID (for
example, 12345678-90ab-cdef-1234-567890bcdefgh), a name of a web application (for example, SharePoint - 80),
or an instance of a web application object.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPUserLicenseMapping
Get-SPUserLicenseMapping
Remove-SPUserLicenseMapping
minutes to read • Edit Online

New-SPUserSettingsProvider
In ths Article

Adds a new User Settings Provider.

Syntax
New-SPUserSettingsProvider -AssemblyName <String> -DisplayName <String> -Type <String>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the New-SPUserSettingsProvider cmdlet to add a new User Settings Provider to the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------- EXAMPLE---------------------------

New-SPUserSettingsProvider -DisplayName "My User Settings Provider" -AssemblyName MyProvider.dll -Type


MyProvider

This example adds a user setting provider with a display name of "My User Settings Provider" which uses the
MyProvider.dll file.

Parameters
-AssemblyName
Specifies the assembly name for the provider.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DisplayName
Specifies the display name to use for this provider.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the type name to use for this provider.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPUserSettingsProvider
Remove-SPUserSettingsProvider
Get-SPUserSettingsProviderManager
minutes to read • Edit Online

New-SPUserSolutionAllowList
In ths Article

Creates a user managed solutions gallery.

Syntax
New-SPUserSolutionAllowList [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] -ListTitle <String>
-Site <SPSitePipeBind> [-WhatIf] [<CommonParameters>]

Description
Creates a user managed solutions gallery.

Examples
----------------------- EXAMPLE---------------------------

New-SPUserSolutionAllowList -Site https://contoso/sites/site1 -ListTitle "Allow List"

This example creates a user managed solutions gallery named "Allow List" under the root web of the site collection
at https://contoso/sites/site1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ListTitle
Specifies the title of the user solution allow list to create.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the site collection where the user solution allow list will be created.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

New-SPVisioSafeDataProvider
In ths Article

Adds a new data provider to a Visio Services application.

Syntax
New-SPVisioSafeDataProvider -DataProviderId <String> -DataProviderType <Int32>
-VisioServiceApplication <SPVisioServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Description <String>] [<CommonParameters>]

Description
The New-SPVisioSafeDataProvider cmdlet adds a new data provider to the list of safe data providers for a Visio
Services application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE------------------------

New-SPVisioSafeDataProvider -VisioServiceApplication "VGS1" -DataProviderID "CustomProvider" -DataProviderType


5 -Description "Custom Data Provider"

This example creates a new safe data provider for a specified Visio Services application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataProviderId
Specifies the name of the data provider to create. The combination of DataProviderID and DataProviderType
uniquely identify a data provider for a Visio Services application. The string that identifies the data provider can be
a maximum of 255 alphanumeric characters.
The type must be a valid string that identifies the data provider; for example, VisioDataProvider1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataProviderType
The type must be a valid identity of a data provider type.
Specifies the supported type of the data provider to add. Custom data types are supported; for example, Excel
Services.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the new safe data provider.
The type must be a string with a maximum of 4096 characters.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VisioServiceApplication
Specifies the Visio Services application in which to add the new safe data provider.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.
Type: SPVisioServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

New-SPVisioServiceApplication
In ths Article

Adds a new Visio Services application to a farm.

Syntax
New-SPVisioServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-AddToDefaultGroup]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Name <String>] [-WhatIf] [<CommonParameters>]

Description
The New-SPVisioServiceApplication cmdlet adds a new Visio Services application to a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE 1---------------------

New-SPVisioServiceApplication -Identity 'Visio Graphics Service Application' -ApplicationPool 'SharePoint Web


Services Default' -CreateDefaultProxy

This example creates a new Visio Services application named 'Visio Graphics Service Application' and also creates
a service application proxy associated with it.

Parameters
-AddToDefaultGroup
Specifies that a default proxy is created for the new Visio Services application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ApplicationPool
Specifies the existing IIS application pool in which to run the Web service for the service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.
Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the Visio Services application to create.
The type must be a valid name of a Visio Service application; for example, MyVisioService1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPVisioServiceApplicationProxy
In ths Article

Adds a new Visio Services application proxy to a farm.

Syntax
New-SPVisioServiceApplicationProxy -ServiceApplication <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Name <String>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The New-SPVisioServiceApplicationProxy cmdlet adds a new Visio Services application proxy to a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE------------------------

$sa = New-SPVisioServiceApplication -Identity 'Visio Graphics Service Application' -ApplicationPool 'SharePoint


Web Services Default'
New-SPVisioServiceApplicationProxy -Identity 'Visio Graphics Service Application Proxy' -ServiceApplication $sa

This example creates a new Visio Services application proxy connected to a Visio Services application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the Visio Services application proxy to create.
The type must be a valid name of a Visio Services application; for example, MyVisioService1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplication
Specifies the Visio Services application that is associated with the application proxy.
The type must be a valid name of a Visio Services application; for example, MyVisioService1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPWeb
In ths Article

Creates a new site in an existing site collection.

Syntax
New-SPWeb [-Url] <String> [-Language <UInt32>] [-Template <SPWebTemplatePipeBind>] [-Name <String>]
[-Description <String>] [-AddToQuickLaunch] [-UniquePermissions] [-AddToTopNav] [-UseParentTopNav]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The New-SPWeb cmdlet creates a new site in the existing site collection specified by the Url parameter. You can
create a site with a specific default language by specifying the Language parameter. If no language is specified, the
site is created with the same language that was specified when the product was installed. You can create a site from
a specific template by specifying the Template parameter. If no template is specified, the site is created and the
template can be provided later or by the first user to log on.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

New-SPWeb https://somesite/subweb1 -Template "STS#0"

This example creates a new subsite by using the Team Site template at the provided URL
(https://somesite/subweb1). The Team Site template is a value referenced as the variable STS#0 for the Template
parameter.

Parameters
-AddToQuickLaunch
Adds this site to the Quick Launch.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AddToTopNav
Adds this site to the top-level navigation bar.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Describes the new site. If no description is specified, the entry is left blank.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Language
Specifies the language template identifier for the new site. If no language is specified, the site is created with the
same language that was specified when the product was installed.
The type must be a valid language identifier (LCID ).
Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the title of the new site. If no title is specified, the default title is applied. The default title is configured for
each template.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the Web template for the new site. The template must already exist. If no template is specified, no
template is applied and a template can be selected later.

Type: SPWebTemplatePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UniquePermissions
Specifies that this site is to be created with unique permissions.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL where the new site is to be created. The URL must be inside an existing site collection. The URL
must be a valid URL, in the form https://server_name/site1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UseParentTopNav
Specifies that the same top-level navigation bar as the parent site is to be used for this site.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPWebApplication
In ths Article

Creates a new Web application within the local farm.

Syntax
New-SPWebApplication -ApplicationPool <String> -Name <String>
[-AdditionalClaimProvider <SPClaimProviderPipeBind[]>] [-AllowAnonymousAccess]
[-ApplicationPoolAccount <SPProcessAccountPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-AuthenticationMethod <String>] [-AuthenticationProvider <SPAuthenticationProviderPipeBind[]>] [-Confirm]
[-DatabaseCredentials <PSCredential>] [-DatabaseName <String>] [-DatabaseServer <String>]
[-HostHeader <String>] [-Path <String>] [-Port <UInt32>] [-SecureSocketsLayer]
[-ServiceApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>]
[-SignInRedirectProvider <SPTrustedIdentityTokenIssuerPipeBind>] [-SignInRedirectURL <String>] [-Url <String>]
[-UserSettingsProvider <SPUserSettingsProviderPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Creates a new Web application specified by the Name parameter. The user specified by the DatabaseCredentials
parameter must be a member of the dbcreator fixed server role on the database server.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

New-SPWebApplication -Name "Contoso Internet Site" -Port 80 -HostHeader sharepoint.contoso.com -URL


"http://www.contoso.com" -ApplicationPool "ContosoAppPool" -ApplicationPoolAccount (Get-SPManagedAccount
"DOMAIN\wa")

This example creates a new Web application by using an internal host header of sharepoint.contoso.com and a
public URL of http://www.contoso.com.
------------------EXAMPLE 2-----------------------

New-SPWebApplication -Name "Contoso Internet Site" -Port 443 -SecureSocketsLayer -HostHeader


sharepoint.contoso.com -URL "https://www.contoso.com:443" -ApplicationPool "ContosoAppPool" -
ApplicationPoolAccount (Get-SPManagedAccount "DOMAIN\wa")

This example creates a new SSL enabled Web application by using an internal host header of
sharepoint.contoso.com and a public URL of https://www.contoso.com.
------------------EXAMPLE 3-----------------------
$ap = New-SPAuthenticationProvider
New-SPWebApplication -Name "Contoso Internet Site" -URL "https://www.contoso.com" -Port 443
-ApplicationPool "ContosoAppPool"
-ApplicationPoolAccount (Get-SPManagedAccount "DOMAIN\wa")
-AuthenticationProvider $ap -SecureSocketsLayer

Creates a Windows Claims web application at the URL https://www.contoso.com using the domain account
domain\wa.

Parameters
-AdditionalClaimProvider
Adds a specific claim provider to the defined Web application.

Type: SPClaimProviderPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowAnonymousAccess
Allows anonymous access to the Web application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies the name of an application pool to use; for example, SharePoint - 1213. If an application pool with the
name provided does not exist, the ApplicationPoolAccount parameter must be provided and a new application pool
will be created. If no value is specified, the default application pool will be used.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPoolAccount
Specifies the user account that this application pool will run as. Use the Get-SPIisWebServicApplicationPool cmdlet
to use a system account.
Type: SPProcessAccountPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationMethod
Uses Kerberos or NTLM to specify the authentication method. If no value is specified, the default NTLM is applied.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthenticationProvider
Specifies the authentication provider or providers that apply to a Web application.

Type: SPAuthenticationProviderPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the Windows PowerShell Credential object for the database user account.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the initial content database for the new Web application.
The type must be a valid database name; for example, ContentDB1. If no value is specified, a value in the format
WSS_Content_<GUID> is auto-generated.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the database server name. The type must be a valid database server name, in the form SQL1; where
named instances are used, the format can appear as server\server. The default SQL server instance is used if a
value is not provided.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostHeader
Specifies a valid URL assigned to the Web application that must correlate to the alternate access mapping
configuration, in the form server_name.
When the HostHeader parameter is present, the value of this field is the internal URL for the Web application. The
Url parameter is used to specify the public URL.If no value is specified, the value is left blank.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new Web application.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path
Specifies the physical directory for the new Web application in the virtual directories folder. The type is a valid path,
in the form C:\Inetpub\wwwroot\MyWebApplication. If no value is specified, the value
%wwwroot%\wss\VirtualDirectories\<portnumber> is applied.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the port on which this Web application can be accessed. This can be any valid port number. If no port is
specified, a nonconflicting port number is automatically generated.
If you specify a port number that has already been assigned, IIS does not start the new site until you change either
the port number of the new site or the port number of the old site.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecureSocketsLayer
Enables Secure Sockets Layer (SSL ) encryption for this Web application. If you choose to use SSL, you must add
the certificate on each server by using the IIS administration tools. Until this is done, the Web application will be
inaccessible from this IIS Web site.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplicationProxyGroup
Specifies a custom service application proxy group for the Web application to use. The Web application will use the
proxies in this proxy group to connect to service applications. If this parameter is not specified, the default proxy
group for the farm is used.

Type: SPServiceApplicationProxyGroupPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignInRedirectProvider
Sets the sign-in redirect URL to point to the URL that is defined in the specified authentication provider.

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignInRedirectURL
Specifies the sign-in redirect URL for the Web application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the load-balanced URL for the Web application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserSettingsProvider
Provides access to external user settings provider.
Type: SPUserSettingsProviderPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPWebApplicationAppDomain
In ths Article

Creates an AppDomain entry.

Syntax
New-SPWebApplicationAppDomain [-AppDomain] <String> -WebApplication <SPWebApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Port <Int32>] [-SecureSocketsLayer] [-WhatIf]
[-Zone <SPUrlZone>] [<CommonParameters>]

Description
Use the New -SPWebApplicationAppDomain cmdlet to create an AppDomain entry. If you specify a port, the
cmdlet adds a port binding to the Internet Information Services (IIS ) site corresponding to the Web
Application/Zone combination.

Examples
------------------EXAMPLE 1-----------------------

New-SPWebApplicationAppDomain -AppDomain contosoapps.com -WebApplication https://www.contoso.com

Creates a new app domain for apps for SharePoint for the specified web application in the default zone.
------------------EXAMPLE 2-----------------------

New-SPWebApplicationAppDomain -AppDomain contosoapps.com -WebApplication https://www.contoso.com -Zone Internet


-Port 10000

Creates a new app domain for apps for SharePoint for the specified web application in the internet zone at port
10000.

Parameters
-AppDomain
Specifies the URI of the app domain.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the IIS port number to which the app domain will be assigned. If no value is specified, the same port used
by the web application for the zone is applied.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecureSocketsLayer
Specifies that the app domain will use Secured Sockets Layer (SSL ) security. If no value is specified, no SSL
security will be used.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the GUID, URI, or name of the web application for which the app domain is being configured.
Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies the security zone to which the app domain will be assigned.
Default
Intranet
Internet
Extranet
Custom
If no value is specified, Default is applied.

Type: SPUrlZone
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
System.String
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Get-SPWebApplicationAppDomain
Remove-SPWebApplicationAppDomain
minutes to read • Edit Online

New-SPWebApplicationExtension
In ths Article

Creates a new zone instance for the Web application.

Syntax
New-SPWebApplicationExtension [-Identity] <SPWebApplicationPipeBind> -Name <String> -Zone <SPUrlZone>
[-AdditionalClaimProvider <SPClaimProviderPipeBind[]>] [-AllowAnonymousAccess]
[-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationMethod <String>]
[-AuthenticationProvider <SPAuthenticationProviderPipeBind[]>] [-Confirm] [-HostHeader <String>]
[-Path <String>] [-Port <UInt32>] [-SecureSocketsLayer]
[-SignInRedirectProvider <SPTrustedIdentityTokenIssuerPipeBind>] [-SignInRedirectURL <String>] [-Url <String>]
[-WhatIf] [<CommonParameters>]

Description
The New-SPWebApplicationExtension cmdlet creates a new zone instance for the Web application. This is also known
as extending a Web application and allows alternate permissions to be configured for the same content that is
available in the existing Web application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Get-SPWebApplication http://sitename | New-SPWebApplicationExtension -Name "ExtranetSite" -SecureSocketsLayer -


Zone "Extranet" -URL "https://extranet.sitename.com"

This example extends the given Web application at http://sitename to the Extranet zone for SSL use.

Parameters
-AdditionalClaimProvider
Adds a specific claim provider to the defined Web application.

Type: SPClaimProviderPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowAnonymousAccess
Allows anonymous access to the Web application zone.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationMethod
Uses Kerberos or NTLM to specify the authentication method.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthenticationProvider
Specifies the authentication provider(s) that applies to a Web apllication.

Type: SPAuthenticationProviderPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostHeader
Specifies a valid URL assigned to the Web application by that must correlate to the alternate access mapping
configuration, in the form http://server_name.
When the HostHeader parameter is present, the value of this field is the internal URL for the Web application. The
Url parameter is used to specify the public URL.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Web application to extend.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the new IIS Web site in the Web application.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path
Specifies the physical directory for the new Web site (in the virtual directories folder). The type is a valid path, in
the form C:\Inetpub\wwwroot\MyWebApplication.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the application port. Can be any valid port number.
If no port is specified, a nonconflicting port number is automatically generated.
If you specify a port number that is already assigned, IIS does not start the new site until you change either the
port number of the new site or the port number of the old site.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecureSocketsLayer
Enables Secure Sockets Layer (SSL ) encryption for this Web application. If you use SSL, you must add the
certificate on each server by using the IIS administration tools. Until this is done, the Web application is
inaccessible from this IIS Web site.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignInRedirectProvider
Sets the sign-in redirect URL to point to the URL that is defined in the specified authentication provider.

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignInRedirectURL
Specifies the sign-in redirect URL for the Web application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the load-balanced URL for the Web application zone.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies one of the five zones with which the internal URL of this new extension is to be associated. This zone
cannot already be in use.
The type must be any one of the following values: Default, Intranet, Internet, Extranet, or Custom

Type: SPUrlZone
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPWOPIBinding
In ths Article

Creates a new binding to associate file name extensions or applications with actions on the current SharePoint
farm where this cmdlet is run.

Syntax
New-SPWOPIBinding -ServerName <String> [-Action <String>] [-AllowHTTP] [-Application <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Extension <String>] [-FileName <String>]
[-ProgId <String>] [-WhatIf] [<CommonParameters>]

Description
The New-SPWOPIBinding cmdlet associates file name extensions or applications to actions on the current SharePoint
farm where this cmdlet is run. Each binding allows you to use the WOPI application to view or edit files in your
SharePoint library. For example, when a user sees a Word document in a SharePoint document list, the SharePoint
list will display the available options to view or edit the document based on the actions that are bound to Word on
that SharePoint farm.
To use a WOPI application, such as a server that runs Office Web Apps Server, for Office Web Apps, you must run
this cmdlet on the SharePoint farm before you can use the Office Web Apps.
If you run New-SPWOPIBinding for an application or file name extension where the binding (or association) already
exists, the cmdlet will fail.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

New-SPWOPIBinding -ServerName "Server.corp.Contoso.com"

This example creates bindings for all the applications and file name extensions that the WOPI application supports
on the current SharePoint farm where this cmdlet is run.
------------------EXAMPLE 2-----------------------

New-SPWOPIBinding -ServerName "Server.corp.Contoso.com" -Application "Excel"

This example associates Excel with all the actions that the WOPI application supports for Excel on the current
SharePoint farm where this cmdlet is run.
Parameters
-Action
Specifies the action to bind.
For example, "view," "edit," and "embedview." For a list of actions that the WOPI application supports, run
Get-SPWOPIBinding . Typically, you will not use this parameter.

If you specify some actions but not others, some SharePoint features may not work.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowHTTP
Specifies that the cmdlet can use HTTP for discovery of what the WOPI application supports.
If this is specified as True, the discovery information from the WOPI application will be sent on a nonsecure
connection.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Application
Specifies applications to bind.
Possible applications are as follows: "Word," "Excel," "PowerPoint," or "OneNote." Run Get-SPWOPIBinding to get
the full list of application the WOPI application supports.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Extension
Specifies the file name extensions to bind.
Run Get-SPWOPIBinding to get the list of file name extensions the WOPI application supports.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileName
Specifies the path of the xml file that contains the discover information for the WOPI application.
You can load discovery information from an xml file instead of requesting from the WOPI application directly.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgId
Specifies the programmatic identifier (ProgID ) for an application to bind.
Run Get-SPWOPIBinding to get the list of ProgIDs that the WOPI application supports.

You may only want to use this parameter to associate an action to an OneNote folder.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerName
Specifies the name or fully qualified domain name (FQDN ) of the WOPI application (such as a server that runs
Office Web Apps Server).
This can also be an FQDN of a load balanced endpoint for multiple Office Web Apps servers.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013

Get-SPWOPIBinding
Set-SPWOPIBinding
Remove-SPWOPIBinding
minutes to read • Edit Online

New-SPWOPISuppressionSetting
In ths Article

Disables Office Web Apps for the action, file name extension, or programmatic identifier that you've specified on
the current SharePoint farm.

Syntax
New-SPWOPISuppressionSetting [-Action <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Extension <String>] [-ProgId <String>] [-WhatIf] [<CommonParameters>]

Description
The New-SPWOPISuppressionSetting cmdlet turns off Office Web Apps for the action, file name extension, or
programmatic identifier (ProgId) that you've specified on the current SharePoint farm. The cmdlet does this
without removing the discovery information or the ability for users to use the SharePoint Share by link feature to
send a link to a document and allow the recipient to use Office Web Apps for that document type. You may have to
use this cmdlet if you want to use Excel Services to view Excel workbooks instead of the WOPI application (for
example Office Web Apps Server).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

New-SPWOPISuppressionSetting -Extension "XLSX" -Action "view"


New-SPWOPISuppressionSetting -Extension "XLS" -Action "view"

This example turns off the ability of a user to use Office Web Apps to view Excel workbooks that have file name
extensions ".xlsx" or ".xls".

Parameters
-Action
Specifies the action to suppress for a given extension or programmatic identifier (ProgId).
For example, "view," "edit," and "embedview." For a full list of actions, run Get-SPWOPIBinding .
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Extension
Specifies the file name extension to suppress.
Run Get-SPWOPIBinding to get the list of file name extensions the WOPI application supports.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgId
Specifies the programmatic identifier (ProgId) for an application to suppress.
Run Get-SPWOPIBinding to get the list of ProgIds that the WOPI application supports.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters .

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013

Get-SPWOPISuppressionSetting
Remove-SPWOPISuppressionSetting
minutes to read • Edit Online

New-SPWordConversionServiceApplication
In ths Article

Creates a new instance of a Word Automation Services application on the farm.

Syntax
New-SPWordConversionServiceApplication [-Name] <String>
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DatabaseCredential <PSCredential>] [-DatabaseName <String>] [-DatabaseServer <String>] [-Default]
[-PartitionMode] [-WhatIf] [<CommonParameters>]

Description
The New-SPWordConversionServiceApplication cmdlet creates a new instance of a Word Automation Services
application on the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

New-SPWordConversionServiceApplication -Name 'Word Conversion Services' -ApplicationPool 'SharePoint Web


Services Default' -DatabaseName 'Word'

This example creates a new Word Automation Services application named Word Conversion Services in an existing
application pool named SharePoint Web Services Default.

Parameters
-ApplicationPool
Specifies the existing IIS -managed application pool in which this instance of Word Automation Services runs.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredential
Specifies the credentials to use for connecting to the database for the Word Automation Services application. Use
this parameter only if SQL Server Authentication is used to access the service application database.
When the DatabaseCredential parameter is specified, the DatabaseName and DatabaseServer parameters are
required.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database to create for the new Word Automation Services application.
The type must be a valid SQL database name; for example, MetadataDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the Word Automation Services database.
The type must be a valid SQL database server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Default
Specifies that the service application proxy is added to the farm's default proxy group for this Web application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new Word Automation Services application.
The type must be a valid name of a Word Automation Services application; for example, WordSvcApp1.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-PartitionMode
Specifies that this service behaves uniquely on a partitioned set of site collections. This property cannot be
changed after the application is provisioned.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

New-SPWorkflowServiceApplicationProxy
In ths Article

Creates a proxy to connect to Workflow Manager.

Syntax
New-SPWorkflowServiceApplicationProxy [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-PartitionMode] [-WhatIf] [<CommonParameters>]

Description
Creates a proxy to connect to Workflow Manager.
Note: Consider using the cmdlet Register-SPWorkflowService instead which binds a Workflow Manager farm and
creates the Workflow Service Proxy.

Examples
------------------EXAMPLE-----------------------

New-SPWorkflowServiceApplicationProxy

Creates a Workflow Service Application Proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionMode
Specifies that the service application restrict data by subscription.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

New-SPWorkManagementServiceApplication
In ths Article

Creates a new Work Management Service application.

Syntax
New-SPWorkManagementServiceApplication -ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> -Name <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Proxy] [-WhatIf] [<CommonParameters>]

Description
Use the New-SPWorkManagementServiceApplication cmdlet to create a new Work Management Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.
Note: This functionality has been removed from SharePoint Server 2016, SharePoint Server 2019, but the cmdlet
is still present in the product.

Examples
------------------EXAMPLE-----------------------

New-SPWorkManagementServiceApplication -Name 'Work Management Service Application' -ApplicationPool 'SharePoint


Web Services Default'

This example creates a new Work Management Service Application using the Application Pool named SharePoint
Web Services Default.

Parameters
-ApplicationPool
Specifies the name of an application pool to use; for example, SharePoint - 1213. If no value is specified, the default
application pool is used.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command.
For more information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Work Management Service application to be created.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Proxy
Specifies whether to add the Work Management Service application to the proxy group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPWorkManagementServiceApplicationProxy
Set-SPWorkManagementServiceApplication
Set-SPWorkManagementServiceApplicationProxy
minutes to read • Edit Online

New-SPWorkManagementServiceApplicationProxy
In ths Article

Creates a new Work Management Service application proxy.

Syntax
New-SPWorkManagementServiceApplicationProxy -Name <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DefaultProxyGroup] [-ServiceApplication <SPWorkManagementServiceCmdletPipeBind>] [-Uri <String>]
[-WhatIf] [<CommonParameters>]

Description
Use the New-SPWorkManagementServiceApplicationProxy cmdlet to create a new Work Management Service
application proxy object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.
Note: This functionality has been removed from SharePoint Server 2016, SharePoint Server 2019, but the cmdlet
is still present in the product.

Examples
------------------EXAMPLE-----------------------

$sa = New-SPWorkManagementServiceApplication -Name 'Work Management Service Application' -ApplicationPool


'SharePoint Web Services Default'
New-SPWorkManagementServiceApplicationProxy -name 'Work Management Service Application Proxy' -
ServiceApplication $sa

This example creates a new SPWorkManagementServiceApplicationProxy called Work Management Service


Application Proxy mapped to the "Work Management Service Application" Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the Work Management Service application proxy be added to the default proxy group for the local
farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the display name for the new Work Management Service application proxy. The name that you use must
be a unique name of a Work Management Service application proxy in the farm. The maximum length is 128
characters.
The value must be a name of a valid Work Management Service application proxy; for example,
WorkMgmtSvcProxy1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the local Work Management Service application that is associated with the new proxy.
The value must be in one of the following forms:
--A valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh
--A valid name of a Work Management Service application (for example, WorkManServ1)
--An instance of a valid SPServiceApplication object
Type: SPWorkManagementServiceCmdletPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Uri
Specifies the URI of a remote Work Management service application to connect to.
To specify the Work Management service application that this proxy is connecting to, you must set only the URI
parameter or only the ServiceApplication parameter.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPWorkManagementServiceApplication
Set-SPWorkManagementServiceApplication
Set-SPWorkManagementServiceApplicationProxy
minutes to read • Edit Online

Pause-SPProjectWebInstance
In ths Article

Switches the specified instance of Project Web App to read-only, preventing any changes from being made through
the Project Server PSI or CSOM.

Syntax
Pause-SPProjectWebInstance [-Identity] <ProjectInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Switches the specified instance of Project Web App to read-only, preventing any changes from being made through
the Project Server Interface (PSI) or Client Server Object Model (CSOM ). While in this state the database is not
actually read-only and the Queue service can still write to the database, but it will not pick up any new jobs to
process. This cmdlet is used to allow the queue to empty out before an administrator switches the database to
read-only.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
------------------EXAMPLE-----------------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Project Application Services'}


$instance = Get-SPProjectWebInstance -ServiceApplication $sa
Pause-SPProjectWebInstance -Identity $instance

Pauses the Project Web Server Instance in the Project Web Application Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the instance of Project Web App to be switched to read-only mode. It can be the unique id of the instance,
the URL of the Project Web App site, the site collection object that contains the Project Web App site (an SPSite),
or the Project Web App instance object itself (a PSSite).

Type: ProjectInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Resume-SPProjectWebInstance
minutes to read • Edit Online

Publish-SPServiceApplication
In ths Article

Shares the specified local service application outside the farm.

Syntax
Publish-SPServiceApplication [-Identity] <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>] [-InfoLink <Uri>]
[-WhatIf] [<CommonParameters>]

Description
The Publish-SPServiceApplication cmdlet publishes the local service application, specified by the Identity
parameter, outside the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Publish-SPServiceApplication 053c34be-d251-488c-8e94-644eae94da26 -Description "Connect to this


TestServiceApplcation of you want to use FeatureA in your farm" -InfoLink https://testurl

This example publishes a service application to another farm.


The service application GUID is unique to every farm. You can run the Get-SPServiceApplication cmdlet to see the
GUID of the service applications and then use the result from the Get-SPServiceApplication cmdlet for other
SPServiceApplication cmdlets; for example, Grant-SPServiceApplication .

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Describes the service application to share outside the farm. If no value is specified, the value is left blank.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID of the service application to share outside the farm.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InfoLink
Specifies the link to more information about the service application to share outside the farm. If no link is specified,
no link is made available.
The type must be a valid URL, in the form https://server_name/Site_Name/page_name.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Receive-SPServiceApplicationConnectionInfo
In ths Article

Configures this farm to receive service information from another farm.

Syntax
Receive-SPServiceApplicationConnectionInfo [-FarmUrl] <Uri> [-AssignmentCollection <SPAssignmentCollection>]
[-Filter <String>] [<CommonParameters>]

Description
The Receive-SPServiceApplicationConnectionInfo cmdlet retrieves the list of service applications published by
another farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Receive-SPServiceApplicationConnectionInfo -FarmUrl https://FarmB/topology/topology.svc

This example retreives a list of service applications published by a given farm.


The FarmURL parameter can be obtained by the Get-SPTopologyServiceApplication cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-FarmUrl
Specifies the URL of the farm from which to receive service application information.
The type must be a valid URL, in the form https://site_name.

Type: Uri
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Filter
Specifies a filter to use.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Register-SPAppPrincipal
In ths Article

Lets an on-premises administrator register an app principal.

Syntax
Register-SPAppPrincipal -DisplayName <String> -NameIdentifier <String> -Site <SPWebPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Register-SPAppPrincipal cmdlet to let an on-premises farm administrator to register an app principal
management service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831(https://go.microsoft.com/fwlink/p/?
LinkId=251831).

Examples
------------------EXAMPLE-----------------------

$site = Get-SPSite "https://"


Register-SPAppPrincipal -site $site.RootWeb -NameIdentifier "00000003-0000-0ff1-ce00-000000000000@f686d426-
8d16-42db-81b7-cb578e110ccd" -DisplayName "Contoso"

This example registers the app principal named Contoso.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DisplayName
Specifies the friendly name to use for the app principal that is being registered.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NameIdentifier
Specifies the app principal's name identifier that needs to be added to the app management service.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
{{Fill Site Description}}

Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPAppPrincipal
minutes to read • Edit Online

Register-SPWorkflowService
In ths Article

Registers a Workflow Manager farm with the SharePoint farm.

Syntax
Register-SPWorkflowService [-AllowOAuthHttp] [-AssignmentCollection <SPAssignmentCollection>] [-Force]
[-PartitionMode] -SPSite <SPSitePipeBind> [-ScopeName <String>] -WorkflowHostUri <String> [<CommonParameters>]

Description
This cmdlet registers a Workflow Manager farm with the SharePoint farm in order to allow users to leverage
SharePoint 2013 workflows.

Examples
------------------EXAMPLE------------------

Register-SPWorkflowService -SPSite https://site_name -WorkflowHostUri https://workflow.contoso.com:12290 -


ScopeName SharePoint

Registers the Workflow Manager farm located at https://workflow.contoso.com:12290 with the SharePoint farm
using https://site_name as a reference. A custom Scope named 'SharePoint' is used.

Parameters
-AllowOAuthHttp
Allows connecting to Workflow Manager using HTTP rather than HTTPS. This is not recommended for security.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Forces the registration, even if previously registered. Will overwrite the existing Scope.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionMode
Specifies to use a SharePoint multi-tenancy features when registering Workflow Manager.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScopeName
The name of the scope in Workflow Manager to use. if not specified, the default Scope will be used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SPSite
The Site Collection used as a reference to register Workflow Manager with the SharePoint farm.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkflowHostUri
The URI on which the Workflow Manager is hosted.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Remove-DatabaseFromAvailabilityGroup
In ths Article

Removes one or more SharePoint databases from an availability group in SQL Server.

Syntax
Remove-DatabaseFromAvailabilityGroup [-AGName] <String> [-AssignmentCollection <SPAssignmentCollection>]
-DatabaseName <String> [-Force] [-KeepSecondaryData] [<CommonParameters>]

Remove-DatabaseFromAvailabilityGroup [-AGName] <String> [-AssignmentCollection <SPAssignmentCollection>]


[-Force] [-KeepSecondaryData] [-ProcessAllDatabases] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see https://msdn.microsoft.com/library/dd878348(VS.85).aspx.

Examples
------------------EXAMPLE------------------

Remove-DatabaseFromAvailabilityGroup -AGName MyAvailabilityGroup -DatabaseName WSS_Content

This example removes the availability group named "MyAvailabilityGroup" from the WSS_Content database.

Parameters
-AGName
The name of the availability group from which the databases are being removed.

Type: String
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseName
The name of the database to be removed from the availability group.
NOTE: This parameter should not be used in conjunction with the ProcessAllDatabases parameter.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces a remove from the group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeepSecondaryData
Specifies that copies of the databases on the replicas in the availability group will not be deleted. Otherwise, those
database copies will be dropped.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProcessAllDatabases
Removes all databases from the current SharePoint farm into the availability group.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Remove-FASTSearchContentCollection
In ths Article

Deletes a Microsoft FAST Search Server 2010 for SharePoint content collection.

Syntax
Remove-FASTSearchContentCollection [-Name] <String> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes a FAST Search Server 2010 for SharePoint content collection. All items in the collection will be
deleted.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchContentCollection -Name newscollection -Force

This example removes the content collection named "newscollection" without asking the user to confirm the
operation.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchContentCollection -Name newscollection -WhatIf

This example describes what would happen if you executed the Remove-FASTSearchContentCollection cmdlet.

Parameters
-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated.
If Confirm is false (-Confirm:$false), you will not be prompted.
In cases where Confirm is not specified, the cmdlet will prompt if the $ConfirmPreference shell variable is equal to
or greater than the ConfirmImpact setting of the cmdlet (HIGH).
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overrides any user prompting settings so the user is not asked to confirm the operation.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the content collection to delete.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Clear-FASTSearchContentCollection
New -FASTSearchContentCollection
Get-FASTSearchContentCollection
minutes to read • Edit Online

Remove-FASTSearchMetadataCategory
In ths Article

Removes a crawled property category from the installation.

Syntax
Remove-FASTSearchMetadataCategory [-Name] <String> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Remove-FASTSearchMetadataCategory -Category <Category> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes a crawled property category from your installation. The cmdlet takes either the name of the
category (Name parameter) or a category object (Category parameter).
All crawled properties mapped to this category are also removed. To avoid deleting crawled properties belonging
to a category that you are about to remove, first map all crawled properties that you wish to save to a different
property set using the Set-FASTSearchMetadataCrawledProperty cmdlet.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchMetadataCategory -name Sharepoint

This example deletes the category named "Sharepoint". Confirmation of the operation is requested. All crawled
properties mapped to the "SharePoint" category are also removed.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

C:\PS>$category = Get-FASTSearchMetadataCategory -name Office


Remove-FASTSearchMetadataCategory -category $category -force

This example deletes a crawled property category (stored as $category). Since Force is specified, confirmation of
the operation is not required.

Parameters
-Category
A category object to be deleted.
Type: Category
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated.
If Confirm is false (-Confirm $false), confirmation prompting is not used.
In cases where Confirm is not specified, the cmdlet will prompt if the $ConfirmPreference shell variable is equal to
or greater than the ConfirmImpact setting of the cmdlet (HIGH).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overrides any user prompting settings, so that confirmation of the operation is not required.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the category to delete.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
Get-FASTSearchMetadataCategory
Set-FASTSearchMetadataCategory
New -FASTSearchMetadataCategory
Set-FASTSearchMetadataCrawledProperty
minutes to read • Edit Online

Remove-FASTSearchMetadataCrawledPropertyMapping
In ths Article

Removes a crawled-property-to-managed-property mapping.

Syntax
Remove-FASTSearchMetadataCrawledPropertyMapping -CrawledProperty <CrawledProperty>
-ManagedProperty <ManagedProperty> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
This cmdlet removes the mapping of a crawled property to a managed property. Both the managed property and
the crawled property still exist after the mapping is removed.
The cmdlet parameters are both objects, and must be retrieved separately.
The content must be recrawled/re-fed for the search index to reflect that the mapping was removed.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

$title = Get-FASTSearchMetadataManagedProperty -name title


$crawledproperties = $title.GetCrawledPropertyMappings()
$crawledproperties # To List the output before the removal
Remove-FASTSearchMetadataCrawledPropertyMapping -managedproperty $title -crawledproperty $crawledproperties[4]
$crawledproperties # To list the output after the removal

This example removes the mapping of the crawled property "sitemap.title" to the managed property "title".
This example calls the GetCrawledPropertyMappings() method call exposed by the managed property, but you
could also find the crawled property by using Get-FASTSearchMetadataCrawledProperty. The return value from
GetCrawledPropertyMappings() is an array of crawled properties, of which the last is the "sitemap.title" crawled
property mapping. The last of the crawled properties (array index 4) has the mapping removed from it by calling
Remove-FASTSearchMetadataCrawledPropertyMapping.

Parameters
-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated. If Confirm is false (-
Confirm:$false), confirmation prompting is not used.
In cases where Confirm is not specified, the cmdlet will prompt if the $ConfirmPreference shell variable is equal to
or greater than the ConfirmImpact setting of the cmdlet (HIGH).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawledProperty
The crawled property which is having a mapping removed. The object can be retrieved by using Get-
FASTSearchMetadataCrawledProperty, or by using the GetCrawledPropertyMappings() method call on a managed
property object.

Type: CrawledProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overrides any user prompting settings, so that confirmation of the operation is not required.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedProperty
The managed property object which is having a mapping removed. The object can be retrieved by using the Get-
FASTSearchMetadataManagedPropertycmdlet.

Type: ManagedProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
Get-FASTSearchMetadataCrawledPropertyMapping
New -FASTSearchMetadataCrawledPropertyMapping
Set-FASTSearchMetadataCrawledPropertyMapping
Get-FASTSearchMetadataCrawledProperty
Get-FASTSearchMetadataManagedProperty
minutes to read • Edit Online

Remove-FASTSearchMetadataFullTextIndex
In ths Article

Removes a full text index from the Microsoft FAST Search Server 2010 for SharePoint system.

Syntax
Remove-FASTSearchMetadataFullTextIndex -FullTextIndex <FullTextIndex> [-Confirm] [-Force] [-WhatIf]
[<CommonParameters>]

Remove-FASTSearchMetadataFullTextIndex -Name <String> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
This cmdlet removes a full text index. The content of the index is removed and is no longer searchable. The
managed properties mapped to the full text index are still available and can be mapped to other or new full text
indexes.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchMetadataFullTextIndex -name secondarycontent

This example removes the full text index named "secondarycontent" from the FAST Search Server 2010 for
SharePoint system. The cmdlet asks for confirmation as long as neither the Force parameter is used or the
$ConfirmPreference environment is set to a higher value than HIGH.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

C:\PS>$index=Get-FASTSearchMetadataFullTextIndex -name secondarycontent


Remove-FASTSearchMetadataFullTextIndex -FullTextIndex $index -force

This example removes the full text index represented by the $index variable. Since the Force parameter is specified,
confirmation of the index removal is not used.

Parameters
-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated. If Confirm is false (-
Confirm:$false), confirmation prompting is not used.
In cases where Confirm is not specified, the cmdlet will prompt if the $ConfirmPreference shell variable is equal to
or greater than the ConfirmImpact setting of the cmdlet (HIGH).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overrides any user prompting settings, so that confirmation of the operation is not required.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FullTextIndex
A full text index object representing the full text index to remove.

Type: FullTextIndex
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
The name of the full text index to remove.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
New -FASTSearchMetadataFullTextIndex
Set-FASTSearchMetadataFullTextIndex
Get-FASTSearchMetadataFullTextIndex
minutes to read • Edit Online

Remove-FASTSearchMetadataFullTextIndexMapping
In ths Article

Removes a managed-property-to-full-text-index mapping.

Syntax
Remove-FASTSearchMetadataFullTextIndexMapping [-Mapping] <FullTextIndexMapping> [<CommonParameters>]

Description
This cmdlet removes the mapping of a managed property to a full text index. The managed properties are not
affected, and can still be mapped to other full text indexes.
The content must be recrawled/re-fed to reflect that managed properties have been removed from full text indexes.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

$fulltextindex = Get-FASTSearchMetadataFullTextIndex -Name content


$managedproperty = Get-FASTSearchMetadataManagedProperty -Name CreatedBy
$fulltextindexmapping = Get-FASTSearchMetadataFullTextIndexMapping -ManagedProperty $managedproperty -
FullTextIndex $fulltextindex
Remove-FASTSearchMetadataFullTextIndexMapping -mapping $fulltextindexmapping

This example removes the mapping of the managed property "CreatedBy" from the full text index "content". Since
the cmdlet takes an object of the mapping, the example first retrieves the mapping using Get-
FASTSearchMetadataFullTextIndexMapping.

Parameters
-Mapping
An object representing the full text index mapping to be removed.

Type: FullTextIndexMapping
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Related Links
New -FASTSearchMetadataFullTextIndexMapping
Set-FASTSearchMetadataFullTextIndexMapping
Get-FASTSearchMetadataFullTextIndexMapping
minutes to read • Edit Online

Remove-FASTSearchMetadataManagedProperty
In ths Article

Removes a managed property from the Microsoft FAST Search Server 2010 for SharePoint system.

Syntax
Remove-FASTSearchMetadataManagedProperty [-Name] <String> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Remove-FASTSearchMetadataManagedProperty -ManagedProperty <ManagedProperty> [-Confirm] [-Force] [-WhatIf]


[<CommonParameters>]

Description
This command removes a managed property and its content from the FAST Search Server 2010 for SharePoint
system. If the managed property is mapped into any full text indexes, the mapping is also removed. If there are any
crawled property mappings to this managed property, those mappings are also removed.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchMetadataManagedProperty -Name title

This example removes the managed property named "title" from the system. It will ask for confirmation before
going through with the removal unless Force is specified.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

$createdby = Get-FASTSearchMetadataManagedProperty -name CreatedBy


Remove-FASTSearchMetadataManagedProperty -ManagedProperty $createdby -Force

This example removes the managed property represented by the object $managedproperty. The object is retrieved
by calling Get-FASTSearchMetaDataManagedProperty, but any other call that returns a ManagedPropertyImpl
object is acceptable.
No confirmation is required, since the Force parameter is specified.

Parameters
-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated. If Confirm is false (-
Confirm:$false), confirmation prompting is not used.
In cases where Confirm is not specified, the cmdlet will prompt if the $ConfirmPreference shell variable is equal to
or greater than the ConfirmImpact setting of the cmdlet (HIGH).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overrides any user prompting settings, so that confirmation of the operation is not required.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedProperty
An object that represents the managed property to remove.

Type: ManagedProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
The name of the managed property to remove.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
Get-FASTSearchMetadataManagedProperty
New -FASTSearchMetadataManagedProperty
Set-FASTSearchMetadataManagedProperty
minutes to read • Edit Online

Remove-FASTSearchMetadataRankProfile
In ths Article

Removes a rank profile from the Microsoft FAST Search Server 2010 for SharePoint system.

Syntax
Remove-FASTSearchMetadataRankProfile [-Name] <String> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Remove-FASTSearchMetadataRankProfile -RankProfile <RankProfile> [-Confirm] [-Force] [-WhatIf]


[<CommonParameters>]

Description
This cmdlet removes a rank profile from the FAST Search Server 2010 for SharePoint system.
A rank profile controls relevance calculation when searching a full text index. If a deleted rank profile is specified
when searching, then the default rank profile is used.
The default rank profile cannot be deleted.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchMetadataRankProfile -Name webcontent

This example removes the rank profile "webcontent".


---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

$rankprofile = Get-FASTSearchMetadataRankProfile -Name newrankprofile


Remove-FASTSearchMetadataRankProfile -Force -RankProfile $rankprofile

This example deletes the rank profile object which represents the rank profile named "newrankprofile".
No confirmation is required, since the Force parameter is specified.

Parameters
-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated.
If Confirm is false (-Confirm:$false), confirmation prompting is not used.
In cases where Confirm is not specified, the cmdlet will prompt if the $ConfirmPreference shell variable is greater
than or equal to the ConfirmImpact setting of the cmdlet (HIGH).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overrides any user prompting settings, so that confirmation of the operation is not required.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the rank profile to remove.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-RankProfile
An object representing the rank profile to remove.

Type: RankProfile
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
New -FASTSearchMetadataRankProfile
Set-FASTSearchMetadataRankProfile
Get-FASTSearchMetadataRankProfile
minutes to read • Edit Online

Remove-FASTSearchResource
In ths Article

Deletes a resource from the resource store.

Syntax
Remove-FASTSearchResource [-Path] <String> [<CommonParameters>]

Description
This cmdlet deletes a specified file located in the Microsoft FAST Search Server 2010 for SharePoint resource
store. The location of the resource store is typically specified in %FASTSEARCH%/etc/Admin.config (where
%FASTSEARCH% is the FAST Search Server 2010 for SharePoint installation folder.)
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchResource dictionaries\spellcheck\check_en.aut

This example deletes the resource dictionaries\spellcheck\check_en.aut from the resource store.

Parameters
-Path
Partial URI within the resource store of the file which will be deleted.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchResource
Add-FASTSearchResource
minutes to read • Edit Online

Remove-FASTSearchSearchSettingGroup
In ths Article

Deletes a Microsoft FAST Search Server 2010 for SharePoint search setting group.

Syntax
Remove-FASTSearchSearchSettingGroup -Name <String> [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes a FAST Search Server 2010 for SharePoint search setting group.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchSearchSettingGroup -Name marketinggroup

This example deletes the "marketinggroup" search setting group.


---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchSearchSettingGroup -Name marketinggroup -Force

This example deletes the "marketinggroup" search setting group without being prompted to confirm the operation.
---------------EXAMPLE 3----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchSearchSettingGroup -Name marketinggroup -WhatIf

This example describes what would happen if you executed the Remove-FASTSearchSearchSettingGroup cmdlet.

Parameters
-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated.
If Confirm is false (-Confirm:$false), you will not be prompted.
In cases where Confirm is not specified, the cmdlet will prompt if the $ConfirmPreference shell variable is equal to
or greater than the ConfirmImpact setting of the cmdlet (HIGH).
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Overrides any user prompting settings so the user is not asked to confirm the operation.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the search setting group to delete.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchSearchSettingGroup
Get-FASTSearchSearchSettingGroup
minutes to read • Edit Online

Remove-FASTSearchSecurityAliaser
In ths Article

Removes a security aliaser.

Syntax
Remove-FASTSearchSecurityAliaser [-Identity] <String> [[-SecurityAliaserToRemove] <SecurityAliaser>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes a regular expression or XML aliaser.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchSecurityAliaser -Identity xmlalias2

This example deletes an XML aliaser. A prompt is displayed to confirm the request.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchSecurityAliaser -Identity xmlalias4 -Confirm:$False

This example deletes an XML aliaser without displaying a prompt.

Parameters
-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated and you must confirm the remove
request.
To suppress user prompting, set the confirm parameter to false. For example: -confirm:$false

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The identity of the regular expression or XML aliaser to remove.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecurityAliaserToRemove
A SecurityXMLAliaser or SecurityRegexAliaser object whose identity is used as the aliaser identity to remove.

Type: SecurityAliaser
Required: False
Position: 10000
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityAliaser
minutes to read • Edit Online

Remove-FASTSearchSecurityUserStore
In ths Article

Removes a user store.

Syntax
Remove-FASTSearchSecurityUserStore [-Identity] <String> [[-SecurityUserStoreToRemove] <SecurityUserStore>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes a security user store. The user store may be a Lotus Notes, Microsoft, or claims user store.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Remove-FASTSearchSecurityUserStore -Identity wn1

This example deletes the "wn1" user store. A prompt is displayed to confirm the request.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Get-FASTSearchSecurityLotusNotesUserStore ln2 | remove-FASTSearchSecurityUserStore

This example deletes the user store specified by a piped SecurityUserStoreToRemove instance. A prompt is
displayed to confirm the request.

Parameters
-Confirm
Activates user prompting to confirm the operation. If set, prompting is activated and you must confirm the remove
request.
To suppress user prompting, set the confirm parameter to false. For example: -confirm:$false
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The identity of the user store to remove.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-SecurityUserStoreToRemove
A MicrosoftUserStore, LotusNotesUserStore, or ClaimsUserStore instance whose identity is used to remove the
user store.

Type: SecurityUserStore
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityUserStore
minutes to read • Edit Online

Remove-FASTSearchSpelltuning
In ths Article

Disables spell tuning.

Syntax
Remove-FASTSearchSpelltuning [<CommonParameters>]

Description
This cmdlet disables the alignment of the spell check dictionaries with indexed content. This cmdlet stops the
generation of new dictionaries, and the Did You Mean feature will only use content that was fed into the index
before this cmdlet was run.
After disabling the dictionary-index alignment, use the Reset-FASTSearchSpelltuning cmdlet to return to the out-
of-the-box spelling dictionaries. Did You Mean will then make suggestions based on standard spell checking
dictionaries, not on indexed content.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
(FAST Server for SharePoint 2010)

Remove-FASTSearchSpelltuning

Related Links
Get-FASTSearchSpelltuningStatus
Reset-FASTSearchSpelltuning
Add-FASTSearchSpelltuning
minutes to read • Edit Online

Remove-SPAccessServicesDatabaseServer
In ths Article

{{Fill in the Synopsis}}

Syntax
Remove-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> [-Force] [-WhatIf] [<CommonParameters>]

Description
{{Fill in the Description}}

Examples
------------------EXAMPLE------------------

{{ Add example code here }}

{{ Add example description here }}

Parameters
-AssignmentCollection
{{Fill AssignmentCollection Description}}

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
{{Fill DatabaseServer Description}}

Type: AccessServicesDatabaseServerPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerGroup
{{Fill DatabaseServerGroup Description}}

Type: AccessServicesDatabaseServerGroupPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
{{Fill Force Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
{{Fill ServiceContext Description}}

Type: SPServiceContextPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Remove-SPActivityFeedItems
In ths Article

Removes activity events from the published and consolidated tables.

Syntax
Remove-SPActivityFeedItems [-AllItems <Boolean>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-ID <Int64>] -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind> [-SearchText <String>]
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPActivityFeedItems cmdlet to remove an activity event.

Examples
------------------EXAMPLE------------------

$upaProxy = Get-SPServiceApplicationProxy 1232b6f7-b9ff-99ad-0cd0-fg1g67h981aq


$upaProxy = Get-SPServiceApplicationProxy 1232b6f7-b9ff-99ad-0cd0-fg1g67h981aq

This example removes the specific user profile service application.

Parameters
-AllItems
Specifies whether to delete events.A value of "1" deletes all events. A value of "0", no events are deleted.The default
value is 0 (zero).

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ID
Limits events deleted to those which match the specified ActivityEventID.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the proxy of the User Profile Service application that contains the site subscription to delete.The type
must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
application proxy (for example, UserProfileSvcProxy1); or an instance of a valid SPServiceApplicationProxy object.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchText
Limits events deleted to those which contain SearchText in the string.
Note that the SearchText will apply to all of the XML text saved in SQL representing this activity. The text seen in a
browser window may be saved in a different representation in SQL. For example, a ">" feed symbol may be
represented as "&gt" text in SQL, so the SearchText should reference "&gt" instead of ">".
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run.
This parameter is mandatory in a hosted-environment and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyPipeBind
Microsoft.SharePoint.PowerShell.SPSiteSubscriptionPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Remove-SPAlternateURL
In ths Article

Completely deletes the specified alternate URL.

Syntax
Remove-SPAlternateURL [-Identity] <SPAlternateUrlPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPAlternateUrl cmdlet completely deletes the alternate URL specified by the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Remove-SPAlternateURL -WebApplication https://sitename -Zone Extranet

This example deletes the extranet URL for the given Web application.
------------------EXAMPLE 2-----------------------

Get-SPWebApplication |%{ Get-SPAlternateURL -WebApplication $_ -Zone "Extranet" } | Remove-SPAlternateURL

This example removes all extranet alternate URLs in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity of the alternate URL to delete. The identity can be either a valid URL, in the form
https://server_name, or a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPAlternateUrlPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPAppDeniedEndpoint
In ths Article

Removes a relative URL endpoint of a server from the list of app-denied endpoints.

Syntax
Remove-SPAppDeniedEndpoint [-Endpoint] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPAppDeniedEndpoint cmdlet to remove a relative URL endpoint of a server from the list of app-
denied endpoints.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPAppDeniedEndpoint -Endpoint "/_vti_bin/contoso/service.asmx"

This example removes the "/_vti_bin/contoso/service.asmx" endpoint from the list of denied endpoints for apps.
Apps will be able to access this endpoint because it is being removed from the app-denied endpoint list.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Endpoint
Specifies a relative URL endpoint of a server that will be removed from the list of app-denied endpoints. Apps will
not be able to access relative URL endpoints of a server that exist in the app-denied endpoint list.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPAppDeniedEndpoint
minutes to read • Edit Online

Remove-SPApplicationCredentialKey
In ths Article

Removes the application credential key from the local server.

Syntax
Remove-SPApplicationCredentialKey [-AssignmentCollection <SPAssignmentCollection>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
Use the Remove-SPApplicationCredentialKey cmdlet to remove the application credential key from the local
server. The application credential key is used by certain features to encrypt and decrypt passwords.

Examples
EXAMPLE

Remove-SPApplicationCredentialKey -Confirm:$false

This example removes the application credential key from the local server without prompting for user
confirmation.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-ApplicationCredentialKey
minutes to read • Edit Online

Remove-SPAppPrincipalPermission
In ths Article

Removes the permissions on a specified app principal.

Syntax
Remove-SPAppPrincipalPermission -AppPrincipal <SPAppPrincipal> -Scope <SPCmdletAppPrincipalPermissionScope>
-Site <SPWebPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[-DisableAppOnlyPolicy] [<CommonParameters>]

Description
Use the Remove-SPAppPrincipalPermission cmdlet to remove the permissions on a specified app principal for a given
scope (that is, SharePoint Online, site collection, or web).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE------------

$clientID = "11111111-2222-3333-4444-555555555555"
$site = Get-SPSite http://siteUrl
$realm = Get-SPAuthenticationRealm -ServiceContext $site
$appIdentifier = $clientID + "@" + $realm
$appPrincipal = Get-SPAppPrincipal -NameIdentifier $appIdentifier -Web $site.RootWeb
Remove-AppPrincipalPermission -AppPrincipal $appPrincipal -site $site.RootWeb -Scope Site

This example removes the App Principal permission from the site collection scope.

Parameters
-AppPrincipal
Specifies the AppPrincipal object to remove.

Type: SPAppPrincipal
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableAppOnlyPolicy
Disables the app only policy.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Specifies the scope to which to apply the principal permission.
The value is any of the following scopes:
--Site
--SiteCollection
--SiteSubscription

Type: SPCmdletAppPrincipalPermissionScope
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the site (that is, SPWeb object) to remove.

Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPAppPrincipalPermission
minutes to read • Edit Online

Remove-SPBusinessDataCatalogModel
In ths Article

Deletes a Business Data Connectivity Model.

Syntax
Remove-SPBusinessDataCatalogModel -Identity <MetadataObject> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPBusinessDataCatalogModel cmdlet deletes a Business Data Connectivity Model.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$modelFile = Get-SPBusinessDataCatalogMetadataObject -Name "ContosoModel" -BdcObjectType Model -


ServiceContext http://contoso

Remove-SPBusinessDataCatalogModel -Identity $modelFile

This example removes the Business Data Connectivity Model file named ContosoModel.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Business Data Connectivity Metadata Store metadata object to remove.

Type: MetadataObject
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPCentralAdministration
In ths Article

Removes the SharePoint Central Administration web site from the local server.

Syntax
Remove-SPCentralAdministration [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Removes the SharePoint Central Administration web site from the local server.

Examples
------------------EXAMPLE------------------

Remove-SPCentralAdministration

This example removes the Central Administration web site from the local server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Remove-SPClaimProvider
In ths Article

Unregisters a claim provider.

Syntax
Remove-SPClaimProvider [-Identity] <SPClaimProviderPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Remove-SPClaimProvider cmdlet unregisters a claim provider. If the unregistered claim provider was assigned to
a trusted identity token issuer, the trusted token issuer will use the default (system) claim provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove - SPClaimProvider -Identity "12345678-90ab-cdef-1234-567890bcdefgh"

This example removes a claim provider from the farm

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the claim provider to unregister.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a claim
provider (for example, MyClaimProvider1); or an instance of a valid SPClaimProvider object.

Type: SPClaimProviderPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPClaimTypeMapping
In ths Article

Deletes a claim type mapping rule for a security token service (STS ) identity provider.

Syntax
Remove-SPClaimTypeMapping [-Identity] <SPClaimMappingPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] -TrustedIdentityTokenIssuer <SPTrustedIdentityTokenIssuerPipeBind> [-WhatIf] [<CommonParameters>]

Description
The Remove-SPClaimMapping cmdlet deletes a claim type mapping rule from a farm trust STS identity provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-------------------------

Remove-SPClaimMapping "Email" | Get-SPIdentityProvider "LiveIDSTS"

This example removes an identity provider named LiveIDSTS.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the claim mapping to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a claim
mapping rule (for example, Email); or an instance of a valid SPClaimMapping object.

Type: SPClaimMappingPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TrustedIdentityTokenIssuer
Specifies the token issuer or a valid SPTrustedIdentityTokenIssuerPipeBind object.

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPConfigurationDatabase
In ths Article

Permanently removes a configuration database.

Syntax
Remove-SPConfigurationDatabase [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Remove-SPConfigurationDatabase cmdlet permanently removes the farm's configuration database. The
configuration database must be already dismounted from any associated farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Remove-SPConfigurationDatabase

This example permanently deletes a configuration database from a farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPContentDatabase
In ths Article

Deletes a content database.

Syntax
Remove-SPContentDatabase [-Identity] <SPContentDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [-Force] [<CommonParameters>]

Description
The Remove-SPContentDatabase cmdlet deletes a content database permanently from SQL Server. In situations
where data needs to be persisted, use the Dismount-SPContentDatabase cmdlet. This will remove the content
database from SharePoint Products but not from SQL Server.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE---------------------

Remove-SPContentDatabase WSS_Content

This example deletes the content database named 'WSS_Content'.


-----------------EXAMPLE---------------------

Remove-SPContentDatabase WSS_Content -Confirm:$false -Force

This example deletes the content database named 'WSS_Content' without asking any confirmation.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifies the force of a removal.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the content database to delete.
The type must be a valid GUID, such as 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a SharePoint
content database (for example, SPContentDB1); or an instance of a valid SPContentDatabase object.

Type: SPContentDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPContentDeploymentJob
In ths Article

Removes a content deployment job.

Syntax
Remove-SPContentDeploymentJob [-Identity] <SPContentDeploymentJobPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPContentDeploymentJob cmdlet removes a content deployment job.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE------------------

Remove-SPContentDeploymentJob -Identity "DeployJob1"

This example removes a deployment job named DeployJob1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the content deployment job to remove. The type must be a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of a content deployment job (for example; DeployJob1); or an instance of a
valid SPContentDeploymentJob object.

Type: SPContentDeploymentJobPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPContentDeploymentPath
In ths Article

Removes a content deployment path.

Syntax
Remove-SPContentDeploymentPath [-Identity] <SPContentDeploymentPathPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPContentDeploymentPath cmdlet removes a content deployment path.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-----------------------

Remove-SPContentDeploymentPath -Path1

This example removes a content path named Path1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the content deployment path to remove. The type must be a valid GUID, in the form 12345678-90ab-
cdef-1234-567890bcdefgh; a valid name of a content deployment path (for example; DeployPath1); or an instance
of a valid SPContentDeploymentPath object.

Type: SPContentDeploymentPathPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPDeletedSite
In ths Article

Removes a deleted site collection.

Syntax
Remove-SPDeletedSite [-Identity] <SPDeletedSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-ContentDatabase <SPContentDatabasePipeBind>] [-WebApplication <SPWebApplicationPipeBind>]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).
Use the Remove-SPDeletedSite cmdlet to permanently remove a deleted site collection from the farm.
Unlike the Remove-SPSite cmdlet that uses the host name and scheme for the Identity parameter (that is,
https://server_name), the value of the identity parameter for all SPDeletedSite cmdlets use a server-relative URL.
Typically, the forward slash character (/) begins the relative URL and also denotes the root site.
For additional information about a server-relative URL or understanding general concepts about absolute and
relative URLs, see Server Relative URL Property (https://msdn.microsoft.com/en-
us/library/microsoft.sharepoint.spsite.serverrelativeurl.aspx) or Understanding Absolute and Relative URL
Addresses (https://msdn.microsoft.com/en-us/library/bb208688(office.12).aspx).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Remove-SPDeletedSite -Identity 610857cb-8414-4a89-8bf3-ad3628f6c86c

This example permanently removes a specific deleted site collection by using a site ID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the GUID of the content database from which to list site collections.
The type must be a valid database name in the form SPContentDB01 or a valid GUID, for example, 12345678-
90ab-cdef-1234-567890bcdefgh.

Type: SPContentDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the identity of the deleted site collection to permanently delete. The identity can be either a valid server-
relative URL in the form /sites/site_name; a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh; or
an SPDeletedSite object.

Type: SPDeletedSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the URL, GUID, or name of the Web application from which to list sites.
The type must be a valid URL in the form https://server_name; a valid GUID, for example, 12345678-90ab-cdef-
1234-567890bcdefgh; or the Web application name, for example, WebApplication1212.
Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPDiagnosticsPerformanceCounter
In ths Article

Removes an instance of a performance counter.

Syntax
Remove-SPDiagnosticsPerformanceCounter [-Category] <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Counter <String>] [-DatabaseServer] [-Instance <String>] [-WebFrontEnd] [-WhatIf]
[<CommonParameters>]

Description
The Remove-SPDiagnosticsPerformanceCounter cmdlet removes performance counters from the collection of
performance counters that are read and recorded in the usage database. This cmdlet can also be used to remove
entire categories and types of counters from the collection. If either the DatabaseServer or WebFrontEnd
parameters are not specified, this cmdlet removes the specified performance counters on the front end Web
servers in the farm.
The Remove-SPDiagnosticsPerformanceCounter cmdlet is only available by using Windows PowerShell. There is no
user interface.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Remove-SPDiagnosticsPerformanceCounter -category ASP.NET

This example removes all the counters in the category ASP.NET on front end Web servers.
------------------EXAMPLE 2------------------

Remove-SPDiagnosticsPerformanceCounter -category ASP.NET -Counter "Requests Queued"

This example removes the counters in the category ASP.NET that have requests queued on front end Web servers.
------------------EXAMPLE 3------------------

Remove-SPDiagnosticsPerformanceCounter -category Processor -counter "% Processor Time" -instance "_Total" -


databaseserver

This example removes the counters of the _Total instance, with the counter % Processor Time in the category
Processor on database servers.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Category
Specifies the category of performance counters to remove.
The type must be a valid name of a category of performance counters; for example, ASP.NET, PhysicalDisk, or
Processor.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Counter
Specifies the type of counter to remove. If this parameter is not specified, this cmdlet removes all performance
counters of the specified category.
The type must be a valid name of counter type; for example, Requests Queued, Avg. Disk Queue Length, and %
Processor Time.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseServer
Removes the specified performance counters that are collected on the database servers in the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Instance
Specifies the instance name of the performance counter to remove. If this parameter is not specified, this cmdlet
removes all instances of the specified performance counter.
The type must be a valid name of a performance counter instance; for example Total_PerfCounter.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WebFrontEnd
Removes performance counters that are collected on the front end Web servers in the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPDistributedCacheServiceInstance
In ths Article

Removes an instance of the distributed cache service from a local server.

Syntax
Remove-SPDistributedCacheServiceInstance [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Remove-SPDistributedCacheServiceInstance cmdlet to remove an instance of the distributed cache service
from a local server. This is required to stop the AppFabric service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
https://go.microsoft.com/fwlink/p/?LinkId=671715.

Examples
------------------EXAMPLE------------------

Remove-SPDistributedCacheServiceInstance

This example removes an instance of a distributed cache.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Add-SPDistributedCacheServiceInstance
minutes to read • Edit Online

Remove-SPEduClassMember
In ths Article

Do not use

Syntax
Remove-SPEduClassMember [-AssignmentCollection <SPAssignmentCollection>] -ClassId <String>
-Site <SPSitePipeBind> -UserAlias <String> [<CommonParameters>]

Description
Do not use

Examples
------------------EXAMPLE------------------

Do not use

Parameters
-AssignmentCollection
Do not use

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClassId
Do not use

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Site
Do not use
Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-UserAlias
Do not use

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.String
Microsoft.SharePoint.PowerShell.SPSitePipeBind Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Remove-SPEnterpriseSearchComponent
In ths Article

Removes the specified search component from the given search topology.

Syntax
Remove-SPEnterpriseSearchComponent [-Identity] <SearchComponentPipeBind>
-SearchTopology <SearchTopologyPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet removes the specified search component from an inactive search topology.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Identity 10fa59cb-4b32-4fe6-8f8d-
065388df201e
Remove-SPEnterpriseSearchComponent -SearchTopology $topology -Identity c1642176-b9ae-4096-834c-080da5fba90e

This example removes the search component with identity c1642176-b9ae-4096-834c-080da5fba90e from the
search topology with identity 10fa59cb-4b32-4fe6-8f8d-065388df201e from the default search application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity for a search component

Type: SearchComponentPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the search topology and search component/search
components.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchTopology
Specifies the search topology from which to retrieve the search component/search components.

Type: SearchTopologyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-
SPEnterpriseSearchContentEnrichmentConfiguration
In ths Article

Removes the current content enrichment configuration from the search service application.

Syntax
Remove-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
This cmdlet removes the current content enrichment configuration from the SearchServiceApplication.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Remove-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication $ssa

This example removes the content enrichment configuration from the default search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the SearchServiceApplication that contains content enrichment configuration.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchContentEnrichmentConfiguration
Set-SPEnterpriseSearchContentEnrichmentConfiguration
New -SPEnterpriseSearchContentEnrichmentConfiguration
minutes to read • Edit Online

Remove-SPEnterpriseSearchCrawlContentSource
In ths Article

Deletes a specified crawl content source from a search application.

Syntax
Remove-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchCrawlContentSource cmdlet deletes a specified crawl content source from a service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication "SearchApp1"


$topo = Get-SPEnterpriseSearchCrawlTopology -SearchApplication $searchapp
New-SPEnterpriseSearchCrawlTopology -SearchApplication $searchapp -clone -CrawlTopology $topo
$newtopo = Get-SPEnterpriseSearchCrawlTopology -SearchApplication $searchapp -Identity 11111111-1111-1111-1111-
111111111111
$cc = Get-SPEnterpriseSearchCrawlComponent -CrawlTopology $newtopo -Identity 22222222-2222-2222-2222-
222222222222
$cc | Remove-SPEnterpriseSearchCrawlComponent
$newtopo | Set-SPEnterpriseSearchCrawlTopology -Active

This example creates a new, inactive, crawl topology, removes a crawl component from it and activates the new
crawl topology.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The crawl content source to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
ContentSource object (for example, ContentSource1); or an instance of a valid ContentSource object.

Type: ContentSourcePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl content source.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchCrawlCustomConnector
In ths Article

Removes a CustomConnector object.

Syntax
Remove-SPEnterpriseSearchCrawlCustomConnector -Identity <SPCustomConnectorPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
-SearchApplication <SearchServiceApplicationPipeBind> [<CommonParameters>]

Description
The Get-SPEnterpriseSearchCrawlCustomConnector selects the custom connector or connectors and then pipes them
to the Remove-SPEnterpriseSearchCrawlCustomConnector cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE------------------

Get-SPEnterpriseSearchCrawlCustomConnector -SearchApplication MySearchServiceApp" - Identity "dctm://" |


Remove-SPEnterpriseSearchCrawlCustomConnector

This example removes a custom connector for the dctm:// protocol from the MySearchServiceApp search service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the CustomConnector object to remove. The Identity parameter must be an instance of a valid
CustomConnector object.

Type: SPCustomConnectorPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplicationobject.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchCrawlDatabase
In ths Article

Deletes a crawl database.

Syntax
Remove-SPEnterpriseSearchCrawlDatabase [-Identity] <CrawlStorePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchCrawlDatabase cmdlet deletes a specified crawl database from a search service
application. A crawl database stores crawl history for a search service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPEnterpriseSearchCrawlDatabase -Identity CrawlDB-0


-SearchApplication mySearchServiceApp

This example removes the CrawlDB -0 crawl database from the mySearchServiceApp search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the crawl database to delete.
A valid crawl database name, in the form CrawlStore1; or a valid GUID, such as 12345678-90ab-cdef-1234-
567890bcdefgh; or an instance of a valid CrawlStore object.

Type: CrawlStorePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl database collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchCrawlExtension
In ths Article

Removes a file name extension from the list of files that can be crawled.

Syntax
Remove-SPEnterpriseSearchCrawlExtension [-Identity] <ExtensionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchCrawlExtension cmdlet prevents files with this extension from being crawled.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication "SearchApp1"


$searchapp | Get-SPEnterpriseSearchCrawlExtension "pdf" | Remove-SPEnterpriseSearchCrawlExtension

This example removes the PDF IFilter and removes the pdf file extension from the list of file types to include in the
content index.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The file name extension to remove.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid file name
extension (for example, .xml); or an instance of a valid CrawlExtension object.

Type: ExtensionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the extension collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchCrawlLogReadPermission
In ths Article

Removes permission to view crawl log information.

Syntax
Remove-SPEnterpriseSearchCrawlLogReadPermission [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Identity <CrawlLogReadPermissionPipeBind>] [-SearchApplication <SearchServiceApplicationPipeBind>]
[-Tenant <Guid>] [-UserNames <String>] [-WhatIf] [<CommonParameters>]

Description
Only the Search Service Application administrator can use this cmdlet.
The Remove-SPEnterpriseSearchCrawlLogReadPermission cmdlet removes the permission to view crawl log
information for one or more users. The administrator can choose to restrict this removal to a particular tenant.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$crawlLogPermission = Get-SPEnterpriseSearchCrawlLogReadPermission -SearchApplication $ssa -Tenant "00000000-
0000-0000-0000-000000000001"
Remove-SPEnterpriseSearchCrawlLogReadPermission -Identity $crawlLogPermission -UserNames
"contoso\user1;contoso\user2"

This example removes user1 and user2 from the list of users referenced by $crawlLogPermission.
$crawlLogPermission is the list of users who have permission to view the crawl log information from the tenant
with id "00000000-0000-0000-0000-000000000001" on the search application referenced by $ssa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the crawl log permissions list from which to remove the user(s).

Type: CrawlLogReadPermissionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl log. The type must be a valid GUID, of the form 12345678-
90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a
valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Tenant
Specifies the tenant for which the user permissions shall be removed. The type must be a valid GUID of the form
12345678-90ab-cdef-1234-567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserNames
Specifies the user names that shall no longer have permission to view the crawl log information. Separate names
with semi-colons.
Specifies the user names that no longer shall have permission to view the crawl log information. Use the form
"domain\username". When adding several user names, separate names with semi-colons.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPEnterpriseSearchCrawlLogReadPermission
Get-SPEnterpriseSearchCrawlLogReadPermission
minutes to read • Edit Online

Remove-SPEnterpriseSearchCrawlMapping
In ths Article

Deletes a crawl mapping.

Syntax
Remove-SPEnterpriseSearchCrawlMapping [-Identity] <CrawlMappingPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchCrawlMapping cmdlet deletes a crawl mapping from the crawl mapping collection.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication "Sample Search Service Application"


$mappingtodelete = Get-SPEnterpriseSearchCrawlContentSource -Identity "somemapping"
mappingtodelete | Remove-SPEnterpriseSearchCrawlMapping

This example removes a crawl mapping from a search application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The crawl mapping to delete.
A valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid CrawlMapping object.

Type: CrawlMappingPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl mapping collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchCrawlRule
In ths Article

Deletes a crawl rule.

Syntax
Remove-SPEnterpriseSearchCrawlRule [-Identity] <CrawlRulePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchCrawlRule cmdlet deletes a crawl rule that is used to crawl content for a content
source.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$searchApp = Get-SPEnterpriseSearchServiceApplication mySearchServiceApp


Remove-SPEnterpriseSearchCrawlRule -Identity https://mySPSite -SearchApplication $searchApp

This example removes a crawl rule pertaining to the path https://mySPSite from the mySearchServiceApp search
service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The crawl rule to delete.
A valid crawl rule URL, such as https://server_name, or an instance of a valid CrawlRule object.

Type: CrawlRulePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
The search application that contains the crawl rule collection.
A valid search application name, such as SearchApp1, or a valid GUID, such as 12345678-90ab-cdef-1234-
567890bcdefgh, or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchFileFormat
In ths Article

Removes support for parsing a file format.

Syntax
Remove-SPEnterpriseSearchFileFormat [-Identity] <DocumentParserFileFormatPipeBind>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchFileFormat removes a file format from the search parsing system. The search
parsing system will only consider the change after a restart of the content processing components. Afterwards the
search parsing system will stop parsing the file format.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Remove-SPEnterpriseSearchFileFormat -SearchApplication $ssa -Identity foo

This example uses the Remove-SPEnterpriseSearchFileFormat cmdlet to remove the file format with the belonging
file name extension foo in the search service application referenced by $ssa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identification of the format to be removed.

Type: DocumentParserFileFormatPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the file format.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchFileFormat
Get-SPEnterpriseSearchFileFormat
Set-SPEnterpriseSearchFileFormatState
minutes to read • Edit Online

Remove-SPEnterpriseSearchLanguageResourcePhrase
In ths Article

Deletes a language resource phrase from a shared search application.

Syntax
Remove-SPEnterpriseSearchLanguageResourcePhrase [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-Identity <LanguageResourcePhrasePipeBind> [-Language <String>] [-Mapping <String>] -Owner <SearchObjectOwner>
[-SearchApplication <SearchServiceApplicationPipeBind>] [-SourceId <Guid>] [-Type <LanguageResourceType>]
[-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchLanguageResourcePhrase cmdlet deletes one or more language resource phrases from
the collection of language resource phrases in a shared search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication "SearchApp1"


$obsoletephrase = Get-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $searchapp -Language en-us -
Type QuerySuggestionBlockList -Identity secret
$obsoletephrase | Remove-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $searchapp -Type
QuerySuggestionBlockList -Language en-us

This example removes a language resource item on the QuerySuggestionBlockList for the en-us language.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The language resource phrase to delete.
The type must be a string; a valid name of a language resource phrase (for example, LanguageResourcePhrase1);
or an instance of a valid LanguageResourcePhrase object.

Type: LanguageResourcePhrasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Language
Deletes phrases of the specified language only.
The type must be a valid name of a language; for example, en_us.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mapping
Allows a term or phrase to be mapped to another term or phrase. For example, the nickname "John" could be
mapped to "Jonathan".
This parameter only applies to nicknames and substitutions.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding LanguageResourcePhrase is
created.
The owner must be one of the following valid levels:
Search Service Application
Site Subscription
Site Collection
Site

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the language resources.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceId
Identifies the search result source for which the LanguageResourcePhrase applies to.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Constrains to delete phrases of specified type.
The type must be one of the following valid types of phrases:
QuerySuggestionBlockList
QuerySuggestionAlwaysSuggest
Nickname
QuerySuggestionSubstitution

Type: LanguageResourceType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchLinksDatabase
In ths Article

Deletes a links database.

Syntax
Remove-SPEnterpriseSearchLinksDatabase [-Identity] <LinksStorePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchLinksDatabase cmdlet deletes a specified links database from a search service
application. A links database stores query logging and analytics information.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$linksDatabase = $ssa | Get-SPEnterpriseSearchLinksDatabase Links2
Remove-SPEnterpriseSearchLinksDatabase -Identity $linksDatabase

This example removes the links database referenced by $linksDatabase. $linksDatabase is the identity of the links
database Links2 on the search service application referenced by $ssa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the links database to delete. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-
567890bcdefgh; a valid name of a LinksStore object, in the form LinksStore1; or an instance of a valid LinksStore
object.

Type: LinksStorePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the links database. The type must be a valid GUID, in the form
12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an
instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
New -SPEnterpriseSearchLinksDatabase
Set-SPEnterpriseSearchLinksDatabase
Get-SPEnterpriseSearchLinksDatabase
Move-SPEnterpriseSearchLinksDatabases
minutes to read • Edit Online

Remove-SPEnterpriseSearchMetadataCategory
In ths Article

Deletes a crawled property category.

Syntax
Remove-SPEnterpriseSearchMetadataCategory [-Identity] <CategoryPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes a crawled property category. You should use this cmdlet after a crawl to delete unused or
unwanted categories from the metadata property schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication
Remove-SPEnterpriseSearchMetadataCategory -Identity MyCategory -SearchApplication $searchapp

This example removes the metadata category named MyCategory for the default search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the metadata category to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid name of a
metadata category, for example, MetadataCategory1, or an instance of a valid Category object.
Note that if only a name for a category is specified, a SearchApplication must also be specified.

Type: CategoryPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the enterprise search metadata property schema.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid search application
name, for example, SearchApp1, or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchMetadataManagedProperty
In ths Article

Deletes a metadata managed property.

Syntax
Remove-SPEnterpriseSearchMetadataManagedProperty [-Identity] <ManagedPropertyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-SiteCollection <Guid>] [-Tenant <Guid>] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet deletes a specified managed property from the managed property collection.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchapp -Identity AboutMeUpdate
Remove-SPEnterpriseSearchMetadataManagedProperty -Identity $mp

This example removes the managed property AboutMeUpdate from the default search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the managed property to delete.
The type must be a valid name of a managed property, for example ManagedProperty1, or an instance of a valid
ManagedProperty object.
Note that if only a name of a managed property is specified, a SearchApplication must also be specified.

Type: ManagedPropertyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the managed property collection.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollection
Specifies that the managed properties returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
Specifies that the managed properties returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchMetadataMapping
In ths Article

Deletes a metadata mapping from a managed property.

Syntax
Remove-SPEnterpriseSearchMetadataMapping [-Identity] <MappingPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes mappings from a managed property. A metadata mapping is the mapping between a managed
property and one or more crawled properties in the enterprise search metadata property schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$searchapp = Get-SPEnterpriseSearchServiceApplication
$cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $searchapp -Identity People
$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp -Category $cat -Limit 1
$mycp = New-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp -Name "MyCrawlProp" -
PropSet $cp.PropSet -Category $cp.CategoryName -IsNameEnum $false -VariantType $cp.VariantType
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchapp -Identity UserName
New-SPEnterpriseSearchMetadataMapping -SearchApplication $searchapp -ManagedProperty $mp -CrawledProperty $mycp
# Retrieve the new mapping
$map = Get-SPEnterpriseSearchMetadataMapping -SearchApplication $searchapp -ManagedProperty $mp -
CrawledProperty $mycp
Remove-SPEnterpriseSearchMetadataMapping -Identity $map -confirm:$false

This example removes an existing mapping between the managed property UserName and the crawled property
MyCrawlProp (see Set-SPEnterpriseSearchMetadataMapping ) for the default search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the metadata mapping to delete.
The type must be a valid URL, in the form https://server_name, or an instance of a valid Mapping object.

Type: MappingPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the managed property collection.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchQueryAuthority
In ths Article

Deletes an authoritative page.

Syntax
Remove-SPEnterpriseSearchQueryAuthority [-Identity] <AuthorityPagePipeBind> -Owner <SearchObjectOwner>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchQueryAuthority cmdlet adjusts query rank by deleting an authoritative page.
SPEnterpriseSearchQueryAuthority represents authoritative sites that rank higher in relevance than demoted sites,
which are de-emphasized in relevance.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPEnterpriseSearchQueryAuthority -Identity https://contoso.com -SearchApplication MySSA

This example removes the query authority URL https://contoso.com from the search service application named
MySSA.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the query authority page to delete.
The type must be a valid URL, in the form https://server_name; or an instance a valid AuthorityPage object.

Type: AuthorityPagePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding Query Authority is created.The
owner must be one of the following valid levels:- Search Service Application- Site Subscription

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the authoritative page collection to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid Search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchQueryDemoted
In ths Article

Deletes a demoted site rule.

Syntax
Remove-SPEnterpriseSearchQueryDemoted [-Identity] <DemotedPipeBind> -Owner <SearchObjectOwner>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchQueryDemoted cmdlet adjusts query rank by deleting a demoted site rule from the
demoted site collection. Query demoted sites are de-emphasized in relevance.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$demotedRule = Get-SPEnterpriseSearchQueryDemoted -Identity https://somesite.com -SearchApplication MySSA


$demotedRule | Remove-SPEnterpriseSearchQueryDemoted

This example obtains a reference to a site demotion rule for the URL https://somesite.com and removes it.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the demoted site rule to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid Demoted object.

Type: DemotedPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding Demoted object is created. The
owner must be one of the following valid levels:- Search Service Application- Site Subscription

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the demoted site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.
Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchQueryKeyword
In ths Article

Deletes a query keyword.

Syntax
Remove-SPEnterpriseSearchQueryKeyword [-Identity] <KeywordPipeBind> -Site <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchQueryKeyword cmdlet deletes unused or unwanted keywords from the query keyword
collection.
You cannot use this cmdlet after a site collection is upgraded to SharePoint Server because keywords and Best Bets
are automatically migrated to query rules.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPEnterpriseSearchQueryKeyword -Identity Engineering -Site https://myserver/sites/engineering | Remove-


SPEnterpriseSearchQueryKeyword -Site https://myserver/sites/engineering

This example removes the Engineering keyword from the site collection at https://myserver/sites/engineering.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the keyword term to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid string that contains
a keyword term (for example, KeywordTerm1); or an instance of a valid Keyword object.

Type: KeywordPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Filters to delete keywords from the specified site collection of results.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchQueryScope
In ths Article

Deletes a query scope.

Syntax
Remove-SPEnterpriseSearchQueryScope [-Identity] <ScopePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-Url <Uri>] [-WhatIf] [<CommonParameters>]

Description
After you upgrade a Search service application to SharePoint Server, you can view shared scopes, but you cannot
create, update, or delete them. Therefore, you cannot use this cmdlet for shared scopes after upgrade. However,
you can convert shared scopes to result sources, which serve a similar purpose. Similarly, after you upgrade a
SharePoint Server site collection to SharePoint Server, you can view local scopes, but you cannot create, update, or
delete them. Therefore, you cannot use this cmdlet for local scopes after you upgrade a site collection. However,
you can convert local scopes to result sources, which serve a similar purpose.
The Remove-SPEnterpriseSearchQueryScope cmdlet deletes one or more specified shared scopes from the query
scope collection. A query scope represents a query results scope used by all shared search applications on the
farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPenterpriseSearchServiceApplication -Identity MySSA


Get-SPEnterpriseSearchQueryScope -Identity MustCrawl -SearchApplication $ssa | Remove-
SPEnterpriseSearchQueryScope

This example removes a scope named MustCrawl from a search service application named MySSA.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the query scope to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a scope
(for example, Scope1); or an instance of a valid Scope object.

Type: ScopePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the query scope collection.
The type must be a valid GUID, of the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Filters to delete scopes of the specified results URL.
The type must be a valid URL, in the form https://server_name.
Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchQueryScopeRule
In ths Article

Deletes query results scope rules.

Syntax
Remove-SPEnterpriseSearchQueryScopeRule [-Identity] <ScopeRulePipeBind> -Url <Uri>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Scope <ScopePipeBind>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
After you upgrade a Search service application to SharePoint Server, you can view shared scopes, but you cannot
create, update, or delete them. Therefore, you cannot use this cmdlet for shared scopes after upgrade. However,
you can convert shared scopes to result sources, which serve a similar purpose. Similarly, after you upgrade a
SharePoint Server site collection to SharePoint Server, you can view local scopes, but you cannot create, update, or
delete them. Therefore, you cannot use this cmdlet for local scopes after you upgrade a site collection. However,
you can convert local scopes to result sources, which serve a similar purpose.
The Remove-SPEnterpriseSearchQueryScopeRule cmdlet deletes one or more shared scope rules from the scope rule
collection.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "MySSA"


$scope = Get-SPEnterpriseSearchQueryScope -Identity MustCrawl -SearchApplication $ssa
Get-SPEnterpriseSearchQueryScopeRule -Scope $scope -Url https://criticalSite | Remove-
SPEnterpriseSearchQueryScopeRule -Url https://criticalSite

This example removes a scope rule for the URL https://criticalSite from a search service application named
MySSA.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the scope rule to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a scope
rule (for example, ScopeRule1); or an instance of a valid ScopeRule object.

Type: ScopeRulePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Scope
Filters to delete multiple rules for a specified scope.
The type must be a valid string that identifies the scope; for example, Scope1.

Type: ScopePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the query scope rule collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.
Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Filters to delete query scope rules for the specified results URL.
The type must be a valid URL, in the form https://server_name.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchRankingModel
In ths Article

Deletes a ranking model.

Syntax
Remove-SPEnterpriseSearchRankingModel [-Identity] <RankingModelPipeBind> -Owner <SearchObjectOwner>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes a specified ranking model.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

C:\PS>$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"


$owner = Get-SPEnterpriseSearchOwner -Level ssa
Remove-SPEnterpriseSearchRankingModel -Identity 8f6fd0bc-06f9-43cf-bbab-08c377e083f4 -SearchApplication $ssa -
Owner $owner

This example removes the ranking model for the search service application with the identity 8f6fd0bc-06f9-43cf-
bbab-08c377e083f4.
------------------EXAMPLE 2------------------

$owner = Get-SPEnterpriseSearchOwner -Level ssa


$MyRanking = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application" | Get-
SPEnterpriseSearchRankingModel -Owner $owner
Remove-SPEnterpriseSearchRankingModel -Identity $MyRanking -Owner $owner

This example removes the ranking model object MyRanking from the search service application Search Service
Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the ranking model to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, or an instance of a valid
RankingModel object.

Type: RankingModelPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Owner
Specifies the scope where the ranking model is available. The available scopes are: SSA, Tenant, Site Collection or
Site. A ranking model can be available in multiple scopes.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the ranking model.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.
Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchResultItemType
In ths Article

Removes a result item type for a search object owner.

Syntax
Remove-SPEnterpriseSearchResultItemType [-Identity] <ResultItemTypePipeBind> -Owner <SearchObjectOwner>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>]
[-SearchApplicationProxy <SearchServiceApplicationProxyPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchResultItemType cmdlet removes a user-created result item type, given a result type
identity and a search owner. You cannot use this cmdlet to remove the built-in result item types that are included
with SharePoint products.
Result item types enable you to change the look of search results based on the type of result. You start by defining
a collection of rules, which will be evaluated against the properties of results. Then you define the display template
to use for rendering that type of result. Once you have created the result item type, results matching the rules of
the result item type will display using the specified display template.
Example use cases:
Change the look of results for a particular file name extension, for example Word documents.
Change the look of a particular content type in search results.
Change the look of results from a particular author.
Add a result action to results from a particular result source as part of a custom search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$web = Get-SPWeb "UrlOfTheSite"


$tenantOwner = Get-SPEnterpriseSearchOwner -Level SPSite -SPWeb $web
$searchapp = Get-SPEnterpriseSearchServiceApplication
$resultType = Get-SPEnterpriseSearchResultItemType -Owner $tenantOwner -SearchApplication $searchapp
Remove-SPEnterpriseSearchResultItemType -Identity $resultType -Owner $tenantOwner -SearchApplication $searchapp

This example first defines variables for the URL of the site, the search owner and search application. It then
retrieves the result item type and checks whether the result item type is a built-in result item type or not. If
$resultType.BuiltIn returns false, the result item type is not built-in and you can modify it. Next, the example
removes the result item type referenced by $resultType for the owner referenced by $tenantOwner.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the result item type to update. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: ResultItemTypePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the result item type is created.
Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the name of the search application. The type must be a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplicationProxy
Specifies the proxy of the search application that contains the result item type. The type must be a valid GUID, in
the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application proxy name (for example,
SearchAppProxy1); or an instance of a valid SearchServiceApplicationProxy object.

Type: SearchServiceApplicationProxyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchResultItemType
Set-SPEnterpriseSearchResultItemType
Get-SPEnterpriseSearchResultItemType
Get-SPEnterpriseSearchOwner
minutes to read • Edit Online

Remove-SPEnterpriseSearchResultSource
In ths Article

Deletes a result source.

Syntax
Remove-SPEnterpriseSearchResultSource [-Identity] <ResultSourcePipeBind> -Owner <SearchObjectOwner>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes a specified result source. This cmdlet supports the same delete operations as are supported
through the "Manage Result Sources" page in Central Administration. The result source cannot be a built-in source
(a built-in source has the BuiltIn property set to true). For permissions and the most current information about
Windows PowerShell for SharePoint Products, see the online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"


$owner = Get-SPEnterpriseSearchOwner -Level SSA
Remove-SPEnterpriseSearchResultSource -Identity "Custom SharePoint Result Source" -SearchApplication $ssa -
Owner $owner

This example deletes the search service application level result source with the name "Custom SharePoint Result
Source".
------------------EXAMPLE 2------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"


$owner = Get-SPEnterpriseSearchOwner -Level SSA
Remove-SPEnterpriseSearchResultSource -Identity 12345678-90ab-cdef-1234-567890bcdefgh -SearchApplication $ssa -
Owner $owner

This example deletes the search service application level result source with the id 12345678-90ab-cdef-1234-
567890bcdefgh.
------------------EXAMPLE 3------------------
$ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Search Service Application"
$owner = Get-SPEnterpriseSearchOwner -Level SSA
$resultSource = Get-SPEnterpriseSearchResultSource -Identity "Custom SharePoint Result Source" -
SearchApplication $ssa -Owner $owner
Remove-SPEnterpriseSearchResultSource -Identity $resultSource -SearchApplication $ssa -Owner $owner

This example deletes the search service application level result source with the name "Custom SharePoint Result
Source", by specifying a Source instance.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the result source to delete. The result source cannot be a built in source. The type must be a valid GUID
string, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a result source (for example,
"Custom SharePoint Result Source"); or an instance of a valid Source object.

Type: ResultSourcePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding result source is available.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-
567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchResultSource
Get-SPEnterpriseSearchResultSource
Set-SPEnterpriseSearchResultSource
Get-SPEnterpriseSearchOwner
minutes to read • Edit Online

Remove-SPEnterpriseSearchSecurityTrimmer
In ths Article

Deletes a custom security trimmer.

Syntax
Remove-SPEnterpriseSearchSecurityTrimmer [[-Identity] <SecurityTrimmerPipeBind>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes the customized security trimmer that is used for a search application's query results. A custom
security trimmer trims search results before the results are returned to the user.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPEnterpriseSearchSecurityTrimmer -SearchApplication MySSA | Remove-SPEnterpriseSearchSecurityTrimmer

This example removes the security trimmer registered in the search service application named MySSA.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the security trimmer to delete.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, or an instance of a valid
SecurityTrimmer object.

Type: SecurityTrimmerPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the security trimmer.
The type must be a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid search application
name, for example, SearchApp1, or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchServiceApplication
In ths Article

Deletes a search service application.

Syntax
Remove-SPEnterpriseSearchServiceApplication [-Identity] <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-RemoveData] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes a specified SearchServiceApplication from a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPEnterpriseSearchServiceApplication -Identity MySSA

This example removes the search service application named MySSA from the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search service application to delete.
A valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid search application name (for
example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RemoveData
Specifies that all search databases and index files associated with the search service application to be deleted.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchServiceApplicationProxy
In ths Article

Deletes a search service application proxy.

Syntax
Remove-SPEnterpriseSearchServiceApplicationProxy [-Identity] <SearchServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet deletes the specified search service application proxy from a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPEnterpriseSearchServiceApplicationProxy -Identity SearchProxy

This example removes a search service application proxy named SearchProxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search service application proxy to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
application proxy (for example, ServiceAppProxy1); or an instance of a valid SearchServiceApplicationProxy object.

Type: SearchServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchServiceApplicationSiteSettings
In ths Article

Cleans up search settings for a particular site collection, subscription, or search application.

Syntax
Remove-SPEnterpriseSearchServiceApplicationSiteSettings [-Identity] <SiteSettingsPipeBind>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-TenantId <Guid>] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPEnterpriseSearchServiceApplicationSiteSettings cmdlet to remove all search settings for the
specified site collection, subscription, or search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$app = Get-SPEnterpriseSearchServiceApplication
$GC = Start-SPAssignment
$s = $GC | Get-SPSite UrlOfASiteCollection
Remove-SPEnterpriseSearchServiceApplicationSiteSettings -Identity $s.ID.ToString() -SearchApplication $app
Stop-SPAssignment $GC

This example removes the search settings for the site collection referenced by $s in the search application
referenced by $app. $s is the site collection with URL "UrlOfSiteCollection" and $s.ID.ToString() is the string
representation of the site ID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the site collection to remove search settings from. The type must be a valid GUID, in the form 12345678-
90ab-cdef-1234-567890bcdefgh.

Type: SiteSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the name of the search application. The type must be a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TenantId
Specifies the tenant from which to remove search settings. The type must be a valid GUID in the form 12345678-
90ab-cdef-1234-567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Upgrade-SPEnterpriseSearchServiceApplicationSiteSettings
minutes to read • Edit Online

Remove-SPEnterpriseSearchSiteHitRule
In ths Article

Deletes a site hit rule.

Syntax
Remove-SPEnterpriseSearchSiteHitRule [-Identity] <SiteHitRulePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-SearchService <SearchServicePipeBind>] [-WhatIf]
[<CommonParameters>]

Description
The Remove-SPEnterpriseSearchSiteHitRule cmdlet deletes the site hit rule that controls the number of threads used
to crawl a given site.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-------------------

Remove-SPEnterpriseSearchSiteHitRule -Identity myHost

This example removes a site hit rule for the myHost host.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The rule that is used for the specified site.
The type must be a valid site hit rule host or an instance of a valid SiteHitRule object.

Type: SiteHitRulePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchService
Specifies the search service in the farm that hosts the crawl.
The type must be an instance of a valid SearchService object; otherwise, the local service on the server that hosts
the Windows PowerShell cmdlet is used.

Type: SearchServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchTenantConfiguration
In ths Article

Removes all tenant specific search settings.

Syntax
Remove-SPEnterpriseSearchTenantConfiguration [-SiteSubscriptionId] <Guid>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPEnterpriseSearchTenantConfigurationcmdlet removes all tenant specific search settings. The removed
settings are: query Rules, result types, result sources, managed metadata, ranking models, search dictionaries,
authoritative pages, query suggestion settings, client types and the default search center. Use this cmdlet when
removing tenants and in conjunction with moving tenants. When moving a tenant, copy the tenant configuration
from the source to the destination and then use this cmdlet to remove the tenant configuration from the source
farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Remove-SPEnterpriseSearchTenantConfiguration -SiteSubscriptionId "00000000-0000-0000-0000-000000000001" -
SearchApplication $ssa

This example uses Remove-SPEnterpriseSearchTenantConfiguration to remove all tenant specific settings from the
search service application referenced by $ssa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the name of the search application that contains the tenant configuration. The type must be a valid GUID,
in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example,
SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscriptionId
Specifies the site subscription of the tenant. The type must be a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh.

Type: Guid
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchTenantSchema
In ths Article

Removes a defined search schema.

Syntax
Remove-SPEnterpriseSearchTenantSchema [-Identity] <TenantSchemaPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-SiteCollection <Guid>] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet removes a search schema. Use this cmdlet to remove an unused or unwanted search schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
[Guid]$guid = "909b84cb-90f2-4a1b-8df4-22547a9b2227"
Remove-SPEnterpriseSearchTenantSchema -Identity $guid -SearchApplication $ssa

This example removes the search schema for the tenant with GUID 909b84cb-90f2-4a1b-8df4-22547a9b2227.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the tenant of the search schema to be removed.
The type must be a valid GUID, in string form, that identifies the tenant in the form 12345678-90ab-cdef-1234-
567890bcdefgh.
The tenant GUID can be found in the Search Service Application database, in the folder
\Databases\Search_Service_Application\Tables\dbo.MSSTenant.

Type: TenantSchemaPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the enterprise search schema to be removed.
The type must be a valid search application name (for example, SearchApp1), or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollection
Specifies that the search schema to be removed is within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPEnterpriseSearchTopology
In ths Article

Removes an inactive search topology from a search service application.

Syntax
Remove-SPEnterpriseSearchTopology [-Identity] <SearchTopologyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet removes the given inactive search topology from the search service application to which it belongs.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Identity 4b32-4fe6-8f8d-065388df201e
Remove-SPEnterpriseSearchTopology -Identity $topology

This example removes a search topology with the identity 4b32-4fe6-8f8d-065388df201e.


------------------EXAMPLE 2------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Remove-SPEnterpriseSearchTopology -Identity $topo -SearchApplication $ssa

This example removes the search topology referenced by $topo in the search service application referenced by
$ssa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search topology to retrieve.

Type: SearchTopologyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application to which the search topology belongs.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchTopology
New -SPEnterpriseSearchTopology
Set-SPEnterpriseSearchTopology
minutes to read • Edit Online

Remove-SPExcelBIServer
In ths Article

Removes an instance of Analysis Services.

Syntax
Remove-SPExcelBIServer [-Identity] <SPExcelBIServerPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] -ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPExcelBIServer cmdlet to remove an instance of Analysis Services from the Allow List of BI
servers to be used with Excel Services.

Examples
-----------------------EXAMPLE-----------------------------

Remove-SPExcelBIServer -ExcelServiceApplication "MyExcel"

This example removes the instance of the anaylsis services that uses the Excel Service Application named,
"MyExcel".

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelFileLocation list
object.The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
Excel Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a
valid SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the ExcelServiceApplication identity.

Type: SPExcelBIServerPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Office.Excel.Server.Cmdlet.SPExcelBIServerPipeBind
Microsoft.Office.Excel.Server.Cmdlet.SPExcelServiceApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Remove-SPExcelBlockedFileType
In ths Article

Removes an entry from the list of file types that are prevented from loading on Excel Services Application.

Syntax
Remove-SPExcelBlockedFileType [-Identity] <SPExcelBlockedFileTypePipeBind>
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPExcelBlockedExcelFileType cmdlet removes an entry from the list of file types that are prevented
from loading on an Excel Services Application Web service application. Excel Services Application does not load
any file types that correspond to a file type that is on this list.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

Get-SPExcelServiceApplication -Identity "MyExcelService" | Remove-SPExcelBlockedExcelFileType -FileType XLSX

This example removes the .xlsx file name extensions from the list of file types that are prevented from loading by
Excel Services Application.
After the .xlsx file name extension is removed from the list, these extensions are allowed to load in Excel Services
Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPBlockedExcelFileType list
object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the file type to remove from the list of blocked file types.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; one of the following file
types: XLSX, XLSB, XLSM; or an instance of a valid SPExcelBlockedFileType object.

Type: SPExcelBlockedFileTypePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPExcelDataConnectionLibrary
In ths Article

Removes a data connection library from Excel Services Application.

Syntax
Remove-SPExcelDataConnectionLibrary [-Identity] <SPExcelDCLPipeBind>
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPExcelDataConnectionLibrary cmdlet removes a library from the Excel Services Application trusted
data connection libraries list. Excel Services Application loads data connection files only if they are stored in a data
connection library that is on the trusted data connection libraries list.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

Get-SPExcelServiceApplication | Get-SPExcelDataConnectionLibrary | Remove-SPExcelDataConnectionLibrary

This example removes all data connection libraries from all Excel Services Application running in the farm.
Connection files are no longer loaded from any libraries. Workbooks that depend on any connection files might not
refresh data.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelDataConnectionLibrary
list object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the data connection library to remove.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data
connection library (for example, DataConnectionLib1); a valid URL, in the form https://server_name; or an instance
of a valid SPExcelDCL object.

Type: SPExcelDCLPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPExcelDataProvider
In ths Article

Removes a data provider from Excel Services Application.

Syntax
Remove-SPExcelDataProvider [-Identity] <SPExcelDataProviderPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPExcelDataProvider cmdlet removes a data provider that is stored on the list of safe data providers.
Excel Services Application refreshes external data connections only if the data provider for that connection is on the
list of safe data providers. Excel Services Application includes a set of common data providers on this list, so using
cmdlets to modify safe data providers is typically done only in custom data connection scenarios.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

C:\PS>$provider = Get-SPExcelServiceApplication -Identity "MyExcelService" | Get-SPExcelDataProvider | { where


{$_.providerID -eq "MyCustomProvider"}

Remove-SPExcelDataProvider $provider

This example removes a custom data provider from the list of safe data providers that is on the Excel Services
Application Web service application named MyExcelService.
Excel Services Application will no longer refresh any data connections that use this data provider.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SPExcelDataProvider object to remove.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, or an instance of a valid
SPExcelDataProvider object.

Type: SPExcelDataProviderPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPExcelFileLocation
In ths Article

Removes a trusted file location from Excel Services Application.

Syntax
Remove-SPExcelFileLocation [-Identity] <SPExcelFileLocationPipeBind>
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPExcelFileLocation cmdlet removes a location from the list of trusted file locations. Excel Services
Application loads only workbooks that are stored in a trusted file location. Properties of trusted file locations
control how workbooks can be used when loaded on Excel Services Application. Excel Services Application always
enforces the properties defined by the trusted file location from which a workbook was loaded. The properties
used by the trusted file location are determined by comparing the file path for the workbook with the Address
parameter of the trusted file location.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

Get-SPExcelServiceApplication | Get-SPExcelFileLocation | where {$_.Address -ne "http://"} | Remove-


SPExcelFileLocation

This example removes all nondefault trusted file locations from every Excel Services Application Web service
application in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelFileLocation list object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the FileLocation object to remove.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid string that
identifies the file location, in the form https://myPortal/myTeam; a valid string that identifies the path, in the form
C:\folder_name; or an instance of a valid SPExcelFileLocation object.

Type: SPExcelFileLocationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPExcelUserDefinedFunction
In ths Article

Removes a user-defined function from Excel Services Application.

Syntax
Remove-SPExcelUserDefinedFunction [-Identity] <SPExcelUDFPipeBind>
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPExcelUserDefinedFunction cmdlet removes a user-defined function from the list of user-defined
functions. User-defined functions are managed code assemblies that can be called from an Excel Services
Application workbook by using standard Excel Services Application formula syntax. The assemblies can perform
custom logic or other actions, such as refresh data. The Windows PowerShell cmdlets operate on the entries in the
user-defined function list, but do not operate on the assemblies.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

Get-SPExcelServiceApplication | Remove-SPExcelUserDefinedFunction -Identity


"SampleCompany.SampleApplication.SampleUdf"

This example removes the SampleCompany.SampleApplication.SampleUdf user-defined function from the list of
user-defined functions for every Excel Services Application Web service application in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the list of user-defined functions.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the SPExcelUserDefinedFunction object that you want to remove.
The type must be a valid name of the code assembly (for example,
SampleCompany.SampleApplication.SampleUdf); or an instance of a valid SPExcelUDF object.

Type: SPExcelUDFPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPInfoPathUserAgent
In ths Article

Removes a user agent.

Syntax
Remove-SPInfoPathUserAgent [-Identity] <SPUserAgentPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPIPUserAgent cmdlet removes a specified user agent from the user agent collection on a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

Remove-SPInfoPathUserAgent -Identity "UserAgentName"

This example removes a user agent.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the user agent to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a user
agent (for example, UserAgent1; or an instance of a valid SPUserAgent object.

Type: SPUserAgentPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPManagedAccount
In ths Article

Removes a managed account registration from the farm.

Syntax
Remove-SPManagedAccount [-Identity] <SPManagedAccountPipeBind> -NewPassword <SecureString>
[-AssignmentCollection <SPAssignmentCollection>] [-ChangePassword] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Remove-SPManagedAccount cmdlet removes account registration from the configuration database within the
farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE-------------------

Remove-SPManagedAccount -Identity DOMAIN\ServiceAcct

This example removes the DOMAIN\ServiceAcct managed account from the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ChangePassword
Specifies whether a password is to be changed. Works in conjunction with the NewPassword parameter. When the
ChangePassword value is set, a secure string value is required for the NewPassword parameter (that is,
$MySecureString).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the full name or partial name of the managed accounts to retrieve.
The type must be a valid account name, in the form Domain\User, or a GUID, in the form 1234-3456-09876.

Type: SPManagedAccountPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NewPassword
Specifies a secure string for the new password (that is, $MySecureString). Works in conjunction with the
ChangePassword parameter.

Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPManagedPath
In ths Article

Deletes the specified managed path from the specified host header or Web application.

Syntax
Remove-SPManagedPath [-Identity] <SPPrefixPipeBind> [-HostHeader]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-SPManagedPath [-Identity] <SPPrefixPipeBind> -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Remove-SPManagedPath cmdlet deletes the managed path specified by the Identity parameter from the host
header or the Web application. The Identity must be the partial URL of the managed path to be deleted.
If you are using host-named site collections, specify the HostHeader parameter. To delete a host-named site
collection managed path, provide the HostHeader switch. Otherwise, you must specify the Web application that
contains the managed path to be deleted.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE 1----------------------------

Remove-SPManagedPath "sites" -HostHeader

This example removes the sites managed path from the list of host-named site collection managed paths.
Depending on the confirmation level of the local system, the preceding example can prompt prior to execution.
------------------EXAMPLE 2-----------------------

Get-SPWebApplication | Remove-SPManagedPath "personal" -confirm:$false

This example removes the personal managed path from all Web applications in the farm. This command does not
prompt for confirmation.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostHeader
Specifies that the Identity is a host header managed path.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the managed path to delete. For example, in the URL https://sitename/sites/site1, "sites" is
the name of the managed path.

Type: SPPrefixPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the identity of the Web application that hosts the managed path to delete. The type must be a valid GUID,
in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid Web application name (for example,
WebApplication1212); or a valid name, in the form WebApp2423.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPPerformancePointServiceApplication
In ths Article

Deletes a PerformancePoint Service application from a farm.

Syntax
Remove-SPPerformancePointServiceApplication
[-Identity] <SPPerformancePointMonitoringServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPPerformancePointServiceApplication cmdlet deletes a PerformancePoint Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-----------------

Remove-SPPerformancePointServiceApplication -Identity PPSApp_01

This example removes the PPSApp_01 PerformancePoint Service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
et-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the PerformancePoint Service application to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
PerformancePoint Service application (for example, PerfPointApp1); or an instance of a valid
SPPerformancePointMonitoringServiceApplication object.

Type: SPPerformancePointMonitoringServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPPerformancePointServiceApplicationProxy
In ths Article

Deletes the proxy for a PerformancePoint Service application.

Syntax
Remove-SPPerformancePointServiceApplicationProxy
[-Identity] <SPPerformancePointMonitoringServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPPerformancePointServiceApplicationProxy cmdlet deletes the proxy for a PerformancePoint Service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE--------------------

Remove-SPPerformancePointServiceApplicationProxy -Identity PPS_Application_Proxy_01

This example removes the PPS_Application_Proxy_01 application proxy from its associated PerformancePoint
Service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the PerformancePoint Service application proxy to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
PerformancePoint Service application proxy (for example, PerfPointAppProxy1); or an instance of a valid
SPPerformancePointMonitoringServiceApplicationProxy object.

Type: SPPerformancePointMonitoringServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-
SPPerformancePointServiceApplicationTrustedLocation
In ths Article

Removes a single trusted location from a PerformancePoint Service application.

Syntax
Remove-SPPerformancePointServiceApplicationTrustedLocation
-Identity <SPPerformancePointMonitoringServiceApplicationTrustedLocationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPPerformancePointServiceApplicationTrustedLocation cmdlet deletes a single trusted location from a
PerformancePoint Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE--------------------

Remove-SPPerformancePointServiceApplicationTrustedLocation -Identity

This example removes a Trusted Location having the specified GUID from a PerformancePoint Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the trusted location to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid
SPPerformancePointMonitoringServiceApplicationTrustedLocation object.

Type: SPPerformancePointMonitoringServiceApplicationTrustedLocationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPPluggableSecurityTrimmer
In ths Article

Removes a pluggable security trimmer from a profile service application proxy.

Syntax
Remove-SPPluggableSecurityTrimmer -UserProfileApplicationProxyId <Guid> -PlugInId <Int32>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPPluggableSecurityTrimmer cmdlet to remove a specified pluggable security trimmer from a User
Profile service application proxy.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE 1----------------------

$pr = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Remove-SPPluggableSecurityTrimmer -UserProfileApplicationProxyId $pr.Id -PlugInId 0

This example removes a pluggable security trimmer.


-----------------EXAMPLE 2----------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Remove-SPPluggableSecurityTrimmer -UserProfileApplicationProxyId $proxy.Id -PlugInId 0

This example turns off security trimming in a User Profile Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PlugInId
The index of the pluggable security trimmer must have an integer value greater than or equal to zero.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserProfileApplicationProxyId
Specifies the ID of the User Profile service application proxy from which the pluggable security trimmer is
removed.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPProfileLeader
In ths Article

Remove a company leader.

Syntax
Remove-SPProfileLeader [-ProfileServiceApplicationProxy] <SPServiceApplicationProxyPipeBind>
[-Name] <SPProfileLeaderPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).
Use the Remove-SPProfileLeader cmdlet to remove a user as the company leader.
For additional information about SPProfileLeader cmdlets, see The *-SPProfileLeader Windows PowerShell
cmdlets in SharePoint Server SP1 (https://go.microsoft.com/fwlink/p/?LinkId=226295)
(https://go.microsoft.com/fwlink/p/?LinkId=226295).

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Remove-SPProfileLeader -ProfileServiceApplicationProxy $proxy -Name "contoso\janedow"

This example removes the user "Jane Dow" from the leaders list for a specific user profile service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the account name to be removed as a leader for the new User Profile Service application. For example,
Contoso\Joe.

Type: SPProfileLeaderPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the name of the User Profile Service Application Proxy to use.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run. This parameter is mandatory in a hosted-environment
and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPProfileSyncConnection
In ths Article

Removes a synchronization connection.

Syntax
Remove-SPProfileSyncConnection [-ProfileServiceApplication] <SPServiceApplicationPipeBind>
-ConnectionDomain <String> -ConnectionForestName <String> -ConnectionPassword <SecureString>
-ConnectionSynchronizationOU <String> -ConnectionUserName <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-ConnectionNamingContext <String>]
[-ConnectionServerName <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).
Use the Remove-SPProfileSyncConnection cmdlet to remove a User Profile synchronization connection.
This cmdlet only works with Active Directory Synchronization Connections
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

Remove-SPProfileSyncConnection -ProfileServiceApplication 888ds256-9ad9-53a9-f135-99eecd245670b -


ConnectionDomain "Fabrikam" -ConnectionUserName "Testupa" -ConnectionPassword convertto-securestring
"Password1" -asplaintext -force -ConnectionSynchronizationOU "OU=SharePoint Users,DC=fabrikam,DC=com"

This example removes a user from the fabrikam domain using a specific user profile service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionDomain
Specifies the NetBIOS name of the domain you are connecting to.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionForestName
Specifies the forest name you are connecting to.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionNamingContext
Specifies the naming context of the directory information tree to connect to.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionPassword
Specifies the password of the account used for directory connection.
Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionServerName
Specifies the name of the connection server.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionSynchronizationOU
Specifies the top level organizational unit (OU ) that you would like to synchronize. The value must be a domain
name and you can only include one container per command.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionUserName
Specifies the user name to be used for the synchronization connection.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileServiceApplication
Specifies the name of the User Profile service application.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPProjectWebInstanceData
In ths Article

Disassociates a Site Collection with the Project Server instance.

Syntax
Remove-SPProjectWebInstanceData [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-SiteCollection <SPSitePipeBind> [-WhatIf] [<CommonParameters>]

Description
This cmdlet disassociates the Project Server instance from the specified Site Collection, disabling the PWA Feature
and removing Project content.

Examples
----------------------EXAMPLE-----------------------

Remove-SPProjectWebInstanceData -SiteCollection https://contoso/sites/pwa

This example disassociates https://contoso/sites/pwa from the Project Server instance.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollection
The site collection to disassociate from the Project Server instance.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPSitePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Remove-SPRoutingMachineInfo
In ths Article

Removes an external routing target.

Syntax
Remove-SPRoutingMachineInfo [-Identity] <SPRoutingMachineInfoPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Remove-SPRoutingMachineInfo cmdlet to remove an external routing target by using the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------EXAMPLE-------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

C:\PS>$M=Get-SPRoutingMachineInfo -RequestManagementSettings $rm -Name

Remove-SPRoutingMachineInfo -Identity $M

This example removes a routing target for a specified identity.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the computer object that Request Manager will remove.

Type: SPRoutingMachineInfoPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Add-SPRoutingMachineInfo
Get-SPRoutingMachineInfo
Set-SPRoutingMachineInfo
minutes to read • Edit Online

Remove-SPRoutingMachinePool
In ths Article

Removes a routing pool from Request Manager.

Syntax
Remove-SPRoutingMachinePool [-Identity] <SPRoutingMachinePoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Remove-SPRoutingMachinePool cmdlet to remove a routing pool from the Request Manager object by using
the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

C:\PS>$pool=Get-SPRoutingMachinePool -RequestManagementSettings $rm

Remove-SPRoutingMachinePool -Identity $pool

This example removes a routing pool for the specified identity by using the $pool variable.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the Request Manager object to remove.

Type: SPRoutingMachinePoolPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Add-SPRoutingMachinePool
Get-SPRoutingMachinePool
Set-SPRoutingMachinePool
minutes to read • Edit Online

Remove-SPRoutingRule
In ths Article

Removes a routing rule.

Syntax
Remove-SPRoutingRule [-Identity] <SPRoutingRulePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Remove-SPRoutingRule cmdlet removes a routing rule by using the Identity parameter. If the Identity parameter
is not specified, the routing rules for the entire farm are removed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

Get-SPRoutingRule -RequestManagementSettings $rm

C:\PS>$machines=Get-SPRoutingMachineInfo -RequestManagementSettings $rm

C:\PS>$pool=Add-SPRoutingMachinePool -RequestManagementSettings $rm -Name -MachineTargets $machines

C:\PS>$c=New-SPRequestManagementRuleCriteria -Value http -Property url -MatchType startswith -CaseSensitive


$false

C:\PS>$rule=Add-SPRoutingRule -RequestManagementSettings $rm -Name -Criteria $c -MachinePool $pool

Remove-SPRoutingRule -Identity $rule

This example removes a routing for a specified identity by using the $rule variable.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the rule object to remove.

Type: SPRoutingRulePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Add-SPRoutingRule
Get-SPRoutingRule
Set-SPRoutingRule
minutes to read • Edit Online

Remove-SPScaleOutDatabase
In ths Article

Removes a specific scale-out database.

Syntax
Remove-SPScaleOutDatabase -Database <SPDatabasePipeBind> -ServiceApplication <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DeleteData] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPScaleOutDatabase cmdlet to remove a specific scale-out database from a specified service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

C:\PS>$databases = Get-SPScaleOutDatabase -ServiceApplication $serviceApplication

C:\PS>$database = $databases[0]

Remove-SPScaleOutDatabase -ServiceApplication $serviceApplication -Database $database

This example removes the specified scale-out database from the specified service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database to remove.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DeleteData
Specifies whether to delete data when the scale out database is removed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application of the scale-out database to remove.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPScaleOutDatabase
Get-SPScaleOutDatabase
minutes to read • Edit Online

Remove-SPSecureStoreApplication
In ths Article

Deletes a Secure Store application.

Syntax
Remove-SPSecureStoreApplication -Identity <SPSecureStoreApplication>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPSecureStoreApplication cmdlet deletes a Secure Store application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

Get-SPSecureStoreApplication -ServiceContext http://contoso -Name "ContosoTargetApp" | Remove -


SPSecureStoreApplication

This example removes the specified application and target.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Secure Store application to delete.

Type: SPSecureStoreApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSecureStoreSystemAccount
In ths Article

Removes a user account from a designated list.

Syntax
Remove-SPSecureStoreSystemAccount [-Identity] <SPSecureStoreSystemAccountPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPSecureStoreSystemAccount cmdlet to remove a user account from a designated list of accounts
which will be considered a system account.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE 1-----------------------------

Remove-SPSecureStoreSystemAccount -Identity contoso\jdoe

This example removes a specific user name jdoe by using the Identity parameter.
-----------------------EXAMPLE 2-----------------------------

Get-SPSecureStoreSystemAccount | Where-Object -filter {$_.AccountName -eq 'Contoso\admin'} | Remove-


SPSecureStoreSystemAccount

This example removes the admin, user from the contoso domain by filtering the results from the
Get-SPSecureStoreSystemAccount cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name, object, or GUID to remove.

Type: SPSecureStoreSystemAccountPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPSecureStoreSystemAccount
Get-SPSecureStoreSystemAccount
minutes to read • Edit Online

Remove-SPServerScaleOutDatabase
In ths Article

Removes a specific scale-out database.

Syntax
Remove-SPServerScaleOutDatabase -Database <SPDatabasePipeBind>
-ServiceApplication <SPServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DeleteData] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPServerScaleOutDatabase cmdlet to remove a specific scale-out database from a specified
service application.

Examples
-----------------------EXAMPLE-----------------------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Managed Metadata Service'}


$database = Get-SPServerScaleOutDatabase -ServiceApplication $sa
Remove-SPServerScaleOutDatabase -Database $database -ServiceApplication $sa

This example removes the specified scale-out database from the Managed Metadata Service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database to remove.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DeleteData
Specifies whether to delete data when the scale out database is removed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the service application of the scale-out database to remove.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Add-SPServerScaleOutDatabase
Get-SPServerScaleOutDatabase
Split-SPServerScaleOutDatabase
minutes to read • Edit Online

Remove-SPServiceApplication
In ths Article

Deletes the specified service application on the local server.

Syntax
Remove-SPServiceApplication [-Identity] <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-RemoveData] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPServiceApplication cmdlet deletes the specified service application from the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------------

Remove-SPServiceApplication 053c34be-d251-488c-8e94-644eae94da26 -RemoveData

This example deletes the service application and its database.


The service application GUID is unique to every farm. You can run the Get-SPServiceApplication cmdlet to see the
GUID of the service applications and then use the result from the Get-SPServiceApplication cmdlet for other
SPServiceApplication cmdlets; for example, or Publish-SPServiceApplication .

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID of the service application to remove.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RemoveData
Deletes all databases and other data associated with the service application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPServiceApplicationPool
In ths Article

Completely deletes the specified Web service application pool.

Syntax
Remove-SPServiceApplicationPool [-Identity] <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPServiceApplicationPool cmdlet completely deletes the specified Web service application pool.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Remove-SPServiceApplicationPool TestServiceWebApplicationPool

This example deletes the selected service application pool.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity of the Web service application pool to delete.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPServiceApplicationProxy
In ths Article

Deletes the specified service application proxy.

Syntax
Remove-SPServiceApplicationProxy [-Identity] <SPServiceApplicationProxyPipeBind> [-RemoveData] [-Confirm]
[-WhatIf] [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Remove-SPServiceApplicationProxy cmdlet deletes the service application proxy specified by the Identity
parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Remove-SPServiceApplicationProxy $proxy

This example deletes the User Profile Service Application proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID of the service application proxy to remove.
The type must be a GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RemoveData
Deletes all databases and other data associated with the service application proxy.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPServiceApplicationProxyGroup
In ths Article

Completely deletes the specified service application proxy group.

Syntax
Remove-SPServiceApplicationProxyGroup [-Identity] <SPServiceApplicationProxyGroupPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Completely deletes the specified service application proxy group.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-------------------------

Remove-SPServiceApplicationProxyGroup RemoteProxyGroup

This example deletes the service application proxy group named RemoteProxyGroup.
The service application proxy group GUID is unique to every farm. You can run
Get-SPServiceApplicationProxyGroup | Select Name,Id to see the GUID of the service application proxy groups. Use
this result for any other SPServiceApplicationProxyGroup cmdlets.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The identity of the service application proxy group to delete.

Type: SPServiceApplicationProxyGroupPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPServiceApplicationProxyGroupMember
In ths Article

Removes one or more proxies from the specified service application proxy group.

Syntax
Remove-SPServiceApplicationProxyGroupMember [-Identity] <SPServiceApplicationProxyGroupPipeBind>
[-Member] <SPServiceApplicationProxyPipeBind[]> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
The Remove-SPServiceApplicationProxyGroupMember cmdlet removes one or more proxies from the specified service
application proxy group.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Remove-SPServiceApplicationProxyGroupMember RemoteProxyGroup -Member babab30e-8e3a-428b-8ff4-4d5c8f455e6d

This example removes a service application proxy from the selected service application proxy group named
RemoteProxyGroup.
The service application proxy group GUID is unique to every farm. You can run
Get-SPServiceApplicationProxyGroup | Select Name,Id to see the GUID of the service application proxy groups. Use
this result for any other SPServiceApplicationProxyGroup cmdlets.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity of the service application proxy group from which to remove the member or members.

Type: SPServiceApplicationProxyGroupPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Member
Specifies the member or members to remove from the service application proxy group.

Type: SPServiceApplicationProxyPipeBind[]
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPShellAdmin
In ths Article

Removes a user from the SharePoint_Shell_Access role.

Syntax
Remove-SPShellAdmin [-UserName] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-database <SPDatabasePipeBind>] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPShellAdmin cmdlet to remove a user from the SharePoint_Shell_Access role in a specified
database.
When you use this cmdlet to remove a user from the role, you do not remove the user from the
WSS_ADMIN_WPG group in the target database.
When you run this cmdlet to add a user to the SharePoint_Shell_Access role, the user must have the following
security permissions:
Security_Admin role access on the instance of SQL Server and the db_owner role in the database.
Administrative permission to the local computer.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------------EXAMPLE-----------------------------

Remove-SPShellAdmin -UserName CONTOSO\User1 -database 4251d855-3c15-4501-8dd1-98f960359fa6

This example removes an existing user named User1 from the SharePoint_Shell_Access role in the database
specified.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-database
Specifies the GUID of the database or the Database Object that includes the SharePoint_Shell_Access role from
which the user is to be removed. If the database parameter is not specified, the configuration database is used.

Type: SPDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UserName
Specifies the name of the user you want to remove from the SharePoint_Shell_Access role in the specified
database.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSite
In ths Article

Completely deletes an existing site collection and all subsites.

Syntax
Remove-SPSite [-Identity] <SPSitePipeBind> [-DeleteADAccounts] [-GradualDelete]
[-CheckComplianceFlags <Boolean>] [-AssignmentCollection <SPAssignmentCollection>] [-WhatIf] [-Confirm]
[<CommonParameters>]

Description
The Remove-SPSite cmdlet completely deletes an existing site collection and all subsites. This operation cannot
be undone.

Examples
------------------EXAMPLE 1-----------------------

Remove-SPSite -Identity 'https://sitename' -GradualDelete -Confirm:$False

This example removes the given site collection and all included sites by using GradualDelete which places the site
in the site recycle bin; confirmation has been suppressed.
------------------EXAMPLE 2-----------------------

Remove-SPSite -Identity 'https://sitename'

This example immediately deletes the site and it's contents from the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CheckComplianceFlags
Specifies if compliance flags are enabled.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeleteADAccounts
Forces deletion of user accounts from Active Directory Domain Services (AD DS ). This applies when in AD DS
account creation mode and the value of this parameter is True, AD DS accounts associated with the site collection
are also deleted from AD DS.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GradualDelete
If provided, occurs gradually to use less system load.
This operation is strongly recommended for deleting very large sites. This option places the site in the site recycle
bin instead of immediately deleting the site.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
Specifies the identity of the site to delete. The identity can be either a valid URL, in the form https://server_name; a
valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an SPSite object.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSiteMaster
In ths Article

Removes a site master.

Syntax
Remove-SPSiteMaster [-ContentDatabase] <SPContentDatabasePipeBind> [-SiteId] <Guid>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPSiteMaster cmdlet to remove a site master from the database.

Examples
-----------------------EXAMPLE-----------------------------

$master = Get-SPSiteMaster -ContentDatabase WSS_Content | Select -First 1


Remove-SPSiteMaster -ContentDatabase WSS_Content -SiteId $master.SiteId

This example removes the first Site Master found in the WSS_Content database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the name of the database to remove the site master. For example, WSS_Content.

Type: SPContentDatabasePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-SiteId
Specifies the ID of the Site Master to remove. For example, ff480534-7e64-44a5-b7e3-7c418624cdf6.

Type: Guid
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPContentDatabasePipeBind
System.Guid Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Remove-SPSiteSubscription
In ths Article

Removes data stored in a subscription settings service application for a set of site subscriptions.

Syntax
Remove-SPSiteSubscription [-Identity] <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPSiteSubscription cmdlet removes a site subscription along with all contained site collections and
settings.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Remove-SPSiteSubscription "https://contoso.com"

This example removes all data for the contoso.com site subscription (site collections, site subscription and settings).

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the removal of a site subscription and is the only way to stop this command from prompting for
confirmation.
The type must be either of the following values:
True
False
The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the site subscription settings service application that contains the service data to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription settings service application (for example, SubscriptionSettingsApp1); or an instance of a valid
SPSubscriptionSettingsServiceApplication object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSiteSubscriptionBusinessDataCatalogConfig
In ths Article

Removes the Business Data Connectivity Metadata Store for a partition.

Syntax
Remove-SPSiteSubscriptionBusinessDataCatalogConfig -ServiceContext <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPSiteSubscriptionBusinessDataCatalogConfig cmdlet removes the Business Data Connectivity Metadata
Store and all associated data for a specified partition. To completely remove a partition and the data that it contains,
run the Clear-SPSiteSubscriptionBusinessDataCatalogConfig cmdlet to remove the data from the Business Data
Connectivity Metadata Store and then run the Remove-SPSiteSubscriptionBusinessDataCatalogConfig cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPSiteSubscriptionBusinessDataCatalogConfig -ServiceContext http://contoso

This example removes the Business Data Connectivity Metadata Store for the partition http://contoso.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context of the Business Data Connectivity Metadata Store to remove.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
context (for example, http://ServiceContext1); or an instance of a valid SPServiceContext object.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSiteSubscriptionFeaturePack
In ths Article

Removes a SharePoint Feature set from a site subscription.

Syntax
Remove-SPSiteSubscriptionFeaturePack [-Identity] <SPSiteSubscriptionFeaturePackPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPSiteSubscriptionFeaturePack cmdlet removes a SharePoint Feature set by specifying the GUID or
Feature set object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE------------------------

Remove-SPFeatureSet -Identity "30daa535-b0fe-4d10-84b0-fb04029d161a"

This example removes a SharePoint Feature set that has the ID 30daa535-b0fe-4d10-84b0-fb04029d161a.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Feature set object to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a
feature set (for example, FeatureSet1); or an instance of a valid SPFeatureSet object.

Type: SPSiteSubscriptionFeaturePackPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSiteSubscriptionFeaturePackMember
In ths Article

Removes a feature definition from the provided SharePoint Feature set.

Syntax
Remove-SPSiteSubscriptionFeaturePackMember [-Identity] <SPSiteSubscriptionFeaturePackPipeBind>
[-AllFeatureDefinitions] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Remove-SPSiteSubscriptionFeaturePackMember [-Identity] <SPSiteSubscriptionFeaturePackPipeBind>


-FeatureDefinition <SPFeatureDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Remove-SPSiteSubscriptionFeaturePackMember cmdlet removes the provided FeatureDefinition parameter from
the feature set specified by the Identity parameter. If the AllFeatureDefinitions flag is provided, all feature
definitions are removed from the given Feature set.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

C:\PS>$FS = Get-SPSiteSubscriptionFeaturePack "30daa535-b0fe-4d10-84b0-fb04029d161a"

Remove-SPSiteSubscriptionFeaturePackMember -Identity $fs -FeatureDefinition (Get-SPFeature "PublishingSite")

This example removes the PublishingSite feature from the Feature set that has ID 30daa535-b0fe-4d10-84b0-
fb04029d161a.
------------------EXAMPLE 2-----------------------

Get-SPSiteSubscriptionFeaturePack "30daa535-b0fe-4d10-84b0-fb04029d161a" | Remove-


SPSiteSubscriptionFeaturePackMember -AllFeatureDefinitions

This example removes all features from the Feature set 30daa535-b0fe-4d10-84b0-fb04029d161a.
Parameters
-AllFeatureDefinitions
Clears all features from the Feature set.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FeatureDefinition
Specifies the feature definition to be removed.

Type: SPFeatureDefinitionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the Feature set from which to remove a feature.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a
feature set (for example, FeatureSet1); or an instance of a valid SPFeatureSet object.

Type: SPSiteSubscriptionFeaturePackPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSiteSubscriptionMetadataConfig
In ths Article

Removes site subscription configuration settings.

Syntax
Remove-SPSiteSubscriptionMetadataConfig [-Identity] <SPSiteSubscriptionPipeBind>
[-ServiceProxy] <SPMetadataServiceProxyCmdletPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPSiteSubscriptionMetadataConfig cmdlet to remove the site subscription-specific configuration
settings for a specified Metadata Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-------------------

Remove-SPSiteSubscriptionMetadataConfig -Identity $siteSubscriptionPipeBind1 -ServiceProxy


"MetadataServiceProxy2"

This example removes the site subscription-specific settings from an existing partitioned Metadata Service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the site subscription for which to remove the Metadata Service application settings.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site
subscription (for example, SiteSubscriptionConfig1); or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceProxy
Specifies the local metadata service proxy for the service application containing the site subscription-specific
settings.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of the
service application proxy (for example, ServiceAppProxy1); or an instance of a valid SPMetadataServiceProxy
object.

Type: SPMetadataServiceProxyCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSiteSubscriptionProfileConfig
In ths Article

Deletes a site subscription from a User Profile Service application.

Syntax
Remove-SPSiteSubscriptionProfileConfig [-Identity] <SPSiteSubscriptionPipeBind>
-ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Remove-SPSiteSubscriptionProfileConfig -ServiceContext <SPServiceContextPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPSiteSubscriptionProfileConfig cmdlet deletes a site subscription from a User Profile Service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE-----------------

$sub = Get-SPSiteSubscription https://contoso/my


$pr = Get-SPServiceApplicationProxy | ?{$_.DisplayName.Contains(PartitionedUserProfileApplication_Proxy)}
Remove-SPSiteSubscriptionProfileConfig -Identity $sub -ProfileServiceApplicationProxy $pr

This example removes tenant data.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the proxy of the User Profile Service application that contains the site subscription to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
application proxy (for example, UserProfileSvcProxy1); or an instance of a valid SPServiceApplicationProxy object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Name of the proxy of the User Profile Service application.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceContext
Specifies the service context for the User Profile service application to connect to.

Type: SPServiceContextPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSiteSubscriptionSettings
In ths Article

Removes the settings service data for a specified site subscription, or finds and removes orphaned data.

Syntax
Remove-SPSiteSubscriptionSettings [-Identity] <SPServiceApplicationPipeBind> [-FindAllOrphans]
[-AlternativeSiteSubscriptions <Guid[]>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force]
[-WhatIf] [<CommonParameters>]

Remove-SPSiteSubscriptionSettings [-Identity] <SPServiceApplicationPipeBind> -SiteSubscriptions <Guid[]>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Remove-SPSiteSubscriptionSettings cmdlet deletes site subscription stored data for the specified site
subscription. If the FindAllOrphans parameter is specified, this cmdlet locates any data in the service application
that does not exist in the list of local site subscriptions or the alternate list of subscriptions.
The set of site subscriptions can be specified directly, or discovered by comparing data in the service application to
the set of existing site subscriptions which finds the data set that corresponds to nonexistent site subscriptions.
If this cmdlet is run on a federated service application without specifying the complete list of site subscription IDs
for the AlternativeSiteSubscriptions parameter, data loss can result.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE 1--------------

Remove-SPSiteSubscriptionSettings -FindAllOrphans -Whatif

This example finds all orphans and displays them on the screen. Remove the WhatIf parameter to remove these
extra settings.
------------EXAMPLE 2--------------

Remove-SPSubscriptionSettingsServiceApplication -FindAllOrphans -AlternativeSiteSubscriptions $SubscriptionList


Use this example if the service application is consumed by a remote farm and you want the clean orphaned site
subscription settings data (an array of all site subscriptions whose data must remain in the service application is
assigned to the $SubscriptionList variable.

Parameters
-AlternativeSiteSubscriptions
Specifies the complete collection or comma-separated list of site subscriptions that should exist in the settings
service application. Any data not matching the items in this list will be removed.
This parameter is important when the FindAllOrphans parameter is used. The value specified for
AlternativeSiteSubscriptions parameter is stating that any site subscriptions not on the local farm will be deleted,
unless an alternate list of site subscriptions is given.
The type must be an array of valid GUIDs.

Type: Guid[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FindAllOrphans
Specifies that orphaned settings stores in the service application are deleted.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Automatically bypasses the secondary warning provided by the cmdlet prior to the operation.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the site subscription settings service application that contains the service data to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription settings service application (for example, SubscriptionSettingsApp1); or an instance of a valid
SPSubscriptionSettingsServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscriptions
Specifies the site subscriptions with the settings service data to delete.
The type must be an array of valid GUIDs.

Type: Guid[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSiteUpgradeSessionInfo
In ths Article

Removes an SPSite object from upgrade.

Syntax
Remove-SPSiteUpgradeSessionInfo [-Identity] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPSiteUpgradeSessionInfo cmdlet to remove an SPSite object from the upgrade queue.
If the site is not in the upgrade queue, the returned value is Null.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE-------------

Get-SPSite | Remove-SPSiteUpgradeSessionInfo

This example removes the SPSite objects from the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the site from which to remove the site collections.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPSiteUpgradeSessionInfo
minutes to read • Edit Online

Remove-SPSiteURL
In ths Article

Removes an URL mapping from the site.

Syntax
Remove-SPSiteURL [-Url] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Remove-SPSiteUrl cmdlet removes an URL mapping from the site.
The Remove-SPSiteUrl cmdlet only applies to the root site collection for a host name, that is,
https://www.contoso.com. This cmdlet cannot be directly run against a managed path site collection underneath the
root, that is, https://www.contoso.com/sites/test.
You cannot remove the primary URL for a given site collection, which is typically defined as the first URL in the
default zone.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE-----------------------

Remove-SPSiteURL -Url https://contoso.sharepoint.com

This example removes the URL from the site collection, https://contoso.sharepoint.com.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL to remove.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPSiteUrl
Set-SPSiteUrl
minutes to read • Edit Online

Remove-SPSocialItemByDate
In ths Article

Deletes tags, notes, or ratings.

Syntax
Remove-SPSocialItemByDate -EndDate <DateTime>
-ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-RemoveComments <Boolean>]
[-RemoveRatings <Boolean>] [-RemoveTags <Boolean>] [-SiteSubscription <SPSiteSubscriptionPipeBind>] [-WhatIf]
[<CommonParameters>]

Description
Use the Remove-SPSocialItemByDate cmdlet to delete, tags, notes, ratings created before a particular date.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE-----------------------

Remove-SPSocialItemByDate -RemoveTags 1 -ProfileServiceApplicationProxy c6681d53-e6c4-432f-9f31-22d3de81b00c -


EndDate 9/15/2009

This example removes tags before 9/15/09 from the specified User Profile Service Application Proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
Specifies the date before which data is to be deleted.

Type: DateTime
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the unique identifier for the proxy.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RemoveComments
When this parameter is specified, comments will be removed.
Valid values for this parameter are:
-- $True -- $False

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveRatings
When this parameter is specified, ratings will be removed.
Valid values for this parameter are:
--$True --$False

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveTags
When this parameter is specified, tags will be removed.
Valid values for this parameter are:
--$True --$False

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run. This parameter is mandatory in a hosted-environment
and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSolution
In ths Article

Removes a SharePoint solution from a farm.

Syntax
Remove-SPSolution [-Identity] <SPSolutionPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Force] [-Language <UInt32>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPSolution cmdlet deletes a SharePoint solution from a farm. Before you use this cmdlet, you must use
the Uninstall-SPSolution cmdlet to retract the solution files from the front-end Web server.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPSolution -Identity contoso_solution.wsp

This example removes the SharePoint solution contoso_solution.wsp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the removal of the SharePoint solution. You can use this parameter to remove SharePoint solutions that
have been added to the server, even if they have not been deployed by using the Install-SPSolution cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SharePoint solution to remove.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint solution (for example, SPSolution1); or an instance of a valid SPSolution object.

Type: SPSolutionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Language
Removes the language pack for the specified language.
The type must be a valid language identifier; for example, 1033.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPSolutionDeploymentLock
In ths Article

Removes the solution deployment lock for a server.

Syntax
Remove-SPSolutionDeploymentLock [[-Identity] <SPServerPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPSolutionDeploymentLock cmdlet removes the solution deployment lock for a server. If the Identity
parameter is not specified, this cmdlet removes the solution deployment lock for all servers in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPSolutionDeploymentLock

This example removes the solution deployment lock for all servers in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the server for which the solution deployment lock is to be removed.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; the IP address of a server
computer, in the form 208.77.188.166; a valid name of a SQL Server host service (for example, SQLServerHost1);
or an instance of a valid SPServer object.

Type: SPServerPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPStateServiceDatabase
In ths Article

Removes a state service database from a state service application and drops it from the SQL Server.

Syntax
Remove-SPStateServiceDatabase [-Identity] <SPStateDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPStateServiceDatabase cmdlet removes a state service database from a state service application and
deletes the database. To remove a state service database and not delete the database, use the
Dismount-SPStateServiceDatabase cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Remove-SPStateServiceDatabase -Identity 9703f7e2-9521-47c3-bd92-80e3eeba391b

This example removes the specified database from a SharePoint Server farm and drops the database from the SQL
Server (data loss).

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service database to remove.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a state
database (for example, StateSvcDB1); or an instance of a valid SPStateServiceDatabase object.

Type: SPStateDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPThrottlingRule
In ths Article

Removes a throttling rule.

Syntax
Remove-SPThrottlingRule [-Identity] <SPThrottlingRulePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Use the Remove-SPThrottlingRule cmdlet to remove a throttling rule from the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE-----------------------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

C:\PS>$c=New-SPRequestManagementRuleCriteria -Value http -Property url -MatchType startswith -CaseSensitive


$false

C:\PS>$throttlingrule=Add-SPThrottlingRule -RequestManagementSettings $rm -Name -Criteria $c -Threshold 4

Remove-SPThrottlingRule -Identity $throttlingrule

This example removes a throttling rule for a specified identity by using the $throttlingrule variable.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the throttling rule object to remove.

Type: SPThrottlingRulePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Add-SPThrottlingRule
Get-SPThrottlingRule
Set-SPThrottlingRule
minutes to read • Edit Online

Remove-SPTranslationServiceJobHistory
In ths Article

Removes Machine Translation service jobs.

Syntax
Remove-SPTranslationServiceJobHistory [-Identity] <TranslationServiceApplicationPipeBind> [-AllPartitions]
[-AssignmentCollection <SPAssignmentCollection>] [-BeforeDate <DateTime>] [-Confirm] [-IncludeActiveJobs]
[-JobId <Guid>] [-PartitionId <Guid>] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPTranslationServiceJobHistory cmdlet to remove a machine translation service job from the job
history database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE--------------

Remove-SPTranslationServiceJobHistory TranslationService -BeforeDate 2012/01/31

This example removes all jobs completed before 2012/01/31 in the database associated with the Machine
Translation Service application named TranslationService.

Parameters
-AllPartitions
Removes all the jobs from the database given other parameters.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BeforeDate
Specifies all expired jobs before a given date.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the instance of the Machine Translation service to remove.
The type must be a valid URL, in the form https://server_name or a valid GUID (for example, 12345678-90ab-
cdef-1234-567890bcdefgh).

Type: TranslationServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-IncludeActiveJobs
Specifies expired jobs which contain active translations. By default, jobs are not deleted if a translation is active.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-JobId
Specifies only a job Id and its items to expire.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PartitionId
Specifies only a partition Id and its items to expire.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPTrustedIdentityTokenIssuer
In ths Article

Deletes a Security Token Service (STS ) identity provider from the farm.

Syntax
Remove-SPTrustedIdentityTokenIssuer [-Identity] <SPTrustedIdentityTokenIssuerPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPTrustedIdentityTokenIssuer cmdlet deletes a Security Token service (STS ) identity provider from the
farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE--------------------

Remove-SPTrustedIdentityTokenIssuer "LiveIDSTS"

This example removes an identity provider named LiveIDSTS from the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity provider to remove.
The type must be one of the following forms:
--A valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh --A valid name of identity provider (for
example, LiveID STS ) --An instance of a valid SPIdentityProvider object

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPTrustedRootAuthority
In ths Article

Deletes a trusted root authority.

Syntax
Remove-SPTrustedRootAuthority [-Identity] <SPTrustedRootAuthorityPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPTrustedRootAuthority cmdlet deletes a trusted root authority from a signing certificate store.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPTrustedRootAuthority -Name "WFEFarm1"

This example removes the trusted root authority WFEFarm1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the trusted root authority to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a trusted
root authority (for example, WFEFarm1); or an instance of a valid SPTrustedRootAuthority object.

Type: SPTrustedRootAuthorityPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPTrustedSecurityTokenIssuer
In ths Article

Removes the trusted security token service object.

Syntax
Remove-SPTrustedSecurityTokenIssuer [-Identity] <SPTrustedSecurityTokenServicePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPTrustedSecurityTokenService cmdlet to remove the trusted security token service object by using
the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE-----------------------

Remove-SPTrustedSecurityTokenService -Identity FarmA

This example removes the trusted security token issuer object named FarmA from the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the ID of the trusted security token issuer object to be removed.

Type: SPTrustedSecurityTokenServicePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPTrustedSecurityTokenIssuer
New -SPTrustedSecurityTokenIssuer
Set-SPTrustedSecurityTokenIssuer
minutes to read • Edit Online

Remove-SPTrustedServiceTokenIssuer
In ths Article

Deletes the object that represents the farm trust.

Syntax
Remove-SPTrustedServiceTokenIssuer [-Identity] <SPTrustedServiceTokenIssuerPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPTrustedServiceTokenIssuer cmdlet deletes the object that represents the farm trust.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Remove-SPTrustedServiceTokenIssuer "WFE Farm 2"

This example deletes the trusted service token issuer WFE Farm 2.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the trusted service token issuer to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a trusted
service token issuer (for example, WFEFarm1); or an instance of a valid SPTrustedRootAuthority object.

Type: SPTrustedServiceTokenIssuerPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPUsageApplication
In ths Article

Removes a usage application from the local farm.

Syntax
Remove-SPUsageApplication [-Identity] <SPUsageApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-RemoveData]
[-UsageService <SPUsageServicePipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPUsageApplication cmdlet deletes a usage application from the local farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE--------------------

Remove-SPUsageApplication -Identity "Usage and Health data collection" -RemoveData

This example removes the existing usage application and the associated logging DB.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the usage application to delete.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage
application (for example, UsageApplication1); or an instance of a valid SPUsageApplication object.

Type: SPUsageApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RemoveData
Specifies that the logging database is also removed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UsageService
Reserved for future use.

Type: SPUsageServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPUser
In ths Article

Removes a user from a Web site.

Syntax
Remove-SPUser [-Identity] <SPUserPipeBind> -Web <SPWebPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Group <SPGroupPipeBind>] [-WhatIf]
[<CommonParameters>]

Description
The Remove-SPUser cmdlet specifies the identity and user group from which a user is to be removed. The
Remove-SPUser cmdlet does not remove the user from Active Directory Domain Services (AD DS ).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Remove-SPUser "Contoso\jdoe" -web https://test/web1

Get-SPWeb "https://test/web1" | Remove-SPUser "Contoso\jdoe"

This example removes the user (Contoso\jdoe) from the Web application https://test/web1.
------------------EXAMPLE 2-----------------------

Get-SPSite https://contoso.com |Get-SPWeb |Remove-SPUser "Contoso\jdoe"

This syntax removes the user (Contoso\Jdoe) from every Web in a site collection located at https://contoso.com.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Group
The user only gets removed from that group. Otherwise, the user gets removed from the site.

Type: SPGroupPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID, the user name, or SPUser object to remove.
The type must be a valid GUID of the user, in the form 1234-5678-9876-0987.

Type: SPUserPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Web
Specifies the name of the URL or GUID from which the user is to be removed. This parameter is needed only if the
identity provided is the user name.
The type must be a valid URL, in the form https://server_name, or a GUID, in the form 1234-5678-9807.
Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPUserLicenseMapping
In ths Article

Removes a claim-to-SharePoint user license mapping.

Syntax
Remove-SPUserLicenseMapping -Identity <System.Collections.Generic.List`1[System.Guid]>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPUserLicenseMapping cmdlet uses the Identity parameter to remove a claim-to-SharePoint user license
mapping.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE---------------

Remove-SPUserLicenseMapping -Identity e69ba7cc-4be0-4723-ad63-58d06173afff

This example removes the claim-to-license mapping that has the unique ID, e69ba7cc-4be0-4723-ad63-
58d06173afff.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the unique ID of a claim-to-license mapping. The type must be a valid GUID (that is, e69ba7cc-4be0-
4723-ad63-58d06173afff).

Type: System.Collections.Generic.List`1[System.Guid]
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPUserLicenseMapping
Get-SPUserLicenseMapping
minutes to read • Edit Online

Remove-SPUserSettingsProvider
In ths Article

Removes a User Settings Provider.

Syntax
Remove-SPUserSettingsProvider [-Identity] <SPUserSettingsProviderPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Remove-SPUserSettingsProvider cmdlet to remove a User Settings Provider from the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE-----------------------

Remove-SPUserSettingsProvider -Identity "234bf0ed-70db-4158-a332-4dfd683b4148"

This example removes a specific User Settings Provider by using the GUID, 234bf0ed-70db-4158-a332-
4dfd683b4148.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Identity
Specifies the GUID ID for a User Settings Provider to remove.

Type: SPUserSettingsProviderPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-SPUserSettingsProvider
New -SPUserSettingsProvider
Get-SPUserSettingsProviderManager
minutes to read • Edit Online

Remove-SPUserSolution
In ths Article

Removes a sandboxed solution from the solution gallery.

Syntax
Remove-SPUserSolution [-Identity] <String> -Site <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPUserSolution cmdlet completely removes a sandboxed solution from the solution gallery. Before you
can remove the sandboxed solution from the solution gallery, you must deactivate it by using the
Uninstall-SPUserSolution cmdlet.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE----------------------

Remove-SPUserSolution -Identity contoso_solution.wsp -Site https://sitename

This example removes the sandboxed solution contoso_solution.wsp from the site https://sitename.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the sandboxed solution to remove.
The type must be a valid name of a sandboxed solution (for example, UserSolution1); or an instance of a valid
SPUserSolution object.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Remove the sandboxed solution from the specified site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPVisioSafeDataProvider
In ths Article

Removes a data provider from a Visio Services application.

Syntax
Remove-SPVisioSafeDataProvider -DataProviderId <String> -DataProviderType <Int32>
-VisioServiceApplication <SPVisioServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Remove-SPVisioSafeDataProvider cmdlet deletes the safe data provider that is specified in the DataProviderID
parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE------------------------

Remove-SPVisioSafeDataProvider -VisioServiceApplication "VGS1" -DataProviderID "CustomProvider" -


DataProviderType 5

This example removes a safe data provider for a specified Visio Services application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataProviderId
Specifies the name of the data provider to delete. The combination of DataProviderID and DataProviderType
uniquely identifies a data provider for a Visio Services application. The string that identifies the data provider can
be a maximum of 255 alphanumeric characters.
The type must be a valid string that identifies the data provider.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DataProviderType
Specifies the supported type of the data provider to delete.
The type must be a valid identity of a data provider type.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-VisioServiceApplication
Specifies the Visio Services application that contains the SPVisioSafeDataProvider object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.

Type: SPVisioServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPWeb
In ths Article

Completely deletes the specified Web.

Syntax
Remove-SPWeb [-Identity] <SPWebPipeBind> [-Recycle] [-CheckComplianceFlags <Boolean>]
[-AssignmentCollection <SPAssignmentCollection>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Remove-SPWeb cmdlet completely deletes the Web specified by the Identity parameter.
Deleting the top level Web site of a site collection causes the entire site collection to be removed.

Examples
------------------EXAMPLE-----------------------

Remove-SPWeb https://sitename/subsite

This example completely deletes a subsite.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CheckComplianceFlags
Specifies if compliance flags are enabled.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity of the Web to delete.
The type must be a valid full URL, in the form https://server_name/site_name, or an SPWeb object.

Type: SPWebPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Recycle
Specifies if the SPWeb object should be recycled.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPWebApplication
In ths Article

Deletes the specified Web application.

Syntax
Remove-SPWebApplication [-Identity] <SPWebApplicationPipeBind> -Zone <SPUrlZone>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DeleteIISSite] [-WhatIf] [<CommonParameters>]

Remove-SPWebApplication [-Identity] <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]


[-Confirm] [-DeleteIISSite] [-RemoveContentDatabases] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Remove-SPWebApplication cmdlet deletes the Web application specified by the Identity and Zone parameters. If
no zone is provided, the entire Web application and all zones are removed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Get-SPWebApplication https://sitename | Remove-SPWebApplication -Zone "Internet" -Confirm

This example prompts and then removes the Internet zone Web application extension on the Web application at
https://sitename. This command does not remove the content databases or the IIS Web site.
------------------EXAMPLE 2-----------------------

Remove-SPWebApplication https://sitename -Confirm -DeleteIISSite -RemoveContentDatabases

This example permanently removes the Web application, all content databases and the IIS Web site at
https://sitename

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeleteIISSite
Deletes the associated IIS Web sites. If this parameter is not provided, the IIS site is not removed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or name of the Web application to delete.
The type must be a valid URL, in the form https://server_name, or a valid name, in the form WebApplication-1212.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RemoveContentDatabases
Permanently deletes all associated content databases. If this parameter is not provided, no content databases are
removed.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies one of the five zones to be removed. If this parameter is not provided, all Web application zones are
removed.
The type must be any one of the following values: Default, Intranet, Internet, Extranet, or Custom.

Type: SPUrlZone
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Remove-SPWebApplicationAppDomain
In ths Article

Deletes the AppDomain.

Syntax
Remove-SPWebApplicationAppDomain [-Identity] <SPAppDomainPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Remove-SPWebApplicationAppDomain cmdlet to delete the AppDomain for a specified zone or to delete
all the app domains for the web application if no zone is specified.
This cmdlet also deletes the Internet Information Services (IIS ) port binding if any was added for the
WebApp/Zone combination.

Examples
----------------------EXAMPLE 1-----------------------

Remove-SPWebApplicationAppDomain -WebApplication https://www.contoso.com

Removes all of the app domains for the specified web application.
----------------------EXAMPLE 2-----------------------

Remove-SPWebApplicationAppDomain -WebApplication https://www.contoso.com -Zone Internet

Removes the app domains for the internet zone for the specified web application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the string of a domain name (that is, contoso.com) or a SPAppDomain object to remove.

Type: SPAppDomainPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.Administration.SPAppCmdlets.SPAppDomainPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Get-SPWebApplicationAppDomain
New -SPWebApplicationAppDomain
minutes to read • Edit Online

Remove-SPWOPIBinding
In ths Article

Removes bindings for applications, file name extensions and their associated actions on the current SharePoint
farm where this cmdlet is run.

Syntax
Remove-SPWOPIBinding [[-Identity] <SPWopiBindingPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Remove-SPWOPIBinding [-Action <String>] [-Application <String>]


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Extension <String>] [-ProgId <String>]
[-Server <String>] [-WhatIf] [-WOPIZone <String>] [<CommonParameters>]

Remove-SPWOPIBinding [-All] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]


[<CommonParameters>]

Description
The Remove-SPWOPIBinding cmdlet removes bindings for applications, file name extensions and their associated
actions on the current SharePoint farm where this cmdlet is run. After you run this cmdlet, you can use
New-SPWOPIBinding to re-create the bindings as needed. If you remove all the bindings for an application, users
cannot use Office Web Apps or the SharePoint Share by link feature for that application. If you remove all the
bindings on the SharePoint farm where this cmdlet is run, users cannot use Office Web Apps or the SharePoint
Share by link feature for any applications in the SharePoint library.
If you want to stop using Office Web Apps for default clicks, but must preserve the bindings' discovery information
and the ability for users to use the SharePoint Share by link feature to send a link to a document and allow the
recipient to use Office Web Apps for that document type, use the New-SPWOPISuppression cmdlet instead.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Remove-SPWOPIBinding -Application "Excel"

This example removes all bindings for Excel on the current SharePoint farm where this cmdlet is run.
--------------EXAMPLE 2-----------------
Remove-SPWOPIBinding -All:$true

This example removes all bindings on the current SharePoint farm where this cmdlet is run.
--------------EXAMPLE 3-----------------

Get-SPWOPIBinding -Action "MobileView" | Remove-SPWOPIBinding

This example removes all bindings for Office Mobile Web Apps on the current SharePoint farm where this cmdlet
is run.

Parameters
-Action
Specifies the action to remove bindings for. For example, "view," "edit," and "embedview." For a list of actions run
Get-SPWOPIBinding . Most typically you will not use this parameter. If you specify some actions but not others, some
features in SharePoint may not work.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-All
Removes all bindings.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Application
Specifies application to remove bindings for. Possible applications are as follows: "Word," "Excel," "PowerPoint," or
"OneNote." Run Get-SPWOPIBinding to get the list of applications.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters .

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Extension
Specifies the file name extensions to remove bindings for. Run Get-SPWOPIBinding to get the list of file name
extensions.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the binding.

Type: SPWopiBindingPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProgId
Specifies the programmatic identifier (ProgID ) for an application to remove bindings for. Run Get-SPWOPIBinding to
get the list of ProgIDs. You may only want to use this parameter to remove bindings for OneNote.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Server
Specifies the name of WOPI application (like Office Web Apps Server) to remove bindings for.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WOPIZone
Specifies the zone to remove bindings for.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013

New -SPWOPIBinding
Get-SPWOPIBinding
Set-SPWOPIBinding
New -SPWOPISuppressionSetting
minutes to read • Edit Online

Remove-SPWOPISuppressionSetting
In ths Article

Removes the suppression settings for a file name extension or programmatic ID and action on the current
SharePoint farm where this cmdlet is run.

Syntax
Remove-SPWOPISuppressionSetting [-Action <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Extension <String>] [-ProgId <String>] [-WhatIf] [<CommonParameters>]

Remove-SPWOPISuppressionSetting [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-Identity <String>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPWOPISuppressionSetting cmdlet removes the suppression settings for a file name extension or
programmatic indentifier (ProgID ) and action on the current SharePoint farm where this cmdlet is run.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Remove-SPWOPISuppressionSetting -Extension "XLSX" -Action "view"

This example removes suppression settings for viewing Excel workbooks that have the file name extension ".xlsx."
--------------EXAMPLE 2-----------------

Get-SPWOPISuppressionSetting | Remove-SPWOPISuppressionSetting

This example removes all suppression settings on the current SharePoint farm where this cmdlet is run.

Parameters
-Action
Specifies the action for a given file name extension or programmatic identifier (ProgId). For example, "view," "edit,"
and "embedview."
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters .

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Extension
Specifies the file name extension. Run Get-SPWOPIBinding to get the list of file name extensions the WOPI
application supports.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies a string that represents a SPWOPISuppressionSetting. Run Get-SPWOPISuppressionSetting to see
examples of such strings.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProgId
Specifies the programmatic identifier (ProgID ) for an application to suppress. Run Get-SPWOPIBinding to get the list
of ProgIDs that the WOPI application supports.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013

New -SPWOPISuppressionSetting
Get-SPWOPISuppressionSetting
minutes to read • Edit Online

Remove-SPWordConversionServiceJobHistory
In ths Article

Removes entries from the Word Automation Services job history database.

Syntax
Remove-SPWordConversionServiceJobHistory [-Identity] <WordServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-BeforeDate <DateTime>] [-Confirm] [-IncludeActiveJobs]
[-JobId <Guid>] [-SubscriptionId <Guid>] [-WhatIf] [<CommonParameters>]

Description
The Remove-SPWordConversionServiceJobHistory cmdlet removes entries from the Word Automation Services job
history database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE 1------------------------

Get-SPServiceApplication -Name TestWordServer | Remove-SPWordConversionServiceJobHistory -BeforeDate 1/1/2009

This example deletes all the items in the database before 1/1/2009.
---------------------EXAMPLE 2------------------------

Get-SPServiceApplication -Name TestWordServer | Remove-SPWordConversionServiceJobHistory -JobId 00000000-0000-


0112-08FF-63927635FEF1 -IncludeActiveJobs

This example deletes the job with the specified ID, even if it is still processing.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BeforeDate
Specifies that only jobs started before this date are to be removed.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Word Automation Services application to be processed.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Word
Automation Services application (for example, WordSvcApp1); or an instance of a valid SPServiceApplication
object.

Type: WordServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-IncludeActiveJobs
Specifies that jobs that contain active conversions can be removed. By default, jobs that have active conversions are
not removed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-JobId
Specifies that only the job with the specified ID is to be removed.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionId
Specifies that only jobs corresponding to this subscription ID are to be removed.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Rename-SPServer
In ths Article

Renames a server that is currently connected to the farm.

Syntax
Rename-SPServer [-Identity] <SPServerPipeBind> -Name <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Rename-SPServer cmdlet changes the name of the server for internal use within SharePoint Products. The
server itself must be manually renamed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Rename-SPServer -Identity "wfb1" -Name "WFE1"

This example changes the name of the SharePoint server wfb1 to WFE1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the original name of the server.
The type must be a URL, in the form https://server_name, or a GUID, in the form 1234-4567-987gb.

Type: SPServerPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the new name of the server.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Repair-SPManagedAccountDeployment
In ths Article

Repairs the local managed account credential deployment.

Syntax
Repair-SPManagedAccountDeployment [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Repair-SPManagedAccountDeployment cmdlet to repair the local deployment of managed account credentials
deployment on a server for the rare cases that the managed accounts service credentials are in a broken state. It re-
deploys each local service and Web applications credentials and also determines if the passphrase is not correct on
the server and repairs provides warnings accordingly. The Repair-SPManagedAccountDeployment cmdlet should not be
used as part of the regular credential update process, but should be one of the first troubleshooting steps,
specifically if a servers' services are failing to start when other servers' services are working correctly.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE-----------------------

Repair-SPManagedAccountDeployment

This example repairs the deployment of credentials on all services and Web application associated with managed
account (s) on the local server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Repair-SPProjectWebInstance
In ths Article

Re-queues specific Project Server queue items that may have fallen out of the queue.

Syntax
Repair-SPProjectWebInstance [-Identity] <ProjectInstancePipeBind> -RepairRule <ProjectSiteHealthRuleName>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Repair-SPProjectWebInstance cmdlet re-queues specific Project Server queue items that may have fallen out of
the queue. This includes triggers that may have been missed and queue jobs that were enqueued on a server that
was subsequently removed from the farm.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE-----------------------

Repair-SPProjectWebInstance -Identity https://contoso-appsrv/PWA -RepairRule QueueMissingTriggers

This example enqueues any missing triggers for the Project Web App instance at https://contoso-appsrv/PWA.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
The identity of the instance of Project Web App.

Type: ProjectInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RepairRule
Valid values: QueueMissingTriggers searches the Project Web App for any triggers that might have been missed;
QueueStaleServerGroups re-queues any jobs that were picked up by a server that was subsequently removed
from the farm.

Type: ProjectSiteHealthRuleName
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Test-SPProjectWebInstance
minutes to read • Edit Online

Repair-SPSite
In ths Article

Activates the RunRepairs method against the referenced SPSite object.

Syntax
Repair-SPSite [-Identity] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-RuleId <Guid>] [-RunAlways] [-WhatIf] [<CommonParameters>]

Description
The Repair-SPSite cmdlet runs one or all site collection health checks on the site collection and its contents. This
cmdlet automatically repairs issues that it finds.
Run the Test-SPSite cmdlet for reports of rules which were run and a summary of the results.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE 1---------------

Repair-SPSite https:///sites/testsite

This example runs all the site collection health checks in repair mode on the https://<site name>/sites/testsite site
collection.
------------EXAMPLE 2---------------

Repair-SPSite https:///sites/testsite -Rule "ee967197-ccbe-4c00-88e4-e6fab81145e1"

This example runs just the "Missing Galleries Check" in repair mode on the https://<site name>/sites/testsite site
collection.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the site to run a repair.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RuleId
Specifies the specific site health rule to run instead of running all applicable rules at once.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunAlways
Forces a rule to run even if a health check was run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Test-SPSite
minutes to read • Edit Online

Request-SPUpgradeEvaluationSite
In ths Article

Requests an upgrade evaluation site for a specified site.

Syntax
Request-SPUpgradeEvaluationSite [-Identity] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Email] [-NoUpgrade] [-WhatIf] [<CommonParameters>]

Description
Use the Request-SPUpgradeEvaluationSite cmdlet to initiate a request to create temporary copy of a site collection
at an auto-generated URL and upgrade the site collection to a newer experience. Users can view the site to see how
their site will work in the new experience.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE-----------------------

$site=Get-SPSite https://contoso.com/sites/TeamSite1
Request-SPUpgradeEvaluationSite $site -NoUpgrade -Email

This example requests an upgrade evaluation site the specified contoso.com team site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email
Specifies not to send the requester and site collection administrators a notification email when the upgrade
evaluation site is ready. The default value is not to send an email message.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SPSite object for the new upgrade evaluation site collection.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NoUpgrade
Specifies not to perform an upgrade as part of the process that creates the upgrade evaluation site.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Reset-SPAccessServicesDatabasePassword
In ths Article

Resets the specified Access Services Database password with a randomly generated password.

Syntax
Reset-SPAccessServicesDatabasePassword [-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] -Database <AccessServicesDatabasePipeBind>
[-WhatIf] [<CommonParameters>]

Description
Resets the specified Access Services Database password with a randomly generated password.

Examples
----------------------EXAMPLE-----------------------

$contentdb = Get-SPContentDatabase ContentDbName


$db = Get-SPAccessServicesDatabase -ContentDb $contentdb -EA 0 | select -First 1
Reset-SPAccessServicesDatabasePassword -Database $db -ServiceContext http://site_url

Resets the database password for the specified Access Database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
The specified Access Services database.

Type: AccessServicesDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceContext
Specifies the service context for the local Access Services application to connect to.

Type: SPServiceContextPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Office.Access.Services.PowerShell.AccessServicesDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Reset-SPProjectEventServiceSettings
In ths Article

Resets the Microsoft Project Server Events Service 2016 settings to the default values. The Microsoft Project
Server Events Service 2016 needs to be restarted for the changes to take effect.

Syntax
Reset-SPProjectEventServiceSettings [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Resets the Microsoft Project Server Events Service 2016 settings to the default values. The Microsoft Project
Server Events Service 2016 needs to be restarted for the changes to take effect.

Examples
----------------------EXAMPLE-----------------------

Reset-SPProjectEventServiceSettings

Resets the Microsoft Project Server Events Service 2016 settings to the default values. The Microsoft Project
Server Events Service 2016 needs to be restarted for the changes to take effect.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Reset-SPProjectPCSSettings
In ths Article

Resets the settings for the Project Calculation Engine on Project Server.

Syntax
Reset-SPProjectPCSSettings [-ServiceApplication <PsiServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Reset-SPProjectPCSSettings cmdlet lets you reset the settings that control the operations of the Project
Calculation Engine on Project Server. The cmdlet requires you to identify the Project Server service application.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE-----------------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Project Application Services'}


Reset-SPProjectPCSSettings -ServiceApplication $sa

This cmdlet resets the settings for the Project Calculation Engine that is running on a Project Server Service
Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplication
The Project Server service application for which the settings are to be read.

Type: PsiServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Reset-SPProjectQueueSettings
In ths Article

Resets all Project Server Queue settings to their default values for a specific Project Server Service Application.

Syntax
Reset-SPProjectQueueSettings [-ServiceApplication <PsiServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Resets all Project Server Queue settings to their default values for a specific Project Server Service Application.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------------EXAMPLE---------------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Project Application Services'}


Reset-SPProjectQueueSettings -ServiceApplication $sa

This example resets the queue settings for a Project Server Service Application service application.

Parameters
-AssignmentCollection
{{Fill AssignmentCollection Description}}

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplication
Specifies the Project Server service application to target.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name for a Project
Server service application (for example, ProjectServiceApp1); or an instance of a valid PsiServiceApplication object.
Type: PsiServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Set-SPProjectQueueSettings
Get-SPProjectQueueSettings
minutes to read • Edit Online

Reset-SPSites
In ths Article

Synchronizes the content database with the configuration database of the farm.

Syntax
Reset-SPSites [-Identity] <SPContentDatabasePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Reset-SPSites cmdlet synchronizes the content database with the configuration database of the farm with
respect to what site collections actually exist in the content database.
It also ensures that all site collections in the content database are registered in the configuration database and
removes any site collection references in the configuration database if the site collection does not exist in the
content database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
(https://go.microsoft.com/fwlink/p/?LinkId=671715).

Examples
----------------------EXAMPLE-----------------------

$contentdb = Get-SPContentDatabase ContentDbName


Reset-SPSites -Identity $contentDb

Synchronizes the sites in the content database named ContentDbName with the configuration database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies a specific content database. This could either be ID or Name of the content database or a valid instance of
a content database.

Type: SPContentDatabasePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPContentDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Restart-SPAppInstanceJob
In ths Article

Restarts an app instance.

Syntax
Restart-SPAppInstanceJob -AppInstance <SPAppInstance> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Restart-SPAppInstanceJob cmdlet to restart an app instance.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
(https://go.microsoft.com/fwlink/p/?LinkId=671715).

Examples
----------------------EXAMPLE-----------------------

$instance = Get-SPAppInstance -Web https://site_url | ?{$_.Title -eq 'Contoso App'}


Restart-SPAppInstanceJob -AppInstance $instance

Restarts the App Instance for the App named 'Contoso App' on https://site_url.

Parameters
-AppInstance
Specifies the app instance object to restart.

Type: SPAppInstance
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Restore-SPDeletedSite
In ths Article

Restores a deleted site collection.

Syntax
Restore-SPDeletedSite [-Identity] <SPDeletedSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-ContentDatabase <SPContentDatabasePipeBind>] [-WebApplication <SPWebApplicationPipeBind>]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).
Use the Restore-SPDeletedSite cmdlet to restore a previously deleted site collection.
Unlike the Restore-SPSite cmdlet that uses the host name and scheme for the Identity parameter (that is,
https://server_name), the value of the identity parameter for all SPDeletedSite cmdlets use a server-relative URL.
Typically, the forward slash character (/) begins the relative URL and also denotes the root site.
For additional information about a server-relative URL or understanding general concepts about absolute and
relative URLs, see Server-relative URL Property (https://msdn.microsoft.com/en-
us/library/microsoft.sharepoint.spsite.serverrelativeurl.aspx) or Understanding Absolute and Relative URL
Addresses (https://msdn.microsoft.com/en-us/library/bb208688(office.12).aspx).
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE 1----------------------

$deletedSite = Get-SPDeletedSite /sites/site_name


Restore-SPDeletedSite -Identity $deletedSite

This example restores a specific deleted site collection by using the site ID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the SQL Server content database where the site collection data will be stored. If no content database is
specified, the content database with the greatest unused site collection capacity and whose database status is ready
will be used.

Type: SPContentDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the identity of the deleted site collection to be restored. The identity can be either a valid server-relative
URL in the form /sites/site_name; a valid GUID in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an
SPDeletedSite object.
A site collection must not already exist at the URL location to perform a restore.

Type: SPDeletedSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the URL, GUID, or name of the Web application from which to list sites.
The type must be a valid URL in the form https://server_name; a valid GUID, for example, 12345678-90ab-cdef-
1234-567890bcdefgh; or the Web application name, for example, WebApplication1212.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Restore-SPEnterpriseSearchServiceApplication
In ths Article

Restores third-party backup of a search application.

Syntax
Restore-SPEnterpriseSearchServiceApplication [-Name] <String>
-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>
-AdminSearchServiceInstance <SearchServiceInstancePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] -DatabaseName <String> [-DatabasePassword <SecureString>] -DatabaseServer <String>
[-DatabaseUsername <String>] [-FailoverDatabaseServer <String>] [-WhatIf] [<CommonParameters>]

Restore-SPEnterpriseSearchServiceApplication [-Name] <String>


-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-KeepId] [-WhatIf] -TopologyFile <String> [-DeferUpgradeActions] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set.
You may only use parameters from one parameter set and you may not combine parameters from different
parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets
(https://go.microsoft.com/fwlink/?LinkID=187810).

This cmdlet is used by third parties to create a search application that uses existing data.
Some third parties back up the application data and have to restore the application later. So, the data is restored
and uses the Restore-SPEnterpriseSearchServiceApplication cmdlet to create a new search application that uses the
restored data.
This cmdlet supports parameter sets.
The first set of parameters is for Application Configuration Attach mode and the second set of parameters is for
Search Application Attach mode.
Application Configuration Attach mode only restores configuration data that is stored in the administration
database. However, Search Application Attach restores configuration, topology and all crawled data.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------EXAMPLE 1-----------------------
$searchInstance = Get-SPEnterpriseSearchServiceInstance -local
$applicationPool = New-SPServiceApplicationPool -Name "SearchServiceApplicationPool" -Account "domain\username"
Restore-SPEnterpriseSearchServiceApplication -Name "SearchServiceApplication" -ApplicationPool $applicationPool
-AdminSearchServiceInstance $searchInstance -DatabaseName "SearchServiceApplication_Admindb" -DatabaseServer
"SQLServer1"

This example uses Application Configuration Attach mode to restore configuration data.
----------------------EXAMPLE 2-----------------------

$applicationPool = New-SPServiceApplicationPool -Name "SearchServiceApplicationPool" -Account "domain\username"


Restore-SPEnterpriseSearchServiceApplication -Name "SearchServiceApplication" -ApplicationPool $applicationPool
-TopologyFile "C:\TopologyFile.xml"

This example uses Search Application Attach mode to restore topology data in the file that is named topology.xml.

Parameters
-AdminSearchServiceInstance
Specifies the search service instance to be used with the administration component.

Type: SearchServiceInstancePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies the application pool for the query web service.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database to create for the restoring the search application.
The type must be a valid name of a SQL Server database, for example, RestoreDB1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the name of the password for the database server on the SQL Server.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.
The type must be a valid SQL Server host name, for example, SQLServerHost1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the account name that is specified in the Database Server parameter.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeferUpgradeActions
Prevents database schema update during restore. Do not use.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Use this parameter if you want the administration database to use a failover database server.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeepId
Specifies if the search service application ID's from the topology .xml file should be used for the restored search
service application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the new Search application name.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TopologyFile
Specifies the path of the .XML file that contains the application topology information.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Restore-SPEnterpriseSearchServiceApplicationIndex
In ths Article

Restores the search index from the specified backup files.

Syntax
Restore-SPEnterpriseSearchServiceApplicationIndex [-SearchApplication] <SearchServiceApplication>
[-BackupFolder] <String> [-AllReplicas] [-AllowMove] [[-Retries] <Int32>] [[-RetryPauseSeconds] <Int32>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Restore-SPEnterpriseSearchServiceApplicationIndex [-SearchApplication] <SearchServiceApplication>


[-Handle] <String> [[-Retries] <Int32>] [[-RetryPauseSeconds] <Int32>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
This cmdlet will clear the complete search index for a specified search service application and replace it with the
search index from the specified backup files.
This cmdlet supports parameter sets. The first set of parameters is for Application Configuration Attach mode and
the second set of parameters is for Search Application Attach mode.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$handle = Restore-SPEnterpriseSearchServiceApplicationIndex -SearchApplication $ssa -BackupFolder
"\\sample\backup\spbr0000"
Restore-SPEnterpriseSearchServiceApplicationIndex -SearchApplication $ssa -Handle $handle

This example starts a restore of the search index in the default search service application from a backup located at
\\sample\backup\spbr0000.
------------------EXAMPLE 2------------------
$handle = Restore-SPEnterpriseSearchServiceApplicationIndex -SearchApplication $ssa -BackupFolder
"\\sample\backup\spbr0000"
Restore-SPEnterpriseSearchServiceApplicationIndex -SearchApplication "Search Service Application" -Handle
$handle

This example checks the status of the running job to restore of the search index in the search service application
Search Service Application with the handle $handle .

Parameters
-AllowMove
Specifies a switch to move instead of copying files when restoring. Moving may be faster than copying.

Type: SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllReplicas
Specifies a switch to restore all replicas, not just the primary.

Type: SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackupFolder
Specifies the full file path of the backup files.
Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Handle
A handle returned from an initial call using Parameter set 1.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Retries
Specifies the number of times to retry if temporary failure occurs.

Type: Int32
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RetryPauseSeconds
Seconds to pause between retries if temporary failure occurs.

Type: Int32
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the index files that should be restored.
Type: SearchServiceApplication
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Restore-SPFarm
In ths Article

Restores one or more items from a backup.

Syntax
Restore-SPFarm -Directory <String> -RestoreMethod <String> [-AssignmentCollection <SPAssignmentCollection>]
[-BackupId <Guid>] [-ConfigurationOnly] [-Confirm] [-FarmCredentials <PSCredential>] [-Force] [-Item <String>]
[-NewDatabaseServer <String>] [-Percentage <Int32>] [-RestoreThreads <Int32>] [-WhatIf] [<CommonParameters>]

Restore-SPFarm -Directory <String> [-ShowTree] [-AssignmentCollection <SPAssignmentCollection>]


[-BackupId <Guid>] [-ConfigurationOnly] [-Confirm] [-Item <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Restore-SPFarm cmdlet restores one or more items from a backup such as an individual database, Web
application, or the entire farm. This cmdlet can also be used to apply a farm template to the entire farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE 1-----------------------

Restore-SPFarm -Directory \\file_server\share\Backup -BackupId 12345678-90ab-cdef-1234-567890abcdef -


RestoreMethod new -ConfigurationOnly

This example restores the configuration settings from the backup package in the \\file_server\share\Backup
directory to the farm.
-------------------EXAMPLE 2-----------------------

Restore-SPFarm -ShowTree -Directory \\file_server\share\Backup -BackupId 12345678-90ab-cdef-1234-567890abcdef -


Item "Microsoft SharePoint Foundation Web Application" -Verbose

This example show which components of the farm would be restored under the Microsoft SharePoint Foundation
Web Application node, but does not actually restore them.
-------------------EXAMPLE 3-----------------------
Restore-SPFarm -Directory C:\Backup -BackupId 12345678-90ab-cdef-1234-567890abcdef -RestoreMethod overwrite -
RestoreThreads 10 -Force

This example restores a farm by using 10 threads and suppresses the overwrite warning.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BackupId
Specifies the GUID of the backup package that is to be restored. Each backup package has a unique GUID
associated with it. The GUID can be seen by using the Get-SPBackupHistory cmdlet to view the backup history. If
this parameter is not specified, the most recent backup package in the path that is specified with the Directory
parameter is used.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890abcdef.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ConfigurationOnly
Specifies settings only (no data) will be restored from the backup package and applied to objects on the destination
farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Directory
Specifies the path where SharePoint Products stored the backup package. If you have a computer on which SQL
Server and an instance of SharePoint Products are installed, you can use local drive paths. This includes a basic
installation. However, if SQL Server and SharePoint Products are installed on multiple computers, you must use
Universal Naming Convention (UNC ) share paths so that the SQL Server and SharePoint Products can read from
the same location (for example, \\computer_name \volume\Backup).
The type must be either of the valid paths:
C:\folder_name
\\server_name\folder_name
The spbr* folders are created automatically.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FarmCredentials
Specifies the credentials that will be used for all components being restored. For example, the application pool
credentials for Web applications being restored. If an application pool being restored already exists in the farm, the
credentials specified by the FarmCredentials parameter is ignored when restoring that application pool.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Suppresses the prompt warning that you will overwrite components when you perform an overwrite restore
operation.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Item
Indicates the part of the backup package to be restored. You can use the full farm path notation as displayed by the
ShowTree parameter or the name of the target component in the path if it has a unique name. If multiple items
match the name, the full path must be provided. Surround the item or path in double quotation marks if it contains
a space. If this parameter is absent, the entire backup package is restored.
The type must be a valid item, such as:
Farm\Microsoft SharePoint Foundation Web Application\SharePoint - 80

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseServer
Specifies a valid SQL Database Server name. If specified, will be used as a default Database Server name for all
databases within the restore operation.
This parameter is only valid when restoring as new. It is not valid for overwrite restores.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Percentage
Requests that progress updates about the restore operation be displayed in increments of that percentage. For
example, a value of 5 displays restore progress updates at every 5 percent completed, and a value of 10 displays
restore progress updates at every 10 percent completed.
Note: Progress will only be displayed in the output if the -Verbose parameter is specified. Otherwise, you may see
the progress in the restore log file.
This percentage is not precise and the actual progress updates might be lower or higher than requested.
For a very large database, 1 is the recommended value.
The type must be an integer value between 1 and 100.
The default value is 5.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RestoreMethod
Specifies the method of restore to perform.
The valid values are:
New; Specifies a new location to restore the content and is intended to be used when restoring to a different farm.
Additional prompts will be presented to specify the new settings.
Overwrite; Restores content and settings to their original locations and is intended to be used when restoring to the
same farm it was backed up from. If the Overwrite parameter is used, a confirmation prompt is displayed. If you
want the confirmation prompt suppressed, use the Force parameter.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RestoreThreads
The number of threads that should be used during the restore.
The fewer the restore threads, the easier it is to understand the restore log. However, the more restore threads, the
more components can be restored in parallel, potentially resulting in a faster restore.
The valid range is between 1 and 10. The default value is 3.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowTree
Displays which objects in the farm will be restored based on the other parameters passed to the Restore-SPFarm
cmdlet namely the Item and ConfigurationOnly parameters. Items that will be excluded from the restore based on
the other parameters passed to the Restore-SPFarm cmdlet will be preceded with an asterisk (*). Items that cannot
be restored will be enclosed in square brackets ([ ]). A restore operation will not be performed if the ShowTree
parameter is present.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Restore-SPSite
In ths Article

Restores a site collection.

Syntax
Restore-SPSite [-Identity] <String> -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-ContentDatabase <SPContentDatabasePipeBind>] [-Force] [-GradualDelete] [-HostHeaderWebApplication <String>]
[-WhatIf] [-PreserveSiteID] [<CommonParameters>]

Restore-SPSite [-Identity] <String> -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-DatabaseName <String>] [-DatabaseServer <String>] [-Force] [-GradualDelete]
[-HostHeaderWebApplication <String>] [-WhatIf] [-PreserveSiteID] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Restore-SPSite cmdlet performs a restoration of the site collection to a location specified by the Identity
parameter. A content database may only contain one copy of a site collection. If a site collection is backed up and
restored to a different URL location within the same Web application, an additional content database must be
available to hold the restored copy of the site collection.

Examples
----------------------EXAMPLE 1----------------------

Restore-SPSite https://server_name/sites/site_name -Path C:\Backup\site_name.bak

This example restores a site collection from the backup file C:\Backup\site_name.bak to the site collection URL
https://server_name/sites/site_name.
----------------------EXAMPLE 2----------------------

Restore-SPSite https://server_name/sites/site_name -Path C:\Backup\site_name.bak -Force -DatabaseServer SQLBE1


-DatabaseName SQLDB1

This example restores a site collection backup from the backup file C:\Backup\site_name.bak, but overwrites the
existing site collection at https://server_name/sites/site_name while specifying that the site collection must be
stored in a specific content database.
----------------------EXAMPLE 3----------------------
Restore-SPSite https://www.example.com -Path \\file_server\share\site_name.bak -HostHeaderWebApplication
https://server_name

This example restores a site collection backup from the backup file \\file_server\share\site_name.bak to the host-
named site collection https://www.example.com on the Web application https://server_name.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the SQL Server content database where the site collection data will be stored. If no content database is
specified, the content database with the greatest unused site collection capacity and whose database status is ready
will be used.

Type: SPContentDatabasePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseName
Specifies the SQL Server content database where the site collection data will be stored. If no content database is
specified, the content database with the greatest unused site collection capacity and whose database status is ready
will be used.
The type must be a valid database name, in the form SQLDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the SQL Server containing the content database specified by the DatabaseName parameter.
The type must be a valid database server name, in the form SQLBE1 and needs to be used in conjunction with the
DatabaseName parameter.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifies that the existing site collection at the URL location is to be overwritten by this restoration.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GradualDelete
Specifies that the site collection being overwritten with the Force parameter should be gradually deleted over time
by a timer job instead of all at once, which reduces its impact on SharePoint Products and SQL Server
performance. This option is recommended for large site collections.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostHeaderWebApplication
A valid URL assigned to the Web application by using alternate access mapping, such as https://server_name
Restores a site collection as a host-named site collection instead of a path-based site collection. When the
HostHeaderWebApplication parameter is present, the value of the Identity parameter is the URL of the host-
named site collection and the value of the HostHeaderWebApplication parameter is the URL of the Web
application that will hold the host-named site collection.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL location to which the site collection is restored.
A site collection does not have to already exist at the URL location to perform a restore. However, you must specify
a valid URL location that a site collection can be created. If a site collection already exists at the specified URL
location, you must specify the Force parameter to overwrite it.
The type must be a valid URL, in the form https://server_name/sites/site_name.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path
Specifies a valid path to the location of the backup. For example, C:\Backup\site_name.bak.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PreserveSiteID
Preserves the original Site ID instead of creating a new one.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Resume-SPEnterpriseSearchServiceApplication
In ths Article

Resumes a search service application that was suspended.

Syntax
Resume-SPEnterpriseSearchServiceApplication [-Identity] <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet reads the SearchServiceApplication object and moves it from the Paused for: External Request status
to the Resumed status.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity MySSA


$ssa | Resume-SPEnterpriseSearchServiceApplication

This example obtains a reference to a search service application named MySSA and then resumes it.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search service application to resume.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, MyQueryServer); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Resume-SPProjectWebInstance
In ths Article

Switches the specified instance of Project Web App to read-write mode, allowing users to change data again.

Syntax
Resume-SPProjectWebInstance [-Identity] <ProjectInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Switches the specified instance of Project Web App to read-write mode, allowing users to change data again. This
cmdlet does not set the database itself to read-write. The database must be set to read-write before you run this
cmdlet, or this cmdlet will fail.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE-----------------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Project Application Services'}


$instance = Get-SPProjectWebInstance -ServiceApplication $sa
Resume-SPProjectWebInstance -Identity $instance

Resumes the Project Web Server Instance in the Project Web Application Service Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the instance of Project Web App to be switched to read-write mode. It can be the unique id of the
instance, the URL of the Project Web App site, the site collection object that contains the Project Web App site (an
SPSite), or the Project Web App instance object itself (a PSSite).

Type: ProjectInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Pause-SPProjectWebInstance
minutes to read • Edit Online

Resume-SPStateServiceDatabase
In ths Article

Resumes a paused state service database so that new rows of data are received.

Syntax
Resume-SPStateServiceDatabase [-Identity] <SPStateDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Resume-SPStateServiceDatabase cmdlet resumes a paused state service database, an operation that adds the
state service database to the set of databases that can receive new data as required by SharePoint Server
applications.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE------------------

$db = Get-SPStateServiceDatabase -Identity StateServceDbName


Resume-SPStateServiceDatabase -Identity $db

This example resumes a paused state service database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service database to resume.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a state
database (for example, StateSvcDB1); or an instance of a valid SPStateServiceDatabase object.

Type: SPStateDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Revoke-SPBusinessDataCatalogMetadataObject
In ths Article

Revokes a right to a principal in the specified Business Data Connectivity Metadata Store metadata object.

Syntax
Revoke-SPBusinessDataCatalogMetadataObject -Identity <MetadataObject> -Principal <SPClaim> -Right <PSBdcRight>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-SettingId <String>] [-WhatIf]
[<CommonParameters>]

Description
The Revoke-SPBusinessDataCatalogMetadataObject cmdlet revokes a right granted to a principal user in the specified
Business Data Connectivity Metadata Store metadata object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$claimJohn = New-SPClaimsPrincipal -Identity "CONTOSO\johndoe" -IdentityType WindowsSamAccountName


$MetadataObject = Get-SPBusinessDataCatalogMetadataObject -BdcObjectType "LobSystem" -ServiceContext
http://contoso -Name "ContosoDatabase"
Revoke-SPBusinessDataCatalogMetadataObject -Identity $MetadataObject -Principal $claimJohn -Right "Execute"

This example removes the execute right from the External System with the name ContosoDatabase for the user
with the identity of johndoe on the domain CONTOSO.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Business Data Connectivity Metadata Store metadata object that contains the principal.

Type: MetadataObject
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Principal
Specifies the principal to whom the rights apply.
The type must be a claim.

Type: SPClaim
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Right
Specifies the right to revoke the principal.
The type must be one of the following valid PSBdcRight object types: All, Execute, Edit, SetPermissions, or
SelectableInClients.

Type: PSBdcRight
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SettingId
Specifies the custom environment settings model slice for which to revoke the right.
The type must be a valid string that identifies a model slice; for example, ModelSlice1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Revoke-SPObjectSecurity
In ths Article

Removes a security principal from a SPObjectSecurity object.

Syntax
Revoke-SPObjectSecurity [-Identity] <SPObjectSecurity> [-Principal] <SPClaim> [[-Rights] <String[]>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Revoke-SPObjectSecurity [-Identity] <SPObjectSecurity> [-All] [-AssignmentCollection <SPAssignmentCollection>]


[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Revoke-SPObjectSecurity cmdlet to remove a security principal, such as a user, from a SPObjectSecurity object.
An SPObjectSecurity object is a common object that is used to represent the security access control list (ACL ) of
SharePoint administrative objects, in particular service applications.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831 (https://go.microsoft.com/fwlink/p/?
LinkId=251831).

Examples
------------------EXAMPLE------------------

$security = Get-SPServiceApplicationSecurity $serviceApp -Admin


Revoke-SPObjectSecurity $security "domain\user"
Set-SPServiceApplicationSecurity $serviceApp -Admin $security

This example retrieves the SPObjectSecurity object corresponding to the administrator ACL on a service
application and removes a user from that ACL. The removed an administrator for the service application
$serviceApp.

Parameters
-All
Specifies that all security principals are removed from the specified SPObjectSecurity object.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the SPObjectSecurity object from which the security principal is removed. You can use the
Get-SPServiceApplicationSecurity cmdlet to get a SPObjectSecurity object .

Type: SPObjectSecurity
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Principal
Specifies the principal for whom the rights are removed.
The type must a valid name a principal; for example, Full Control.

Type: SPClaim
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rights
Specifies the rights of the principal to revoke.
The type must a valid array of strings that represents the rights of the principal to revoke.
Type: String[]
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-FASTSearchConfiguration
In ths Article

Configures the local instance of Microsoft FAST Search Server 2010 for SharePoint.

Syntax
Set-FASTSearchConfiguration [-LogFile <String>] [<CommonParameters>]

Description
This cmdlet configures the local instance of FAST Search Server 2010 for SharePoint.
FAST Search Server 2010 for SharePoint must be installed, but not running, on the local machine before you run
this cmdlet.
If you are not running this cmdlet on the admin node in the FAST Search Server 2010 for SharePoint installation,
make sure that the admin node is started before you run this cmdlet.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FastSearchConfiguration -LogFile C:\log.txt

This example configures the local machine and writes the log output to C:\log.txt.

Parameters
-LogFile
Specifies the full path of a file where all log messages will be written.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-FASTSearchIPSec
In ths Article

Configures local Internet Protocol security (IPsec) for Microsoft FAST Search Server 2010 for SharePoint.

Syntax
Set-FASTSearchIPSec [-Create] -Password <SecureString> -UserName <String> [-LogFile <String>]
[<CommonParameters>]

Set-FASTSearchIPSec [-Remove] [-LogFile <String>] [<CommonParameters>]

Description
This cmdlet deletes or creates firewall rules to configure IP security for the local machine.
FAST Search Server 2010 for SharePoint must be installed on the local machine before you run this cmdlet.
If you are not running this cmdlet on the admin node in the FAST Search Server 2010 for SharePoint installation,
make sure that the admin node is started before you run this cmdlet.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchIPSec -Create -UserName user1 -Password xxx

This example sets up Internet Protocol security on the local machine.


---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchIPSec -Remove

This example removes Internet Protocol security rules from the local machine.

Parameters
-Create
Specifies that IPsec rules will be created.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LogFile
Specifies the full path of a file where all log messages will be written.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password of the domain user that can look up machines in the domain controller.

Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Remove
Specifies that IPsec rules will be deleted.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserName
Specifies the username of the domain user that can look up machines in the domain controller.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-FASTSearchMetadataCategory
In ths Article

Updates the settings of a crawled property category.

Syntax
Set-FASTSearchMetadataCategory -Category <Category> [-MapToContents <Boolean>]
[-DiscoverNewProperties <Boolean>] [-NewName <String>] [<CommonParameters>]

Set-FASTSearchMetadataCategory -Name <String> [-MapToContents <Boolean>] [-DiscoverNewProperties <Boolean>]


[-NewName <String>] [<CommonParameters>]

Description
This cmdlet changes the settings of a crawled property category. A category is a group of crawled properties, and
the properties of the category control the default behavior of the member crawled properties.
If MapToContents is set to "true" on a crawled property category, new crawled properties added to a category are
mapped to the "content" full text index. The names of the crawled properties mapped to the "content" full text index
are added to the crawledpropertynames managed property. You can override this action by setting the crawled
property's IsMappedToContents parameter to "false".
You can call the cmdlet with either the name of the category (Name parameter), or with a category object
(Category parameter).

You can also use the cmdlet to rename a category.


You can only map a crawled property to one category at a time.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchMetadataCategory -Name Titles -DiscoverNewProperties 1 -MapToContents 1

With this example, all new crawled properties for the category "Titles" are automatically discovered and added to
the category. A crawled property is considered a member of the category if it has the same property set as the
category.
This example also sets MapToContents so that new crawled properties are mapped to the "content" full text index.
If you do not want a newly discovered crawled property made available through the full text index, override this
action by setting the specific crawled property's IsMappedToContents parameter to false.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchMetadataCategory -Name ExtendedTitle -Newname Titles

This example changes the name of the category "ExtendedTitle" to "Titles".

Parameters
-Category
Specifies the category to be changed.

Type: Category
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-DiscoverNewProperties
If this parameter is set to true, previously unknown crawled properties mapped to this category (having the same
property set identifier) are created and added to the category.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MapToContents
If this parameter is set to true, all newly created or discovered properties (if automatic discovery is enabled) are
added to the "content" full text index.
The name of each crawled property is added to the "crawledpropertynames" managed property.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the category to update.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-NewName
The new name for the category.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchMetadataCategory
Remove-FASTSearchMetadataCategory
New -FASTSearchMetadataCategory
minutes to read • Edit Online

Set-FASTSearchMetadataCrawledProperty
In ths Article

Updates the properties of a crawled property.

Syntax
Set-FASTSearchMetadataCrawledProperty -CrawledProperty <CrawledProperty> [-Propset <Guid>]
[-VariantType <Int32>] [-IsMappedToContents <Boolean>] [<CommonParameters>]

Set-FASTSearchMetadataCrawledProperty -Name <String> [-Propset <Guid>] [-VariantType <Int32>]


[-IsMappedToContents <Boolean>] [<CommonParameters>]

Description
This cmdlet specifies if a crawled property should be automatically indexed as part of the default full text index,
"content".
When the IsMappedToContents parameter is set to "true", the crawled property is added to the default searchable
index.
To find the crawled property to update, specify a crawled property object, or the combination of name, property set,
and variant type.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>$description = Get-FASTSearchMetadataCrawledProperty -Name Description


$description # Before
Set-FASTSearchMetadataCrawledProperty -CrawledProperty $description -IsMappedToContents 1
$description # After

This example automatically maps a crawled property to the full text index "content", making the content of the
crawled property searchable.

Parameters
-CrawledProperty
An object representing the crawled property to update.
Type: CrawledProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-IsMappedToContents
This Boolean parameter specifies whether or not the content of the crawled property should be automatically
mapped into the default full text index.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the crawled property to update.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Propset
The property set GUID of the crawled property which is being updated.
The GUID controls which category the crawled property is part of. A GUID (Global Unique Identifier) is a 128-bit
integer that has a very low probability of being duplicated. The accepted GUID format is "xxxxxxxx-xxxx-xxxx-xxxx-
xxxxxxxxxxxx" or a System.Guid object.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VariantType
An integer value specifying the variant type of the updated crawled property.
See https://go.microsoft.com/fwlink/?LinkId=163232 (https://go.microsoft.com/fwlink/?LinkId=163232) for a list
of common variant types.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataCrawledProperty
Get-FASTSearchMetadataCrawledProperty
minutes to read • Edit Online

Set-FASTSearchMetadataCrawledPropertyMapping
In ths Article

Specifies which crawled properties map into specific managed properties.

Syntax
Set-FASTSearchMetadataCrawledPropertyMapping
-CrawledPropertyMapping
<System.Collections.Generic.List`1[Microsoft.SharePoint.Search.Extended.Administration.Schema.CrawledProperty]>
-ManagedProperty <ManagedProperty> [<CommonParameters>]

Set-FASTSearchMetadataCrawledPropertyMapping
-CrawledPropertyMapping
<System.Collections.Generic.List`1[Microsoft.SharePoint.Search.Extended.Administration.Schema.CrawledProperty]>
-Name <String> [<CommonParameters>]

Description
This cmdlet replaces a managed property's crawled property mappings with a set of mappings specified as a
parameter (CrawledPropertyMapping). All other existing crawled property mappings for the managed property
are removed.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>$title = Get-FASTSearchMetadataManagedProperty -Name title


$extendedtitle = Get-FASTSearchMetadataManagedProperty -name extendedtitle
$mappings_for_title = $title.GetCrawledPropertyMappings()
Set-FASTSearchMetadataCrawledPropertyMapping -CrawledPropertyMapping $mappings_for_title -ManagedProperty
$extendedtitle

This example adds the crawled property mappings from the managed property "title" to the managed property
"extendedtitle".
The example first retrieves a list of the crawled property mappings for the managed property named "title" using
the GetCrawledPropertyMappings(). It then calls Set-FASTSearchMetadataCrawledPropertyMapping with this list
as a parameter. This replaces any existing crawled property mappings for the managed property "extendedtitle".

Parameters
-CrawledPropertyMapping
The list of crawled property mappings applied to the specified managed property. The order in the list controls
which crawled property is used when multiple crawled properties exist. The list must consist of one or more
Microsoft.SharePoint.Search.Extended.Administration.Schema.CrawledPropertyImpl objects.

Type:
System.Collections.Generic.List`1[Microsoft.SharePoint.Search.Extended.Administration.Schema.CrawledProperty]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManagedProperty
An object representing a managed property.

Type: ManagedProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
The name of the managed property whose crawled property mappings you are updating.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
Get-FASTSearchMetadataCrawledPropertyMapping
New -FASTSearchMetadataCrawledPropertyMapping
Remove-FASTSearchMetadataCrawledPropertyMapping
minutes to read • Edit Online

Set-FASTSearchMetadataFullTextIndex
In ths Article

Updates the properties of a full text index.

Syntax
Set-FASTSearchMetadataFullTextIndex -FullTextIndex <FullTextIndex> [-Description <String>]
[-StemmingEnabled <Boolean>] [<CommonParameters>]

Set-FASTSearchMetadataFullTextIndex -Name <String> [-Description <String>] [-StemmingEnabled <Boolean>]


[<CommonParameters>]

Description
This cmdlet enables/disables stemming and changes the description of a full text index.
Stemming is the process of reducing words to their base form or expanding to all known forms to increase recall.
Whether stemming is done through reduction or expansion depends on the language in which the content is
written.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchMetadataFullTextIndex -name content -description "Central content repository"

This example updates the description of the existing full text index named "content".
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchMetadataFullTextIndex -Name content -StemmingEnabled 1

This example enables stemming on the full text index named "content". The content of the full text index must be
recrawled/re-fed for this change to take effect.

Parameters
-Description
A new description to use for the full text index.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FullTextIndex
An object representing the full text index to be updated.

Type: FullTextIndex
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Name of the full text index to be updated.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-StemmingEnabled
Enables or disables stemming for this full text index.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataFullTextIndex
Remove-FASTSearchMetadataFullTextIndex
Get-FASTSearchMetadataFullTextIndex
minutes to read • Edit Online

Set-FASTSearchMetadataFullTextIndexMapping
In ths Article

Updates the importance level of an existing full text index mapping.

Syntax
Set-FASTSearchMetadataFullTextIndexMapping -Level <Int32> -Mapping <FullTextIndexMapping> [<CommonParameters>]

Description
This cmdlet changes the importance level of an existing full text index mapping.
Managed properties are mapped according to an importance level. If the number of matching documents for a
query term is higher than the StopWordThreshold for the rank profile in use, the Microsoft FAST Search Server
2010 for SharePoint system retries the query while limiting the search to managed properties belonging to a
higher importance level than the one previously tried.
It repeats this process until it finds a level where the query term count is lower than StopWordThreshold.
Importance level 1 (the first that will be used) includes all levels from 1 and up. Importance level 2 includes all
levels 2 and up. The maximum level is 7.
This process is called drilling. See Set-FASTSearchMetadataRankProfile for more information about
StopWordThreshold.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>$content = get-fastsearchmetadatafulltextindex -name content


$sitetitle = Get-FASTSearchMetadataManagedProperty -name sitetitle
$sitetitle_fulltextindexmapping = Get-FASTSearchMetadataFullTextIndexMapping -managedproperty $sitetitle -
fulltextindex $content
Set-FASTSearchMetadataFullTextIndexMapping -mapping $sitetitle_fulltextindexmapping -level 7

This example looks up a full text index mapping for a managed property named "SiteTitle" and moves it from
importance level 1 to importance level 7.
The example first retrieves the full text index object for "content" and the managed property object for "sitetitle". It
then uses these objects to get the full text index mapping object with the Get-
FASTSearchMetadataFullTextIndexMapping cmdlet. Finally, the example calls the Set-
FASTSearchMetadataFullTextIndexMapping cmdlet to update the level.
Parameters
-Level
The importance level to use for this mapping. Valid values are 1 through 7.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Mapping
The full text index object to update.

Type: FullTextIndexMapping
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataFullTextIndexMapping
Remove-FASTSearchMetadataFullTextIndexMapping
Get-FASTSearchMetadataFullTextIndexMapping
minutes to read • Edit Online

Set-FASTSearchMetadataManagedProperty
In ths Article

Updates the features of a managed property.

Syntax
Set-FASTSearchMetadataManagedProperty -ManagedProperty <ManagedProperty> [-Description <String>]
[-MergeCrawledProperties <Boolean>] [-Queryable <Boolean>] [-RefinementEnabled <Boolean>]
[-SortableType <Int32>] [-SummaryType <Int32>] [-StemmingEnabled <Boolean>] [-DecimalPlaces <Int32>]
[-MaxIndexSize <Int32>] [-MaxResultSize <Int32>] [-IsMapped <Boolean>] [<CommonParameters>]

Set-FASTSearchMetadataManagedProperty -Name <String> [-Description <String>]


[-MergeCrawledProperties <Boolean>] [-Queryable <Boolean>] [-RefinementEnabled <Boolean>]
[-SortableType <Int32>] [-SummaryType <Int32>] [-StemmingEnabled <Boolean>] [-DecimalPlaces <Int32>]
[-MaxIndexSize <Int32>] [-MaxResultSize <Int32>] [-IsMapped <Boolean>] [<CommonParameters>]

Description
This cmdlet updates the properties/features of an existing managed property.
Several of these changes require that the content be recrawled/re-fed to take full effect. If, for example, a managed
property is made searchable (Queryable) it will only become searchable after the content is updated. During the
recrawl/re-feed, the new content will be searchable, while the old will not.
For properties such as whether the managed property should have sorting enabled (SortableType), the managed
property defaults to the value '0' until the content has been re-fed/recrawled.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

C:\PS>$title = Get-FASTSearchMetadataManagedProperty -name title


Set-FASTSearchMetadataManagedProperty -ManagedProperty $title -Refinement 1

This example enables refinement for the managed property "title". Content must be re-fed/recrawled to populate
the refinement. Until it is populated, the refinement defaults to having no value.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

C:\PS>$title = Get-FASTSearchMetadataManagedProperty -name title


Set-FASTSearchMetadataManagedProperty -ManagedProperty $title -Queryable 1
This example enables searching against the "title" managed property. A front-end application can search in the
specified managed property using the syntax: "title:<search terms>".
Relevancy is not calculated for such queries (unlike searches against the full text indexes), and only the quality
component of the relevancy score is available.
The content must be recrawled/re-fed for this to take effect.
---------------EXAMPLE 3----------------- (FAST Server for SharePoint 2010)

C:\PS>$title = Get-FASTSearchMetadataManagedProperty -name title


Set-FASTSearchMetadataManagedProperty -ManagedProperty $title -SummaryType 1

This example changes the summary type for the managed property named "title" from dynamic to static. A static
summary type means that the entire contents of the managed property is returned as part of the item summary.
The content must be recrawled/re-fed for this to take effect.

Parameters
-DecimalPlaces
This integer parameter specifies how many decimal places should be used for the managed property.
A higher number of decimals provides a more precise result, but reduces the minimum and maximum number size
that can be stored in the managed property.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
A text string describing the managed property's use.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsMapped
This Boolean parameter specifies whether or not the managed property is mapped to support Alternate Access
Mappings in SharePoint.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ManagedProperty
The managed property object to modify.

Type: ManagedProperty
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-MaxIndexSize
This integer parameter sets the maximum number of kilobytes indexed for the managed property.
Valid values range from 0 through 2097151 (2GB ).
The measured value equals the data stored prior to indexing and is slightly larger than the effective number of
kilobytes that is searchable for the managed property.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxResultSize
This integer parameter sets the maximum number of kilobytes that can be returned for this managed property.
If a managed property's content is longer than this, then the returned version of the managed property is truncated
to the specified value.
Valid values are from 0 through 2097151 (2GB ).
If the summary type of the managed property is dynamic, then this size refers to the size of the source data used
for generating the hit highlighted summary.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MergeCrawledProperties
This Boolean value controls whether or not multiple crawled properties mapped to this managed property are
merged when multiple crawled properties are present in the input.
If not set, only the first element of the first non-empty crawled property is stored in the managed property. The one
that is chosen is the crawled property that was mapped to the managed property first.
The content must be re-fed/recrawled for this change to take effect.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the managed property to modify.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Queryable
This Boolean value specifies whether or not the managed property is directly searchable on its own (and not only
as part of a full text index).
If not set, it can only be searched when included in a full text index.
The content must be recrawled/re-fed again for this change to take effect.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RefinementEnabled
This Boolean value specifies whether or not a refiner is available for the managed property.
Refiners group search results based on the values of individual managed properties from the complete result set of
a query. Refiners are often used to navigate the result set in the front-end application.
After enabling refinement on a managed property, the content must be recrawled/re-fed for the change to take
effect.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SortableType
The sorting type of the managed property. Valid values are:
-- 0 ("sorting disabled") specifies that the managed property is not sortable. -- 1 ("sorting enabled") specifies that
the managed property is sortable. -- 2 ("latent sorting") specifies that the managed property is prepared for
sorting, but must be changed to "sorting enabled" for sorting to be supported.
In contrast to switching from "sorting disabled" to "sorting enabled", this does not require reprocessing of data.
Setting sorting to latent on a managed property can help reduce memory resource usage, while keeping the option
of enabling sorting quickly at a later date.
If a managed property is changed from "sorting disabled" to "sorting enabled", the sort value will default to 0 for
all documents that have not been recrawled/re-fed.
Managed properties of the type datetime always have sorting enabled.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StemmingEnabled
Enables or disables stemming for the managed property.
Stemming is the process of reducing words to their base form, or expanding to all known forms, to increase recall.
Whether stemming is done through reduction or expansion depends on the content language.
The content must be recrawled/re-fed for this to take effect.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SummaryType
The type of summary to return for the managed property. Valid values are:
-- 0 (summary disabled), no content is returned for this managed property. -- 1 (static), the full value of the
managed property is returned. -- 2 (dynamic), hit highlighting is done on the content of the managed property
based on the query terms, and a hit highlighted summary is returned.
The content must be recrawled/re-fed for any change in this setting to take effect, except when disabling summary
generation.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchMetadataManagedProperty
New -FASTSearchMetadataManagedProperty
Remove-FASTSearchMetadataManagedProperty
minutes to read • Edit Online

Set-FASTSearchMetadataRankProfile
In ths Article

Reconfigures a rank profile.

Syntax
Set-FASTSearchMetadataRankProfile -Name <String> [-AuthorityWeight <Int32>]
[-FreshnessManagedPropertyReference <ManagedProperty>] [-FreshnessResolution <Int32>]
[-FreshnessWeight <Int32>] [-PositionStopWordThreshold <Int64>] [-QualityWeight <Int32>]
[-QueryAuthorityWeight <Int32>] [-RankModelName <String>] [-StopWordThreshold <Int64>] [<CommonParameters>]

Set-FASTSearchMetadataRankProfile -RankProfile <RankProfile> [-AuthorityWeight <Int32>]


[-FreshnessManagedPropertyReference <ManagedProperty>] [-FreshnessResolution <Int32>]
[-FreshnessWeight <Int32>] [-PositionStopWordThreshold <Int64>] [-QualityWeight <Int32>]
[-QueryAuthorityWeight <Int32>] [-RankModelName <String>] [-StopWordThreshold <Int64>] [<CommonParameters>]

Description
This cmdlet adjusts the relevancy components of a rank profile to improve search result relevance.
All weights are relative to each other. If QualityWeight is 400, and AuthorityWeight is 100, this means that
QualityWeight is 4 times more important than AuthorityWeight.
After being multiplied by the weights determined in the rank profile, all relevance components are combined into a
single rank score, which decides the sorting of the result set (as long as non-relevancy sorting is not specified). All
changes are effective immediately, and the content does not need to be re-fed for this to take effect.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchMetadataRankProfile -Name ExtraRankProfile -QualityWeight 100 -AuthorityWeight 200 -


QueryAuthorityWeight 10 -FreshnessWeight 0

This example changes the weights of the relevancy components on the rank profile named "ExtraRankProfile". You
can specify one or more weights to modify at a time.
This example turns off the freshness relevancy component by setting the weight to 0, while adjusting the other
components.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)
C:\PS>$processingtime = Get-FASTSearchMetadataManagedProperty -name Processingtime
Set-FASTSearchMetadataRankProfile -Name ExtraRankProfile -FreshnessManagedPropertyReference $processingtime

This example changes the "ExtraRankProfile" rank profile so that it no longer determines document freshness
based on the "docdatetime" managed property.
Instead, freshness is based on when the item was last processed (fed) into the FAST Search Server 2010 for
SharePoint system. The time the item was processed is stored in the "processingtime" managed property by
default.
---------------EXAMPLE 3----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchMetadataRankProfile -Name ExtraRankProfile -StopWordThreshold 100000

This example sets the stop word threshold of the rank profile named "ExtraRankProfile" to 100000. The stop word
threshold determines if the query term is too common to be taken into account when calculating the relevancy of
an item.
Lowering the stop word threshold means that more terms may be ignored when calculating relevancy, which can
have a positive impact on performance.
---------------EXAMPLE 4----------------- (FAST Server for SharePoint 2010)

C:\PS>$rankprofile = Get-FASTSearchMetadataRankProfile -Name default


$rankprofile.GetQualityComponents()

The quality rank metric is an importance score assigned to a document, independent of query terms. This example
lists the managed properties involved in calculating the quality rank by calling the GetQualityComponents()
method call on the rank profile.
---------------EXAMPLE 5----------------- (FAST Server for SharePoint 2010)

C:\PS>$new_rank_component = New-FASTSearchMetadataManagedProperty -Name sitecredibility


$rankprofile = Get-FASTSearchMetadataRankProfile -Name default
$rankprofile.CreateQualityComponent($new_rank_component,100)
$rankprofile.GetQualityComponents()

The quality rank metric is an importance score assigned to a document, independent of query terms. This example
adds another managed property, named "sitecredibility", to the list of quality components which form the quality
rank score. The "sitecredibility" managed property is weighted the same as the other quality components (100).
The next step would be to populate "sitecredibility" with a suitable crawled property.

Parameters
-AuthorityWeight
This integer parameter sets the authority weight component of the rank profile.
Ranking on authority takes the connections between items into account when calculating a relevancy score. Items
that are central and frequently linked to receive a higher authority relevancy score than items that are hard to reach
and less frequently linked to.
The authority relevancy score is calculated regularly by the Webanalyzer component.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FreshnessManagedPropertyReference
This parameter specifies which managed properties to use when calculating freshness.
The managed property must be represented with a ManagedPropertyImpl object (e.g., as returned from Get-
FASTSearchMetadataManagedProperty).
The managed property must be of the type "datetime" and have sorting enabled.
The value of the managed property is used when calculating how fresh the document is. Items with an older
datetime value in the specified managed property get a lower freshness relevancy score.

Type: ManagedProperty
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FreshnessResolution
This integer parameter sets the size of the freshness boost tick.
The tick is the smallest amount of time the freshness relevancy considers to be a different value.
If set to an hour, all documents with a freshness managed property value within the same hour receive the same
freshness relevancy score.
If set to a day, documents with the same day value in the freshness managed property are considered equally fresh.
Valid values are:
0 (Second)
1 (Minute)
2 (Hour)
3 (Day)
4 (Year)

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FreshnessWeight
This integer parameter sets the weight of the freshness relevancy component when calculating the relevance of a
result.
The freshness rank value goes down the older the document is.
See the FreshnessManagedPropertyReference parameter to change the managed property used for calculating
freshness.
Set this value to 0 to ignore item freshness when calculating relevancy.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
The name of the rank profile to modify.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-PositionStopWordThreshold
This integer parameter sets the position stop word threshold.
If a query term occurs more often than position-stop-word-threshold (independent of the number of items it
occurs in), then proximity relevancy calculations are not done for that term.
If the query term count does not exceed the position stop word threshold, an extra rank score is added if query
terms are positioned close to each other in the managed properties.
If you do not want to use proximity as part of the relevancy model, set this parameter to 0 to disable proximity
calculation. This will decrease CPU use when searching.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QualityWeight
This integer parameter sets the weight of the quality component of the relevancy model.
Quality denotes the assigned importance of a document. The quality metrics are assigned to individual documents
without taking into account the query being evaluated.
An excessively high quality weight makes item ranking less dependent on the user query terms, which can lead to a
poor search experience, since items with a high quality relevancy score could outweigh items that are more
relevant to the query terms.
The quality relevancy score is calculated dynamically, based on one or more quality components. The
GetQualityComponents() method available on the RankProfileImpl object lists the managed properties used for
this.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueryAuthorityWeight
This integer parameter sets the weight of the query authority relevancy component.
The query authority increases for an item when a user clicks through to it from search results. The more popular
the item is for a given query, the higher the query authority relevancy score.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RankModelName
The name of a rank profile to modify.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RankProfile
An object representing a rank profile.

Type: RankProfile
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-StopWordThreshold
This integer parameter sets the stop word threshold of the rank profile.
A stop word is a search term that is so common in the result set that it is not counted as part of the relevancy
calculation.
When a query term exceeds this threshold, FAST Search Server 2010 for SharePoint retries the query with a
higher full text index importance level until it can find a level where the query term is not a stop word (see Set-
FASTSearchMetadataFullTextIndexMapping for details about importance levels).
If this is not possible, the query term is not included in the result set's relevancy. A low StopWordThreshold value
gives better search performance, but a lower result set relevancy (since there is a bigger chance that a query term
does not influence which items are in the result set).

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchMetadataRankProfile
Remove-FASTSearchMetadataRankProfile
Get-FASTSearchMetadataRankProfile
Get-FASTSearchMetadataManagedProperty
minutes to read • Edit Online

Set-FASTSearchSecurityCCTKServer
In ths Article

Updates the CCTK server general setting.

Syntax
Set-FASTSearchSecurityCCTKServer [[-Port] <Int32>] [[-Enable] <Boolean>]
[[-GeneralSetting] <CCTKServerSetting>] [<CommonParameters>]

Description
This cmdlet updates the configuration information for the Content Connector Toolkit (CCTK) server general
settings.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1---------------- (FAST Server for SharePoint 2010)

Set-FASTSearchSecurityCCTKServer -Port 13271 -Enable $true

This example updates the CCTK server port number and enables the CCTK server to accept requests.

Parameters
-Enable
A Boolean flag to determine if the CCTK service will accept requests.

Type: Boolean
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GeneralSetting
A CCTKServerSetting instance whose property values are used for the CCTKServerSetting being updated.
Type: CCTKServerSetting
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Port
The port number that the security manager listens to for handling CCTK requests.

Type: Int32
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityCCTKServer
minutes to read • Edit Online

Set-FASTSearchSecurityClaimsUserStore
In ths Article

Updates a claims user store.

Syntax
Set-FASTSearchSecurityClaimsUserStore [-Identity] <String> [[-SecurityContent] <ClaimsUserStore>]
[[-Description] <String>] [[-Issuer] <String>] [<CommonParameters>]

Description
This cmdlet updates the configuration settings for a claims user store.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchSecurityClaimsUserStore -Identity clm -Description "Sharepoint Users"

This example updates the description of the "clm" claims user store.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Get-FASTSearchSecurityClaimsUserStore -Identity cl2 | Set-FASTSearchSecurityClaimsUserStore -Issuer Windows

This example sets the issuer of the "cl2" claims user store to "Windows". The Set-
FASTSearchSecurityClaimsUserStore cmdlet updates the SecurityContent value piped from the Get-
FASTSearchSecurityClaimsUserStore.

Parameters
-Description
A brief explanation of the user store.

Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The user store identity.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Issuer
The Microsoft SharePoint Server Security Token Service (STS ) claims provider that issued the claims.

Type: String
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecurityContent
A claims user store object whose property values are used to update another claims user store.

Type: ClaimsUserStore
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityClaimsUserStore
New -FASTSearchSecurityClaimsUserStore
minutes to read • Edit Online

Set-FASTSearchSecurityDefaultUserStore
In ths Article

Updates the default user store general setting.

Syntax
Set-FASTSearchSecurityDefaultUserStore [[-DefaultUserStoreId] <String>] [<CommonParameters>]

Set-FASTSearchSecurityDefaultUserStore [[-GeneralSetting] <DefaultUserStoreSetting>] [<CommonParameters>]

Description
This cmdlet updates the identity of the user store that users and groups are looked up in, to determine the
appropriate document access if the user store identity is not specified when looking up the user or group.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchSecurityDefaultUserStore -DefaultUserStoreId win

This example sets the default user store to "win".


---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

C:\PS>$defuserstore | Set-FASTSearchSecurityDefaultUserStore

This example updates the default user store using values from a pipeline GeneralSetting parameter.
In this example, the $defuserstoreGeneralSetting was created with this command: $defuserstore = Get-
FASTSearchSecurityDefaultUserStore.

Parameters
-DefaultUserStoreId
The identity of the user store to set as the default user store.
Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GeneralSetting
A DefaultUserStoreSettinginstance whose property values are used for the DefaultUserStoreSetting being
updated.

Type: DefaultUserStoreSetting
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityDefaultUserStore
minutes to read • Edit Online

Set-FASTSearchSecurityLogLevel
In ths Article

Updates the log level general setting.

Syntax
Set-FASTSearchSecurityLogLevel [[-GeneralSetting] <LogLevelSetting>] [-DebugNameSpaceLogLevel <String[]>]
[-DefaultLogLevel <String>] [-ErrorNameSpaceLogLevel <String[]>] [-IncludeExceptionStack <Boolean>]
[-InfoNameSpaceLogLevel <String[]>] [-WarningNameSpaceLogLevel <String[]>] [<CommonParameters>]

Description
This cmdlet updates the configuration information for the log level's general setting. The log level controls the type
of information that is logged by the security system.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchSecurityLogLevel -DefaultLogLevel debug -IncludeExceptionStack $True

This example sets the default log level to the "Debug" level and enables the setting to include the exception stack in
the log.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchSecurityLogLevel -WarningNameSpaceLogLevel Microsoft

This example sets the log level setting for the "Microsoft" namespace to the "Warning" level.

Parameters
-DebugNameSpaceLogLevel
A list of C# namespaces. Any class contained in that namespace logs all messages to the log.
A class can occur in only one namespace. If you specify the same class in more than one name space log level, the
log level that generates the most messages will be set.
Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DefaultLogLevel
Specifies the type of log messages that each class writes to the log, unless the class is contained in a namespace
explicitly specified in ErrorLogLevelNameSpaces, WarningLogLevelNameSpaces, InfoLogLevelNameSpaces, and
DebugLogLevelNameSpaces.
Valid values are:
-- Error -- Warning -- Info -- Debug

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ErrorNameSpaceLogLevel
A list of C# namespaces. Any class included in the namespace only logs error messages.
A class can occur in only one namespace. If you specify the same class in more than one namespace log level, the
log level that generates the most messages will be set.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-GeneralSetting
A LogLevelSetting whose property values are used for the LogLevelSetting being updated.

Type: LogLevelSetting
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncludeExceptionStack
Whether or not to include the exception stack in the log. Set to $True to include the exception stack.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InfoNameSpaceLogLevel
A list of C# namespaces. Any class contained in that namespace only logs error, warning, and info messages.
A class can occur in only one namespace. If you specify the same class in more than one namespace log level, the
log level that generates the most messages will be set.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WarningNameSpaceLogLevel
A list of C# namespaces. Any class included in the namespace only logs error and warning messages.
A class can occur in only one namespace. If you specify the same class in more one than namespace log level, the
log level that generates the most messages will be set.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityLogLevel
minutes to read • Edit Online

Set-FASTSearchSecurityLotusNotesUserStore
In ths Article

Updates a Lotus Notes user store.

Syntax
Set-FASTSearchSecurityLotusNotesUserStore [-Identity] <String> [[-SecurityContent] <LotusNotesUserStore>]
[[-NonIndexableCharacterEncodingPrefix] <String>] [[-NonIndexableCharacterPattern] <String>]
[[-Description] <String>] [[-UseDenyOnDefault] <Boolean>] [[-UseDocumentSecurity] <Boolean>]
[[-UseWildcardSecurity] <Boolean>] [[-UseViewSecurity] <Boolean>] [[-AllowPrefix] <String>]
[[-DenyPrefix] <String>] [[-NonIndexableCharacterHandling] <String>] [<CommonParameters>]

Description
This cmdlet updates the configuration settings for a Lotus Notes user store.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchSecurityLotusNotesUserStore -Identity ln4 -Description "My Lotus user store"

This example updates the description of the "ln4" Lotus Notes user store.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Get-FASTSearchSecurityLotusNotesUserStore -Identity ln3 | Set-FASTSearchSecurityLotusNotesUserStore -


UseDocumentSecurity $false

This example sets the UseDocumentSecurity of the "ln3" Lotus Notes user store to false to skip item level security.
In this case, only database level security is used. The Set-FASTSearchSecurityLotusNotesUserStore command
updates the SecurityContent object piped from the Get-FASTSearchSecurityLotusNotesUserStore.

Parameters
-AllowPrefix
A string value prepended to the document ACL to control which items the user is allowed access to and which
items will be returned in the query.
Type: String
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DenyPrefix
A string value prepended to the ACL to control which items the user is denied access to and which items are not
returned from the query.

Type: String
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
A brief explanation of the user store.

Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Identity of the Lotus Notes user store to update.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-NonIndexableCharacterEncodingPrefix
If NonIndexableCharacterHandling is set to encodeWithPrefix, this parameter specifies the prefix added to the
encoded ACL.

Type: String
Required: False
Position: 10
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NonIndexableCharacterHandling
Specifies what to do with ACL values that match the NonIndexableCharacterRegExPattern regular expression.
Valid values:
-- encode - The ACL is encoded into a single searchable term. -- encodeWithPrefix - The value of
NonIndexableEncodedPrefix is concatenated with the ACL to be encoded, producing a single searchable term. --
remove - The ACL is removed from both allowing and denying access. Specify "remove" if the ACL is never used to
deny access.

Type: String
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NonIndexableCharacterPattern
Specifies a regular expression pattern used to detect non-indexable characters in an ACL. Identities matching this
regular expression pattern will be processed based on NonIndexableCharacterHandling.

Type: String
Required: False
Position: 11
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecurityContent
A Lotus Notes user store object whose property values are used for the Lotus Notes user store being updated.

Type: LotusNotesUserStore
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UseDenyOnDefault
If true, support for default access with deny on users/groups is enabled on database level security.
You must enable this filter for an inverse security model: first grant access to everyone, and then explicitly deny
access to certain groups or users.

Type: Boolean
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseDocumentSecurity
If true, item security is enabled (i.e., the filter contains a item level security condition).
If set to false, item level security is ignored; only database level security (and possibly view security) is used.
If items always inherit the ACLs of the database, you can turn off this option.
Type: Boolean
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseViewSecurity
If true, view security is enabled (i.e., the filter contains a view level security condition).
If set to false, view level security is ignored; only database level security (and possibly item security) is used.
If views always inherit the ACLs of the database, or if views are not indexed, you can turn off this option.

Type: Boolean
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseWildcardSecurity
If true, database access through wildcard group entry (starting with */) is enabled.
If set to false, the wildcard check is ignored. Only normal groups are checked against the database ACL.

Type: Boolean
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityLotusNotesUserStore
New -FASTSearchSecurityLotusNotesUserStore
minutes to read • Edit Online

Set-FASTSearchSecurityPublicFilter
In ths Article

Updates the public filter general setting.

Syntax
Set-FASTSearchSecurityPublicFilter [[-Filter] <String>] [<CommonParameters>]

Set-FASTSearchSecurityPublicFilter [[-GeneralSetting] <PublicFilterSetting>] [<CommonParameters>]

Description
This cmdlet updates the public filter general setting configuration. The public filter is the search security filter that is
used to find documents that all users have access to.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchSecurityPublicFilter -Filter docacl:unknown

This example updates the search security filter that is used to find documents that all users have access to.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

C:\PS>$pubfilter | Set-FASTSearchSecurityPublicFilter

This example updates the public filter setting using values from a pipeline GeneralSetting parameter.
In this example, the $pubfilterGeneralSetting was created with this command: $pubfilter = Get-
FASTSearchSecurityPublicFilter.

Parameters
-Filter
The search security filter that is used to find documents that all users have access to.
Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GeneralSetting
A PublicFilterSetting whose property values are used for the PublicFilterSetting being updated.

Type: PublicFilterSetting
Required: False
Position: 9999
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-FASTSearchSecurityPublicFilter
minutes to read • Edit Online

Set-FASTSearchSecurityRegexAliaser
In ths Article

Updates a regular expression aliaser.

Syntax
Set-FASTSearchSecurityRegexAliaser [-Identity] <String> [-CaseSensitive <Boolean>] [-InputUserStoreId <String>]
[-OutputUserStoreIds <String[]>]
[-Patterns
<System.Collections.Generic.List`1[Microsoft.SharePoint.Search.Extended.Security.Config.RegExAliasPatternMapCon
fig]>]
[-RegexAliaser <SecurityRegexAliaser>] [-UnicodeCaseSensitive <Boolean>] [<CommonParameters>]

Description
This cmdlet updates the configuration settings for a regular expression aliaser to map users/groups from one user
store to users/groups in other user stores, based on a regular expression pattern.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchSecurityRegexAliaser -Identity regex1 -OutputUserStoreIds ln2, ln3

This example modifies the output user store ids for the "regex1" regular expression aliaser.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

New-FASTSearchSecurityRegexAliaserPattern -Regex .* -InputPropertyName mail -MapToUsername "\1" | Set-


FASTSearchSecurityRegexAliaser -Identity regexalias1

This example sets the regular expression pattern for the Regex Aliaser "regexalias1". The regular expression pattern
can be used to map the "mail" property of a Microsoft user store to identities in other user stores.

Parameters
-CaseSensitive
Specifies whether the regular expressions patterns defined in the RegExAliasPatternMapConfig list are matched
based on case sensitivity matching rules. The default is true.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The identity of the aliaser to update.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputUserStoreId
The identity of the mapped-from user store.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputUserStoreIds
A comma-separated list of mapped-to user store identities.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Patterns
List of RegExAliasPatternMapConfig instances containing the regular expression patterns using for the mapping.
Use the New -RegExAliasPatternMapConfig cmdlet to create patterns.

Type:
System.Collections.Generic.List`1[Microsoft.SharePoint.Search.Extended.Security.Config.RegExAliasPatternMapConf
ig]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RegexAliaser
A SecurityRegexAliaser object whose property values are used for the SecurityRegexAliaser aliaser being created.
Type: SecurityRegexAliaser
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UnicodeCaseSensitive
Specifies whether the regular expressions patterns defined in the RegExAliasPatternMapConfig list are matched
based on Unicode case sensitivity matching rules.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -FASTSearchSecurityRegexAliaser
Get-FASTSearchSecurityRegexAliaser
New -FASTSearchSecurityRegexAliaserPattern
minutes to read • Edit Online

Set-FASTSearchSecurityXMLAliaser
In ths Article

Updates an XML aliaser.

Syntax
Set-FASTSearchSecurityXMLAliaser -Identity <String> [-InputPropertyName <String>] [-InputUserStoreId <String>]
[-OutputUserStoreIds <String[]>] [-PathToXMLFile <String>] [-XMLAliaser <SecurityXMLAliaser>]
[<CommonParameters>]

Description
This cmdlet updates the configuration settings for an XML principal aliaser.
An XML aliaser maps users/groups from one user store to users/groups in other user stores, based on an XML
mapping file.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Set-FASTSearchSecurityXMLAliaser -Identity xmlalias1 -PathToXMLFile "C:\dev\temp\mapping1.xml"

This example uploads and updates the XML mapping for an XML aliaser.
---------------EXAMPLE 2----------------- (FAST Server for SharePoint 2010)

Get-FASTSearchSecurityAliaser myxmlalias | Set-FASTSearchSecurityXMLAliaser -OutputUserStoreIds ln2 -


InputPropertyName '$PRINCIPAL_REFERENCE_ALIAS'

This example changes the OutputUserStoreIds and InputPropertyName for the XML aliaser piped from a Get-
FASTSearchSecurityAliaser cmdlet.

Parameters
-Identity
The identity of the XML aliaser to update.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputPropertyName
The user/group property name this regular expression pattern is matched again.
The inputPropertyName is one of the following:
-- $PRINCIPAL_REFERENCE_ID - The identifier of the user or group. This is the default.
Be sure to enclose in single quotes: '$PRINCIPAL_REFERENCE_ID'
-- $PRINCIPAL_REFERENCE_ALIAS - The alias of the user or group.
Be sure to enclose in single quotes: '$PRINCIPAL_REFERENCE_NAME'
Any other property of the user or group. Refer to your specific user store for other properties that the user store
exposes.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputUserStoreId
The identity of the mapped-from user store.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputUserStoreIds
A comma-separated list of mapped-to user store identities.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PathToXMLFile
The absolute path to the XML mapping file to upload to the XML aliaser.
The path must specify a file accessible to the security manager.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-XMLAliaser
A SecurityXMLAliaserobject whose property values are being updated.

Type: SecurityXMLAliaser
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
New -FASTSearchSecurityXMLAliaser
Get-FASTSearchSecurityXMLAliaser
minutes to read • Edit Online

Set-SPAccessServiceApplication
In ths Article

Sets global properties of an existing Access Services application in SharePoint Server.

Syntax
Set-SPAccessServiceApplication [-Identity] <SPAccessServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-CacheTimeout <Int32>] [-ColumnsMax <Int32>] [-Confirm]
[-NonRemotableQueriesAllowed] [-OrderByMax <Int32>] [-OuterJoinsAllowed] [-OutputCalculatedColumnsMax <Int32>]
[-PrivateBytesMax <Int32>] [-RecordsInTableMax <Int32>] [-RequestDurationMax <Int32>] [-RowsMax <Int32>]
[-SessionMemoryMax <Int32>] [-SessionsPerAnonymousUserMax <Int32>] [-SessionsPerUserMax <Int32>]
[-SourcesMax <Int32>] [-TemplateSizeMax <Int32>] [-WhatIf] [-ApplicationLogSizeMax <Int32>]
[<CommonParameters>]

Description
The Set-SPAccessServiceApplication cmdlet sets the global runtime properties of an existing Access Services
application in SharePoint Server. The changes made to the properties by using this cmdlet affect all machines in
the farm on which this Access Services application runs.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE 1------------------

Set-SPAccessServiceApplication -identity "MyAccessService" -RequestDurationMax 100

This example sets the Access Services application named MyAccessService to let requests take up to 100 seconds
before they time out.
------------EXAMPLE 2------------------

Get-SPAccessServiceApplication | Set-SPAccessServiceApplication -SessionsPerUserMax 5

This example sets every Access Services application in the farm to allow up to five sessions per user on each back-
end application server computer on which Access Services runs.
First, every Access Services application is retrieved and then a new value is set by using the
Set-SPAccessServiceApplication cmdlet.

------------EXAMPLE 3------------------

Get-SPAccessServiceApplication | where {$_.RowsMax -gt 50000 } | Set-SPAccessServiceApplication -RowsMax 50000


This example sets every Access Services application in the farm that allows more than 50,000 rows to be returned
from, or used in, a query and then sets the service application to allow up to 50,000 rows only.
First, every Access Services application that has more than 50,000 rows is retrieved and then a new value is set by
using the Set-SPAccessServiceApplication cmdlet.

Parameters
-ApplicationLogSizeMax
The maximum number of records for an Access Services Application Log list. Valid valies: -1 to maxint. A value of
zero means none is allowed. The default value is 3000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CacheTimeout
Specifies the number of seconds that a data cache will remain active on Access services with no user activity. Valid
values include: -1, cache never times out; 1 to 2073600, cache remains active from 1 second to 24 days.
The type must be the integers -1, or an integer in the range of 1 to 2073600 (24 days). The default value is 300.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ColumnsMax
Specifies the maximum number of columns that a list involved in a query can contain, or that the output of the
query can contain. The default value is 30.
The type must be an integer in the range of 1 to 255.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Access Services application to update.
The type must be a valid name of an Access Services application; for example, AccessSrvApp1; a valid GUID, in the
form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPAccessServiceApplication object.

Type: SPAccessServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NonRemotableQueriesAllowed
Specifies that queries that cannot be sent remotely to the database tier can run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OrderByMax
Specifies the maximum number of Order By clauses in the query. The default value is 4.
The type must be an integer in the range of 1 to 8.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OuterJoinsAllowed
Specifies that left and right outer joins are supported. Inner joins are always supported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputCalculatedColumnsMax
Specifies the maximum number of calculated columns that can be included in the output as a part of the query.
Calculated columns in the underlying SharePoint list are not included. The default value is 10.
The type must be an integer in the range of 1 to 32.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateBytesMax
Specifies the maximum private bytes in megabytes that can be used by Access Services. When set to -1 it defaults
to 75 percent of physical memory on the machine. Valid values: -1, no limit, from 1 to any positive integer.The
default value is -1.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecordsInTableMax
Specifies the maximum number of records allowed for a table in the Access Services application. Valid values
include: -1, no limit, and 1 to any positive integer. The default value is 500000.
The type must be the integer -1, or an integer in the range of 1 to MaxInt.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestDurationMax
Specifies the maximum number of seconds that a request to perform an operation can use before the request
times out. Valid values include: -1, no limit, 1 to 2073600, cache remains active 1 second to 24 days. The default
value is 30.
The type must be the integer -1, or an integer in the range of 1 to 2073600 (24 days)

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RowsMax
Specifies the maximum number of rows that a list involved in a query can have, or that the output of the query can
have. The default value is 50000.
The type must be an integer in the range of 1 to 200000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionMemoryMax
Specifies the maximum allowable size, in megabytes, of an individual session. Valid values include: 0, disable
property, 1 to 4095. The default value is 64.
The type must be the integer 0, or an integer in the range of 1 to 4095.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionsPerAnonymousUserMax
The maximum number of sessions allowed per user. If this maximum is reached, the oldest session will be deleted
when a new session is started. Valid values include: -1, no limit, and 1 to any positive integer. The default value is
10.
The integer -1, or an integer in the range of 1 to MaxInt
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionsPerUserMax
Specifies the maximum number of sessions allowed per user. If this maximum is reached, the oldest session will be
deleted when a new session is started. Valid values include: -1, no limit, and 1 to any positive integer. The default
value is 10.
The integer -1, or an integer in the range of 1 to MaxInt.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourcesMax
Specifies the maximum number of lists that may be used as input to a query at one time. The default value is 8.
The type must be an integer in the range of 1 to 20.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TemplateSizeMax
The maximum allowable size in megabytes (MB ) allowed for Access templates (.accdt files) uploaded into the
solution gallery. Valid values: -1, no limit, from 1 to any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPAccessServicesApplication
In ths Article

Sets the properties of a Access Services service application.

Syntax
Set-SPAccessServicesApplication [-Identity] <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-CacheTimeout <Int32>] [-Confirm] [-PrivateBytesMax <Int32>]
[-RecoveryPointObjective <Int32>] [-RequestDurationMax <Int32>] [-SessionsPerAnonymousUserMax <Int32>]
[-SessionsPerUserMax <Int32>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPAccessServicesApplication cmdlet to set the properties of an Access Services service application.

Examples
--------------------EXAMPLE---------------------

$sa = Get-SPAccessServicesApplication
Set-SPAccessServicesApplication -Identity $sa -SessionsPerUserMax 50

Sets the maximum number of sessions per user to 50.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CacheTimeout
Sets the cache timeout value in seconds. The default is 300.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Access Service service application to update.
The type must be a valid GUID or the name of a valid managed metadata service application.

Type: SPServiceApplicationPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PrivateBytesMax
Sets the maximum private bytes that can be used by Access Services. The default value is -1 (no limit).

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecoveryPointObjective
Not used.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestDurationMax
Sets the timeout value for requests in seconds. Default is 30.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionsPerAnonymousUserMax
Sets the number of sessions per anonymous user. The default is 25.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionsPerUserMax
Sets the number of sessions per user. The default is 10.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPAccessServicesDatabaseServer
In ths Article

Sets parameters associated with a database server hosting Access Services databases.

Syntax
Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] -AvailableForCreate <Boolean> [-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> [-Exclusive <Boolean>] [-WhatIf]
[<CommonParameters>]

Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind> [-DatabaseServerCredentials <PSCredential>]
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> [-DatabaseServerName <String>] [-WhatIf]
[<CommonParameters>]

Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> -Encrypt <Boolean>
-TrustServerCertificate <Boolean> [-WhatIf] [<CommonParameters>]

Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> -Failover <Boolean> [-WhatIf]
[<CommonParameters>]

Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> [-SecondaryDatabaseServerName <String>]
[-WhatIf] [<CommonParameters>]

Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> -UserDomain <String> [-WhatIf]
[<CommonParameters>]
Set-SPAccessServicesDatabaseServer [-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-DatabaseServer <AccessServicesDatabaseServerPipeBind>
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> -State <DatabaseServerStates>
-StateOwner <ServerStateOwner> [-WhatIf] [<CommonParameters>]

Description
Sets parameters associated with a database server hosting Access Services databases allowing you to control
database creation, credentials, and failover database servers.

Examples
--------------------EXAMPLE---------------------

$site = (Get-SPWebApplication -IncludeCentralAdministration | ?{$_.IsAdministrationWebApplication -eq


$true}).Sites[0]
$dbsvr = (Get-SPAccessServicesDatabaseServer -ServiceContext $site -DatabaseServerGroup DEFAULT)[0]
Set-SPAccessServicesDatabaseServer -ServiceContext $site -DatabaseServerGroup DEFAULT -DatabaseServer $dbsvr -
Exclusive $true -AvailableForCreate $false

Sets the first database in the database server group named DEFAULT to exclusive mode and disallowing creation
of new Access Services database on the selected database server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AvailableForCreate
Indicates whether new Access Services databases can be created on the specified SQL Server.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the SQL Server hosting Access Services databases.

Type: AccessServicesDatabaseServerPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerCredentials
Specifies the Credential object for the database user. Use this parameter if you use SQL Server Authentication. If
no database credentials are provided, Windows authentication is used.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerGroup
The name of the Access Services database server group containing the SQL Server object to set.

Type: AccessServicesDatabaseServerGroupPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerName
Specifies the database server hosting Access Services databases.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encrypt
Encrypts the database server connection.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Exclusive
Sets the database server to exclusive mode. No further Access Services databases are allowed to be created on the
database server.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Failover
Enables or disables failover for the Access Services database server.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryDatabaseServerName
Specifies the failover database server name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context which is in the form of an instance of an SPServiceContext object, an
SPSiteAdministration object identifier, or a SPSite object. An example of a service context value is an identifier
from the ID field, a string identifier, a URI, or a string representation of a GUID.

Type: SPServiceContextPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-State
Sets the database server state. Valid values:
Active
Locked
Reserved

Type: DatabaseServerStates
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StateOwner
Sets the state owner.
Valid values:
NoOwner
TenantMove

Type: ServerStateOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustServerCertificate
Sets a value that indicates whether the channel will be encrypted while bypassing walking the certificate chain to
validate trust.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserDomain
Sets the user domain for the specified database server.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPAccessServicesDatabaseServerGroupMapping
In ths Article

Sets or creates the Access Services database server group mapping.

Syntax
Set-SPAccessServicesDatabaseServerGroupMapping [-ServiceContext] <SPServiceContextPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-ClearMapping] [-Confirm] [-CorporateCatalog]
[-DeveloperSite] [-ObjectModel] [-RemoteObjectModel] [-StoreFront] [-WhatIf] [<CommonParameters>]

Set-SPAccessServicesDatabaseServerGroupMapping [-ServiceContext] <SPServiceContextPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-CorporateCatalog]
-DatabaseServerGroup <AccessServicesDatabaseServerGroupPipeBind> [-DeveloperSite] [-ObjectModel]
[-RemoteObjectModel] [-StoreFront] [-WhatIf] [<CommonParameters>]

Description
This cmdlet allows you to set the database server group to package source mapping.

Examples
--------------------EXAMPLE 1---------------------

$site = (Get-SPWebApplication -IncludeCentralAdministration | ?{$_.IsAdministrationWebApplication -eq


$true}).Sites[0]
Set-SPAccessServicesDatabaseServerGroupMapping -ServiceContext $site -DatabaseServiceGroup GROUP2

Creates an Access Services database group named GROUP2.


--------------------EXAMPLE 1---------------------

$site = (Get-SPWebApplication -IncludeCentralAdministration | ?{$_.IsAdministrationWebApplication -eq


$true}).Sites[0]
Set-SPAccessServicesDatabaseServerGroupMapping -ServiceContext $site -DatabaseServiceGroup GROUP2 -
CorporateCatalog

Sets the database group named GROUP2 associating the group with packages from the corporate catalog.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClearMapping
Clears the database group mapping.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CorporateCatalog
Associates the database server group with packages uploaded to the corporate catalog (SharePoint Add-ins).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServerGroup
The name of the database server group to set or create.

Type: AccessServicesDatabaseServerGroupPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DeveloperSite
Associates the database server group with packages that came from the Developer Site. A Developer Site is one
type of SharePoint template, intended as a site for developers to build, test and publish Office Add-ins.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ObjectModel
Associates the database server group with packages uploaded via the server-side object model.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoteObjectModel
Associates the database server group with packages that are uploaded via the client-side object model.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context which is in the form of an instance of an SPServiceContext object, an
SPSiteAdministration object identifier, or a SPSite object. An example of a service context value is an identifier
from the ID field, a string identifier, a URI, or a string representation of a GUID.

Type: SPServiceContextPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-StoreFront
Associates the SharePoint Marketplace with the database server group.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceContextPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPAlternateURL
In ths Article

Configures the specified alternate URL.

Syntax
Set-SPAlternateURL [-Identity] <SPAlternateUrlPipeBind> [-Url <String>] [-Zone <SPUrlZone>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Set-SPAlternateUrl cmdlet changes the URL or zone of the alternate URL specified by the Identity parameter.
This cmdlet can be used to change only the zone of internal URLs and cannot be used to change the zone of public
URLs.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Set-SPAlternateURL -Identity https://www.contoso.com -Zone "Internet"

This example changes the zone of the alternate URL https://www.contoso.com.


------------------EXAMPLE 2------------------

Set-SPAlternateURL -Identity https://www.contoso.com -Url https://sharepoint.contoso.com -Zone "Default"

This example changes the URL and zone of the alternate URL https://www.contoso.com.
------------------EXAMPLE 3------------------

Get-SPAlternateURL https://www.contoso.com | Set-SPAlternateURL -Zone "Internet"

This example changes the zone of the alternate URL https://www.contoso.com.


------------------EXAMPLE 4------------------

Get-SPWebApplication |%{ Get-SPAlternateURL -WebApplication $_ -Zone "Extranet" } | Set-SPAlternateURL -Zone


"Intranet"

This example changes the zone of the alternate URL for the specified Web application from Extranet to Intranet.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the alternate URL to change.
The type must be a valid URL, in the form https://server_name/WebApplication/site, or a valid GUID, in the form
12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPAlternateUrlPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the new alternate URL.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Sets the supplied alternate URL as one of the five zones.
The type must be any one of the following values: Default, Intranet, Internet, Extranet, or Custom.

Type: SPUrlZone
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPAppAcquisitionConfiguration
In ths Article

Sets app acquisition settings.

Syntax
Set-SPAppAcquisitionConfiguration -Enable <Boolean> -SiteSubscription <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Set-SPAppAcquisitionConfiguration -Enable <Boolean> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


-WebApplication <SPWebApplicationPipeBind> [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Set-SPAppAcquisitionConfiguration cmdlet to set app acquisition settings from the SharePoint Store or
App Catalog.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
(https://go.microsoft.com/fwlink/p/?LinkId=671715).

Examples
--------------------EXAMPLE 1---------------------

Set-SPAppAcquisitionConfiguration -WebApplication https://localhost -Enable:$false

This example disabled app purchases for the specified Web Application.
--------------------EXAMPLE 2---------------------

Set-SPAppAcquisitionConfiguration -SiteSubscription https://localhost/sites/SharePointOnlineAdmin1 -


Enable:$false

This example disables app purchases for the specified tenant.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Specifies whether acquisition is enabled or disabled.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the site collection for which to set app acquisition settings.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the web application for which acquisitions settings are to be set.
Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPSiteSubscriptionPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Get-SPAppAcquisitionConfiguration
minutes to read • Edit Online

Set-SPAppAutoProvisionConnection
In ths Article

Sets provision connection settings for an app.

Syntax
Set-SPAppAutoProvisionConnection -ConnectionType <ConnectionTypes> -EndPoint <String>
[-AssignmentCollection <SPAssignmentCollection>] [-SiteSubscription <SPSiteSubscriptionPipeBind>]
[<CommonParameters>]

Set-SPAppAutoProvisionConnection -ConnectionType <ConnectionTypes> -EndPoint <String> -Password <String>


-Username <String> [-AssignmentCollection <SPAssignmentCollection>]
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Set-SPAppAutoProvisionConnection -ConnectionType <ConnectionTypes> -Password <String> -Username <String>


[-AssignmentCollection <SPAssignmentCollection>] [-SiteSubscription <SPSiteSubscriptionPipeBind>]
[<CommonParameters>]

Set-SPAppAutoProvisionConnection [-Remove] [-AssignmentCollection <SPAssignmentCollection>]


[-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Set-SPAppAutoProvisionConnection cmdlet to set provision connection settings for a specified app.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

Set-SpAppAutoProvisionConnection -ConnectionType RemoteWebHost -EndPoint https://SPremotewebhost -Password


passname -Username

This example configures remote web host to be used provision apps that use this functionality for the default site
subscription server on https://SPremotewebhost.
--------------------EXAMPLE 2---------------------
C:\PS>$subscription = Get-SPSiteSubscription https://Contoso.com

Set-SPAppAutoProvisionConnection -ConnectionType RemoteWebHost -EndPoint https://SPremotewebhost -Password


passname -Username -SiteSubscription $subscription

This example configures remote web host to be used provision apps that use this functionality for the site
subscription of Contoso.com site to server on https://SPremotewebhost.
--------------------EXAMPLE 3---------------------

Set-SPAppAutoProvisionConnection -ConnectionType RemoteWebHost -EndPoint https://SPremotewebhost

This example updates the endpoint of the already configured remote web host server https://SPRemotewebhost
for the default site subscription.
--------------------EXAMPLE 4---------------------

Set-SPAppAutoProvisionConnection -ConnectionType RemoteWebHost -Remove

This example removes the remote web host configuration for the default site subscription.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ConnectionType
Specifies the connection type to provision.

Type: ConnectionTypes
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndPoint
Specifies the end point of the provision connection.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password for the provision connection.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Remove
Removes the auto provision connection of the app.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the site collection for which the provision connection is to be associated.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Username
Specifies the user name of the connection.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPAppAutoProvisionConnection
minutes to read • Edit Online

Set-SPAppDisablingConfiguration
In ths Article

Sets the disable list sync state for an app.

Syntax
Set-SPAppDisablingConfiguration -Enable <Boolean> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Use the Set-SPAppDisablingConfiguration cmdlet to set the disabled sync list state for an app .
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
(https://go.microsoft.com/fwlink/p/?LinkId=671715).

Examples
--------------------EXAMPLE---------------------

Set-SPAppDisablingConfiguration

This example sets the disable sync state for apps.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Specifies whether to enable or disable an entry from the list.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Get-SPAppDisablingConfiguration
minutes to read • Edit Online

Set-SPAppDomain
In ths Article

Sets the domain used to host apps.

Syntax
Set-SPAppDomain [-AppDomain] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Set-SPAppDomain cmdlet to set the domain used to host apps in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPAppDomain -Domain apps.contoso.com

This example sets the app domain to apps.contoso.com. All apps in the farm will be hosted in the apps.contoso.com
domain.

Parameters
-AppDomain
Specifies the domain to be used for apps.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPAppDomain
minutes to read • Edit Online

Set-SPAppHostingQuotaConfiguration
In ths Article

Sets hosting quotas for an app.

Syntax
Set-SPAppHostingQuotaConfiguration -AppHostingLicenseQuota <Double> -AppInstanceCountQuota <Double>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
-SiteSubscription <SPSiteSubscriptionPipeBind> [<CommonParameters>]

Description
Use the Set-SPAppHostingQuotaConfiguration cmdlet to set hosting quotas for a specified app by using the
Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
(https://go.microsoft.com/fwlink/p/?LinkId=671715).

Examples
----------------EXAMPLE 1----------

Set-SPAppHostingQuotaConfiguration -Identity 586d4a32-98c3-42ce-80be-3c76c10c250c -AppInstanceCountQuota 50 -


AppHostingLicenseQuota 25

This example sets hosting Quotas for the SiteSubscriptionId "586d4a32-98c3-42ce-80be-3c76c10c250c" with
hosted appinstance limit as 50 and hosted apps licenses assigned as 25.
----------------EXAMPLE 2----------

Get-SPSiteSubscription | Set-SPAppHostingQuotaConfiguration -Identity $_ -AppInstanceCountQuota 50 -


AppHostingLicenseQuota 25

This example sets hosting Quotas for all SiteSubscriptions in the farm with hosted apps limit as 50 and hosted
apps licenses assigned as 25.

Parameters
-AppHostingLicenseQuota
Specifies the app licensing quota.
Type: Double
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppInstanceCountQuota
Specifies the number instances of an app.

Type: Double
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the Site Subscription.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPSiteSubscriptionPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Get-SPAppHostingQuotaConfiguration
minutes to read • Edit Online

Set-SPApplicationCredentialKey
In ths Article

Sets the application credential key on the local server.

Syntax
Set-SPApplicationCredentialKey [-Password] <SecureString> [-AssignmentCollection <SPAssignmentCollection>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
Use the Set-SPApplicationCredentialKey cmdlet to set the application credential key on the local server, which is
used by certain features to encrypt and decrypt passwords.
The application credential key must be identical on each server in the farm where it is set.

Examples
EXAMPLE

$key = ConvertTo-SecureString -String "New Password" -AsPlainText -Force


Set-SPApplicationCredentialKey -Password $key

This example sets the application credential key on the local server to "New Password".

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the application credential key. Avoid reusing the farm passphrase or service account passwords for the
application credential key.

Type: SecureString
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPApplicationCredentialKey
minutes to read • Edit Online

Set-SPAppManagementDeploymentId
In ths Article

Sets the identifier of the farm or tenant used by the Office Marketplace to issue App licenses.

Syntax
Set-SPAppManagementDeploymentId -AppManagementServiceApplication <AppManagementServiceApplication>
-DeploymentId <Guid> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Identity <SPSiteSubscriptionPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPAppManagementDeploymentId cmdlet to set the identifier of the farm or tenant used by the Office
Marketplace to issue App Licenses. To ensure you do not lose rights to the use of all Apps you have purchased on
the Marketplace, do not change the deployment id unless directed by Microsoft documentation or support.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE 1----------

$sa = Get-SPServiceApplication | where {$_.TypeName -eq "App Management Service Application"}


Set-SPAppManagementDeploymentId -DeploymentId 3102B7C3-1866-48EE-91CB-84E20AD24BF2 -
AppManagementServiceApplication $sa

This example sets the deployment identifier of the current farm to 3102B7C3-1866-48EE -91CB -84E20AD24BF2.
-----------EXAMPLE 2----------

$sa = Get-SPServiceApplication | where {$_.TypeName -eq "App Management Service Application"}


Get-SPSiteSubscription | where{$_.Id -eq "88f16a50-0530-4f3f-b749-24ef0b30d685"} | Set-
SPAppManagementDeploymentId -DeploymentId 3102B7C3-1866-48EE-91CB-84E20AD24BF2 -AppManagementServiceApplication
$sa

This example sets the deployment identifier of the tenant with the site subscription identifier 88f16a50-0530-4f3f-
b749-24ef0b30d685 to 3102B7C3-1866-48EE -91CB -84E20AD24BF2.

Parameters
-AppManagementServiceApplication
Specifies the app management service application object that is running on the farm.
Type: AppManagementServiceApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeploymentId
Specifies the deployment identifier value for the tenant. This parameter works in conjunction with the value that is
defined with Identity parameter. If Identity parameter is omitted, then it is assumed that this deployment identifier
value belongs to the farm.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Identifies the site subscription object representing the tenant to which the DeploymentId parameter is to be
assigned. If the Identity parameter is omitted, it is assumed that the deployment identifier belongs to the farm.
Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPAppPrincipalPermission
In ths Article

Sets the permissions on a given app principal.

Syntax
Set-SPAppPrincipalPermission -AppPrincipal <SPAppPrincipal> -Right <SPCmdletAppPrincipalPermissionKind>
-Scope <SPCmdletAppPrincipalPermissionScope> -Site <SPWebPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [-EnableAppOnlyPolicy]
[<CommonParameters>]

Description
Use the Set-SPAppPrincipalPermission cmdlet to set the permissions on a given app principal for a given scope
(tenant, site collection, and web) and given levels (Read, Write, Manage, Full Control).

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE-------------

$clientID = "11111111-2222-3333-4444-555555555555"
$site = Get-SPSite https://siteUrl
$realm = Get-SPAuthenticationRealm -ServiceContext $site
$appIdentifier = $clientID + "@" + $realm
$appPrincipal = Get-SPAppPrincipal -NameIdentifier $appIdentifier -Web $site.RootWeb
Set-AppPrincipalPermission -AppPrincipal $appPrincipal -Site $site.RootWeb -Scope Site -Level Manage

This example sets the App Principal permission to Manage with a scope of Site.

Parameters
-AppPrincipal
Specifies the AppPrincipal object.

Type: SPAppPrincipal
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableAppOnlyPolicy
Specifies if the app only policy is turned on for the app principal.
The valid values are True and False. The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Right
Specifies the permission level for the principal object.
The value is any of the following levels:
--Read
--Write
--Manage
--Full Control
Type: SPCmdletAppPrincipalPermissionKind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Specifies the scope to which to apply the principal permission.
The value is any of the following scopes:
--Site
--SiteCollection
--SiteSubscription

Type: SPCmdletAppPrincipalPermissionScope
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the site (that is, SPWeb object) that the AppPrincipalPermission is being set.a

Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPAppPrincipalPermission
minutes to read • Edit Online

Set-SPAppScaleProfile
In ths Article

Sets settings for the app profile.

Syntax
Set-SPAppScaleProfile [-AssignmentCollection <SPAssignmentCollection>] [-MaxDatabaseSize <String>]
[-RemoteWebSiteInstanceCount <Int32>] [<CommonParameters>]

Description
Use the Set-SPAppScaleProfile cmdlet to set settings for an app profile.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE-----------

Set-SPAppScaleProfile -MaxDatabaseSize "2 GB" -RemoteWebSiteInstanceCount 1

This example sets the farm level app scale profile.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MaxDatabaseSize
Specifies the database size of the app profile.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoteWebSiteInstanceCount
Specifies whether a remote site can access the profilefrom.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPAppScaleProfile
minutes to read • Edit Online

Set-SPAppSiteDomain
In ths Article

Creates or changes the URL of any installed app.

Syntax
Set-SPAppSiteDomain -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Use the Set-SPAppSiteDomain cmdlet to create or change the URL of any installed app by using the Site
parameter to reset the subscription name and app site domain identifier.

Examples
--------------------EXAMPLE---------------------

Set-SPAppSiteDomain -Site https://www.contoso.com

This example sets the subscription name and app site domain identifier for the https://www.contoso.com site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the SPSite object or the GUID of the SPSite or the URL of the SPSite.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPAppSiteSubscriptionName
In ths Article

Sets or changes the name for the specified site subscription.

Syntax
Set-SPAppSiteSubscriptionName -Name <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Force] [-SiteSubscription <SPSiteSubscriptionPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPAppSiteSubscriptionName cmdlet to set or change the name for a specified site subscription by using
the Name parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE 1----------

Set-SPAppSiteSubscriptionName -Name Contoso

This example sets the name of the default site subscription to "Contoso".
-----------EXAMPLE 2----------

Set-SPAppSiteSubscriptionName -Name Contoso -SiteSubscription https://www.contoso.com

This example changes the name of the site subscription for SPSite from https://www.contoso.com to "Contoso".

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
The site subscription name is recorded in other databases in the SharePoint farm. In cases such as disaster
recovery or restore of the SharePoint farm, the Force parameter can be specified to ensure that the site
subscription name has been propagated appropriately throughout the SharePoint farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name for the site subscription.
Each site subscription must have a unique name. The name is used in part to determine the domain that apps for
SharePoint are installed in for each site subscription.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the SPSiteSubscription object or the SPSiteSubscription Id or the URL of an SPSite. If this parameter is
not specified, then the default site subscription is used. All SharePoint SPSites are members of the default site
subscription if they have not been specifically assigned a site subscription.
Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPAppSiteSubscriptionName
minutes to read • Edit Online

Set-SPAppStateUpdateInterval
In ths Article

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

Syntax
Set-SPAppStateUpdateInterval -AppStateSyncHours <Int32> -FastAppRevocationHours <Int32>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPAppStateUpdateInterval cmdlet to set the interval in hours between updates of the app state update
job. The app state update job updates the app states, including app updates, in SharePoint based on information in
the SharePoint Store.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE--------------

Set-SPAppStateUpdateInterval -AppStateSyncHours 24 -FastAppRevocationHours 6

This example sets the app state update interval to 24 hours and the fast app revocation interval to 6 hours.

Parameters
-AppStateSyncHours
Specifies the interval in hours between updates of the app states. Values are 1 to 24 inclusive.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FastAppRevocationHours
Specifies the interval in hours between checks of the list of revoked apps in the SharePoint Store. If the list of
revoked apps has changed from the last time, the app states are updated.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPAppStateUpdateInterval
minutes to read • Edit Online

Set-SPAppStoreConfiguration
In ths Article

Sets SharePoint Store settings for an app.

Syntax
Set-SPAppStoreConfiguration [-Url <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] -Enable <Boolean> [<CommonParameters>]

Description
Use the Set-SPAppStoreConfiguration cmdlet to set SharePoint Store settings for a specified app.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
https://go.microsoft.com/fwlink/p/?LinkId=671715.

Examples
--------------------EXAMPLE 1---------------------

Set-SPAppStoreConfiguration -Url https://office.microsoft.com -Enable $true

This example sets the URL to the Office.com server.


--------------------EXAMPLE 2---------------------

Set-SPAppStoreConfiguration -Enable $false

This example turns off the SharePoint Store.


--------------------EXAMPLE 3---------------------

Set-SPAppStoreConfiguration -Enable $true

This example turns on the SharePoint Store.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Specifies whether the Office Store services lets third- party add-ins to be found or downloaded.
This is intended for administrators to disable discovery and downloads of third-party add-ins on their SharePoint
tenants and site collections.
The valid values are True and False.
The default value is False.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the app for which to set SharePoint Store settings.
The SharePoint store value should not be changed unless instructed by a Microsoft representative.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Get-SPAppStoreConfiguration
minutes to read • Edit Online

Set-SPAppStoreWebServiceConfiguration
In ths Article

Sets properties of a SharePoint Store app.

Syntax
Set-SPAppStoreWebServiceConfiguration [-AssignmentCollection <SPAssignmentCollection>] -Client <String>
[-Confirm] [-ProxyVersion <Version>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPAppStoreWebServiceConfiguration cmdlet to set the product type (On-Premises or Online) and the
version used to access the SharePoint Store when SharePoint is configured to access the .
This cmdlet is not intended for the ITPro audience.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
https://go.microsoft.com/fwlink/p/?LinkId=671715.

Examples
--------------------EXAMPLE---------------------

Set-SPAppStoreWebServiceConfiguration -Client=SP -ProxyVersion=16.1

This example set the product type and version for a SharePoint Store app.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Client
Specifies the client value of the SharePoint Store app.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxyVersion
Specifies the proxy version value of the SharePoint Store app.

Type: Version
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPAuthenticationRealm
In ths Article

Sets the authentication realm.

Syntax
Set-SPAuthenticationRealm [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Realm <String>]
[-ServiceContext <SPServiceContextPipeBind>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPAuthenticationRealm cmdlet to set the authentication realm at the farm or site collection level by
using the Realm parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$c = Get-SPServiceContext -Site "https://"


Set-SPAuthenticationRealm -ServiceContext $c -Realm "t686d436-9f16-42db-09b7-cb578e110ccd"

This example sets the authentication realm as specified by the realm parameter.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Realm
Specifies the realm to be set.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceContext
Specifies the service context for which the realm needs to be set. For example, $root.web.

Type: SPServiceContextPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPAuthenticationRealm
minutes to read • Edit Online

Set-SPBingMapsBlock
In ths Article

Sets Bing maps to blocked status.

Syntax
Set-SPBingMapsBlock [-BlockBingMapsInAllLocales] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Use the Set-SPBingMapsBlock cmdlet to specify whether to block Bing Maps in all locales, or not to block them in all
locales. Bing Maps will be displayed only in non-restricted locales if this property is not set. The default value is 0
(not blocked). Use a value of 1 to block in all locales.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPBingMapsBlock 1

This example displays how to block Bing Maps in all locales for the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BlockBingMapsInAllLocales
Specifies whether Bing Maps are blocked in all locales.

Type: SwitchParameter
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPBingMapsBlock
Get-SPBingMapsKey
Set-SPBingMapskey
minutes to read • Edit Online

Set-SPBingMapsKey
In ths Article

Sets the Bing Maps key.

Syntax
Set-SPBingMapsKey [-BingKey] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Set-SPBingMapsKey cmdlet to set the Bing Maps key. This key lets you access Bing Maps. For additional
information about Bing Keys, see Bing Maps Account Center (https://www.bingmapsportal.com/)
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPBingMapsKey -BingKey

This example sets the key that is used by Bing Maps.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-BingKey
Specifies the Bing Maps key to set.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPBingMapsKey
minutes to read • Edit Online

Set-SPBrowserCustomerExperienceImprovementProgram
In ths Article

Turns on or off the browser Customer Experience Improvement Program.

Syntax
Set-SPBrowserCustomerExperienceImprovementProgram [-Farm] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Enable] [-WhatIf] [<CommonParameters>]

Set-SPBrowserCustomerExperienceImprovementProgram -SiteSubscription <SPSiteSubscriptionPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Enable] [-WhatIf] [<CommonParameters>]

Set-SPBrowserCustomerExperienceImprovementProgram -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Enable] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPBrowserCustomerExperienceImprovementProgram cmdlet turns on or off the browser Customer Experience
Improvement Program for collecting software quality metrics.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Set-SPBrowserCustomerExperienceImprovementProgram -Farm -Enable

This example turns on the browser Customer Experience Improvement Program for the farm.
------------------EXAMPLE 2-----------------------

Set-SPBrowserCustomerExperienceImprovementProgram -Farm -Enable:$False

This example turns off the browser Customer Experience Improvement Program for the farm.
------------------EXAMPLE 3-----------------------
Set-SPWebApplication https://MyOfficeApp1 | Get- SPBrowserCustomerExperienceImprovementProgram -Enable

This example turns on the browser Customer Experience Improvement Program for the Web application,
MyOfficeApp1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Turns on the browser Customer Experience Improvement Program. The default value is True.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Farm
{{Fill Farm Description}}
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Sets the Customer Experience Improvement Program opt-in state for the specified site subscription.
The type must be a valid URL, in the form https://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid
SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Sets the Customer Experience Improvement Program opt-in state for the specified SharePoint Web application.
The type must be a valid URL, in the form https://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of SharePoint Web application (for example, MyOfficeApp1); or an instance of
a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPBusinessDataCatalogEntityNotificationWeb
In ths Article

Sets the entity notification site.

Syntax
Set-SPBusinessDataCatalogEntityNotificationWeb -Web <SPWebPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPBusinessDataCatalogEntityNotificationWeb cmdlet to sets the entity notification site for the specified
service context by using the Web parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPBusinessDataCatalogEntityNotificationWeb -Web "https://contoso"

This example sets https://contoso as the entity notification site for the service context of the site at https://contoso.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Web
Specifies the site to be set as the entity notification site for its own service context.

Type: SPWebPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Clear-SPBusinessDataCatalogEntityNotificationWeb
Get-SPBusinessDataCatalogEntityNotificationWeb
minutes to read • Edit Online

Set-SPBusinessDataCatalogMetadataObject
In ths Article

Sets the value of a property or attribute of a Business Data Connectivity Metadata Store metadata object.

Syntax
Set-SPBusinessDataCatalogMetadataObject -Identity <MetadataObject>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DisplayName <String>] [-Remove]
[-SettingId <String>] [-WhatIf] [<CommonParameters>]

Set-SPBusinessDataCatalogMetadataObject -Identity <MetadataObject>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-PropertyName <String>]
[-PropertyValue <PSObject>] [-Remove] [-SettingId <String>] [-WhatIf] [<CommonParameters>]

Set-SPBusinessDataCatalogMetadataObject -Identity <MetadataObject>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-PropertyName <String>] [-Remove]
[-SettingId <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPBusinessDataCatalogMetadataObject cmdlet sets the value of a property or attribute of a Business Data
Connectivity Metadata Store metadata object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$obj = Get-SPBusinessDataCatalogMetadataObject -Namespace "ContosoDatabase" -Name "ContosoDatabase" -


BdcObjectType "LobSystemInstance" -ServiceContext http://contoso
Set-SPBusinessDataCatalogMetadataObject -Identity $obj -PropertyName "ShowInSearchUI" -PropertyValue "True"

This example creates a property on the LobSystemInstance (External System Instance) of name ContosoDatabase.
The property has the name ShowInSearchUI and a value of True.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies the display name of the Business Data Connectivity Metadata Store metadata object.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Business Data Connectivity Metadata Store metadata object to update.

Type: MetadataObject
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PropertyName
Specifies the name of the property to update.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertyValue
Sets the new value of the property specified in the PropertyName parameter.

Type: PSObject
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Remove
Removes the property specified in the PropertyName parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SettingId
Specifies the custom environment settings model slice for which the property applies.
The type must be a valid string that identifies a model slice; for example, ModelSlice1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPBusinessDataCatalogServiceApplication
In ths Article

Sets global properties for a Business Data Connectivity service application in the farm.

Syntax
Set-SPBusinessDataCatalogServiceApplication [-ApplicationPool <SPIisWebServiceApplicationPool>]
[-DatabaseCredentials <PSCredential>] [-DatabaseName <String>] [-DatabasePassword <SecureString>]
[-DatabaseServer <String>] [-DatabaseUsername <String>] [-FailoverDatabaseServer <String>]
-Identity <SPServiceApplicationPipeBind> [-Name <String>] [-Sharing] [-Confirm] [-WhatIf]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Set-SPBusinessDataCatalogServiceApplication cmdlet sets global properties for a Business Data Connectivity
service application in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Business Data Connectivity Service Application'}


Set-SPBusinessDataCatalogServiceApplication -Identity $sa -FailoverDatabaseServer "CONTOSO\Backup"

This example sets the failover database server to CONTOSO\Backup for the given service application.

Parameters
-ApplicationPool
Specifies the IIS application pool to use for the new Business Data Connectivity service application.

Type: SPIisWebServiceApplicationPool
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AssignmentCollection
{{Fill AssignmentCollection Description}}
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL Server
Authentication.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseName
Specifies the name of the Business Data Connectivity database.
The type must be a valid name of a SQL Server database; for example, UsageLogDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabasePassword
Specifies the password for the user specified in DatabaseUserName. Use this parameter only if SQL Server
Authentication is used to access the Business Data Connectivity database.
The type must be a valid password.
Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the Business Data Connectivity database.
The type must be a valid name of a SQL Server database; for example, UsageLogDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatabaseUsername
Specifies the user name to use for connecting to the catalog database. Use this parameter only if SQL Server
Authentication is used to access the Business Data Connectivity database.
The type must be a valid user name; for example, UserName1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host server for the failover database server.
The type must be a valid SQL Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Identity
Specifies the Business Data Connectivity service application associated with the new proxy.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-Name
Specifies a display name for the new Business Data Connectivity service application proxy.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Sharing
Specifies that the Business Data Connectivity service application is published and shared across the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPBusinessDataCatalogThrottleConfig
In ths Article

Sets the throttling configuration for a Business Data Connectivity Service application.

Syntax
Set-SPBusinessDataCatalogThrottleConfig -Default <Int32> -Identity <ThrottleConfig> -Maximum <Int32>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Set-SPBusinessDataCatalogThrottleConfig [-Enforced] -Identity <ThrottleConfig>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPBusinessDataCatalogThrottleConfig cmdlet sets the throttling configuration for a Business Data
Connectivity Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPBusinessDataCatalogThrottleConfig -Scope Database -ThrottleType Items -ServiceApplicationProxy


$contosoServAppProxy | Set-SPBusinessDataCatalogThrottleConfig -Maximum 1000000000 -Default 500000

This example sets the database item throttling to values of 1000000000 maximum and 500000 default for the
given service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Default
Specifies the default setting of the throttle configuration.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enforced
Specifies that the throttle configuration setting cannot be overridden.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the throttle configuration to update.

Type: ThrottleConfig
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Maximum
Specifies the maximum value of the throttling configuration setting.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPCentralAdministration
In ths Article

Sets the port for the SharePoint Central Administration Web site.

Syntax
Set-SPCentralAdministration -Port <Int32> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[-SecureSocketsLayer] [<CommonParameters>]

Description
The Set-SPCentralAdministration cmdlet sets the port for the Central Administration site.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
------------------EXAMPLE------------------

Set-SPCentralAdministration -Port 8282

This example sets the port for the Central Administration web application on the local farm to 8282.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Port
Specifies the administration port for the Central Administration site.
The type must be a valid port number; for example, 8080.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecureSocketsLayer
Enables Secure Socket Layer (SSL ) encryption for the specified port. If you choose to use SSL, you must assign a
server certificate to the Central Administration IIS web site by using the IIS administration tools. The Central
Administration web application won't be accessible until you do this.
The default value is False.
If this parameter is omitted or set to False the Central Administration site will use HTTP for the specified port.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPClaimProvider
In ths Article

Updates registration of a claims provider.

Syntax
Set-SPClaimProvider [-Identity] <SPClaimProviderPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Default] [-Enabled] [<CommonParameters>]

Description
The Set-SPClaimProvider cmdlet updates registration of a claims provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Set-SPClaimProvider -Identity "12345678-90ab-cdef-1234-567890bcdefgh"

This example turns off the specified claim provider.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Default
Specifies that the claim provider applies to all Web applications and zones.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enabled
Turns on the claim provider.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the claim provider to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a claim
provider (for example, MyClaimProvider1); or an instance of a valid SPClaimProvider object.

Type: SPClaimProviderPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPContentDatabase
In ths Article

Sets global properties of a SharePoint content database.

Syntax
Set-SPContentDatabase [-Identity] <SPContentDatabasePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-MaxSiteCount <Int32>] [-Status <SPObjectStatus>] [-WarningSiteCount <Int32>] [-WhatIf]
[-DatabaseFailoverServer <String>] [<CommonParameters>]

Description
The Set-SPContentDatabase cmdlet sets global properties of a SharePoint content database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1---------------

Get-SPContentDatabase https://contoso.com | Set-SPContentDatabase -MaxSiteCount 1

This example sets the MaxSiteCount for the content database that contains contoso.com to 1.
---------------EXAMPLE 2---------------

Get-SPContentDatabase -WebApplication https://sitename | Set-SPContentDatabase -WarningSiteCount $null

This example clears the WarningSiteCount for all databases in the sitename Web application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseFailoverServer
Specifies the name of the mirror server for failover.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the content database to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint content database (for example, SPContentDB1); or an instance of a valid SPContentDatabase object.

Type: SPContentDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MaxSiteCount
Specifies the maximum number of site collections that this database can host.
The type must be a positive integer. Set to $null to clear this value.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Status
Specifies the status of the SQL Server database. Set this parameter to Online to make the database available to
host new sites. Set this parameter to Disabled to make the database unavailable to host new sites.
The type must be either of the following: Online or Disabled

Type: SPObjectStatus
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WarningSiteCount
Specifies the number of site collections that can be created before a warning event is generated and the owner of
the site collection is notified.
The type must be a positive integer. Set to $null to clear this value.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPContentDeploymentJob
In ths Article

Sets properties of a content deployment job.

Syntax
Set-SPContentDeploymentJob [-Identity] <SPContentDeploymentJobPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>]
[-EmailAddresses <String[]>] [-EmailNotifications <ContentDeploymentNotificationSettings>]
[-HostingSupportEnabled] [-IncrementalEnabled] [-Name <String>] [-Schedule <String>] [-ScheduleEnabled]
[-Scope <SPWebPipeBind[]>] [-SqlSnapshotSetting <ContentDeploymentSqlSnapshotSetting>] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPContentDeploymentJob cmdlet sets the properties of a content deployment job.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE------------------

Get-SPContentDeploymentJob "Job 1" | Set-SPContentDeploymentJob -Schedule "hourly between 0 and 59" -


ScheduleEnabled:$true

This example sets the deployment job called Job 1 to run hourly.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description for the content deployment job. The name can be a maximum of 4096 alphanumeric
characters.
The type must be a valid string.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EmailAddresses
Specifies the e-mail addresses of individuals who receive notification e-mails about this ContentDeploymentJob
object.
The type must be a list of valid e-mail addresses.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailNotifications
Specifies how e-mail notifications are sent about this ContentDeploymentJob object.
The type must be one of the following:
-Never specifies that e-mail notifications will not be sent when a job succeeds or fails.
Success specifies that e-mail notifications will be sent if a content deployment job succeeds.
Failure specifies that e-mail notifications will be sent if a content deployment job fails.
Always specifies that e-mail notifications will be sent when a job succeeds or fails.
Type: ContentDeploymentNotificationSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostingSupportEnabled
Enables special hosting behavior. The default value is False.
Normally, a content deployment job is enabled or disabled by using the SharePoint Central Administration Web
site. However, in the case of hosting, the tenant administrator does not have permissions to access the Central
Administration page to configure jobs. Therefore, when the HostingSupportEnabled parameter is set to True, the
hoster creates the job, so that tenants can enable or disable their deployment jobs from their tenant administration
site.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the content deployment job to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a content
deployment job (for example, DeployJob1); or an instance of a valid SPContentDeploymentJob object.

Type: SPContentDeploymentJobPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncrementalEnabled
Specifies that only incremental changes are deployed to the destination site collection.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the new content deployment job.
The type must be a valid name of a content deployment job; for example, DeployJob1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Schedule
Sets the schedule for the deployment job.
The type must be a valid SPSchedule object.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleEnabled
Enables the schedule for the deployment job. If the schedule is not enabled, the job can be run manually only.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Sets the scope of the deployment job. SPSite objects that are passed in must exist in the current path of the source
site collection. The default scope is the entire site collection. Valid values include a SPWeb object or an array of
SPWeb objects.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint Foundation Web site (for example, MySPSite1); or an instance of a valid SPWeb object.

Type: SPWebPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlSnapshotSetting
Backs up the SharePoint Foundation content database by using SQL Server.
The type must be one of the following values: None or CreateNew.
Type: ContentDeploymentSqlSnapshotSetting
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPContentDeploymentPath
In ths Article

Sets properties of a content deployment path.

Syntax
Set-SPContentDeploymentPath [-Identity] <SPContentDeploymentPathPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Authentication <PathAuthenticationOption>]
[-CompressionEnabled] [-DeploySecurityInformation <SPIncludeSecurity>] [-DeployUserNamesEnabled]
[-Description <String>] [-DestinationCentralAdministrationURL <Uri>] [-EventReceiversEnabled]
[-KeepTemporaryFilesOptions <TemporaryFilesOption>] [-Name <String>] [-PathAccount <PSCredential>]
[-PathEnabled] [-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Set-SPContentDeploymentPath cmdlet sets the properties of a content deployment path for a content
deployment job.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Get-SPContentDeploymentPath "Path 1" | Set-SPContentDeploymentPath -PathEnabled:$false

This example sets the deployment path Path 1 to be disabled.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Authentication
Sets the Windows-based authentication type that the source front-end Web server uses to communicate with the
destination Web application.
The type must be one of the following values: WindowsAuth or BasicAuth.

Type: PathAuthenticationOption
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CompressionEnabled
Turns on compression during the export.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeploySecurityInformation
Specifies the user and group information to include during the export operation for this content deployment path.
The default value is All.
The type must be one of the following values: None, All, or WssOnly- Applies only SharePoint Foundation security
settings. Includes user memberships and role assignments such as default roles, for example, Web Designer or any
custom roles that extend from the default roles. The access control list (ACL ) for each object is migrated. No user
information defined in the DAP or LDAP servers is included.
Type: SPIncludeSecurity
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeployUserNamesEnabled
Specify to enable event receivers during import.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Sets the description for the content deployment path. The description can contain a maximum of 4096
alphanumeric characters.
The type must be a valid string.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DestinationCentralAdministrationURL
Specifies the SharePoint Central Administration URL for the destination farm.
The type must be a valid URL, in the form http://server_name.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EventReceiversEnabled
Turns on event receivers during import.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the content deployment path to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a content
deployment job (for example; DeployPath1); or an instance of a valid SPContentDeploymentPath object.

Type: SPContentDeploymentPathPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-KeepTemporaryFilesOptions
Specifies that temporary files are kept after content deployment is finished.
The type must be one of the following values: Never, Always, or OnFailure.

Type: TemporaryFilesOption
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the content deployment path.
The type must be a valid name of a content deployment path; for example, DeploymentPath1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PathAccount
Specifies the user ID that is an administrator on the Central Administration page on the destination farm.
The type must be a valid SharePoint user.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PathEnabled
Enables the content deployment path.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPCustomLayoutsPage
In ths Article

Maps a new path for a custom layout page.

Syntax
Set-SPCustomLayoutsPage -Identity <SPCustomPage> -RelativePath <String>
-WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [-CompatibilityLevel <Int32>] [<CommonParameters>]

Set-SPCustomLayoutsPage -Identity <SPCustomPage> [-Reset] -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [-CompatibilityLevel <Int32>]
[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPCustomLayoutsPage cmdlet maps a new path for a custom layouts page in a Web application. To remove
the mapping for a custom layouts page, use the Reset parameter instead of the RelativePath parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Set-SPCustomLayoutsPage -Identity AccessDenied -RelativePath "/_layouts/custompages/myaccessdenied.aspx" -


WebApplication "https://server_name/mywebapp"

This example maps the specified path for the AccessDenied layout page in the Web application
"https://server_name/mywebapp".

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of templates to use when creating a new SPSite object. This value sets the initial
CompatibilityLevel value for the site collection. When this parameter is not specified, the CompatibilityLevel will
default to the highest possible version for the web application depending on the CompatibilityRange setting.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the custom layout page to set.
The type must be one of the following: None, AccessDenied, Confirmation, Error, Login, RequestAccess, Signout, or
WebDeleted.

Type: SPCustomPage
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RelativePath
Specifies the path of the custom layout page.
The type must be a valid path of a layout page, in the form _layouts/custompages/myaccessdenied.aspx.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Reset
Resets the mapping of a custom layouts page.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the SharePoint Web application that contains the custom layout page.
The type must be a valid URL, in the form https://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of SharePoint Web application (for example, MyOfficeApp1); or an instance of
a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPDataConnectionFile
In ths Article

Sets properties of a data connection file.

Syntax
Set-SPDataConnectionFile [-Identity] <SPDataConnectionFilePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Category <String>] [-Confirm] [-Description <String>]
[-DisplayName <String>] [-WebAccessible <String>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPDataConnectionFile cmdlet sets the properties of the data connection file specified in the Identity
parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Set-SPDataConnectionFile -Identity "sample.udcx" -Category "Temp"

This example updates the Category of the specified .udcx file.


--------------EXAMPLE 2-----------------

Set-SPDataConnectionFile -Identity "sample.udcx" -DisplayName "NewDisplayName"

This example updates the DisplayName of the specified .udcx file.


--------------EXAMPLE 3-----------------

Sample.udcx" | Set-SPDataConnectionFile -Category "Temp"

This example updates the Category of the specified .udcx file.


--------------EXAMPLE 4-----------------

Get-SPDataConnectionFile | where {$_.Category -eq "Category1"} | Set-SPDataConnectionFile -Category


"Category2"

This example updates the Category field for the collection of .udcx files that are returned from a query used by the
Get-SPDataConnectionFile cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Category
Sets an arbitrary category on the file which can be used to group the files. The category name can have a
maximum of 255 characters.
The type must be a valid string value; for example, Category1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Sets the description for the data connection file. The name can be a maximum of 4096 alphanumeric characters.
The type must be a valid string; for example, Description of my universal data connection file.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies the display name that describes the data connection file. The name can have a maximum of 255
characters.
The type must be a valid string; for example, InfoPathUDC1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the data connection file to update.
The type must be a valid GUID, in form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data
connection file (for example, DataConnectionFileName1.udcx); or an instance of a valid SPDataConnectionFile
object.

Type: SPDataConnectionFilePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebAccessible
Specifies that the universal data connection file can be accessed by using the Web service. If false, only the forms
server can retrieve the universal data connection files internally. The default value is False.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPDefaultProfileConfig
In ths Article

Changes the MySitesPublicEnabled property of the User Profile Application Proxy.

Syntax
Set-SPDefaultProfileConfig [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-MySitesPublicEnabled <Boolean> -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind> [-WhatIf]
[<CommonParameters>]

Description
Use the Set-SPDefaultProfileConfig cmdlet to change the MySitesPublicEnabled property of a User Profile
Application Proxy from whatever was set at the time of Proxy creation to whatever is defined by using this cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
https://go.microsoft.com/fwlink/p/?LinkId=671715).

Examples
--------------------EXAMPLE---------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Set-SPDefaultProfileConfig $proxy -MySitesPublicEnabled $true

This example changes the MySitesPublicEnabled property of the specified user profile service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MySitesPublicEnabled
Enables or disables public MySites.
The valid values are $True or $False.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the proxy of the User Profile Service application that contains the site subscription to delete.The type
must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
application proxy (for example, UserProfileSvcProxy1); or an instance of a valid SPServiceApplicationProxy object.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPDesignerSettings
In ths Article

Sets SharePoint Designer features.

Syntax
Set-SPDesignerSettings [-WebApplication] <SPWebApplicationPipeBind> [-AllowDesigner <Boolean>]
[-AllowMasterPageEditing <Boolean>] [-AllowRevertFromTemplate <Boolean>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-ShowURLStructure <Boolean>] [-WhatIf]
[-AllowCreateDeclarativeWorkflow <Boolean>] [-AllowSaveDeclarativeWorkflowAsTemplate <Boolean>]
[-AllowSavePublishDeclarativeWorkflow <Boolean>] [-DesignerDownloadUrl <String>]
[-RequiredDesignerVersion <String>] [<CommonParameters>]

Description
The Set-SPDesignerSettings cmdlet sets SharePoint Designer features on a specified Web application when the
WebApplicaton is used.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE--------------------

Set-SPDesignerSettings -WebApplication https://contoso -AllowRevertFromTemplate $False -AllowMasterPageEditing


$False

This example disables the ability to detach pages from existing site definitions and to edit master pages and page
layouts.

Parameters
-AllowCreateDeclarativeWorkflow
Allows the creation of declarative workflows.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowDesigner
Specifies whether to allow users to edit sites in a web application by using SharePoint Designer. The default value
is True

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowMasterPageEditing
Specifies whether to allow site administrators to customize master pages and layout pages using SharePoint
Designer. The default value is True.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowRevertFromTemplate
Specifies whether to allow site administrators to detach pages from the original site definition using SharePoint
Designer. The default value is True.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowSaveDeclarativeWorkflowAsTemplate
Allows saving declarative workflows as a template.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowSavePublishDeclarativeWorkflow
Allows saving of published declarative workflows.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DesignerDownloadUrl
Sets the URL to the SharePoint Designer download. The default value is:
https://go.microsoft.com/fwlink/?LinkId=328584

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequiredDesignerVersion
Sets the required version of SharePoint Designer. The default value is
15.0.0.0

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowURLStructure
Specifies whether to allow site administrators to manage the URL structure of their Web sites by using SharePoint
Designer. The default value is True.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the Web application in which the settings will apply.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPDiagnosticConfig
In ths Article

Sets diagnostic configuration settings on the farm.

Syntax
Set-SPDiagnosticConfig [-AllowLegacyTraceProviders] [-AppAnalyticsAutomaticUploadEnabled]
[-AssignmentCollection <SPAssignmentCollection>] [-CustomerExperienceImprovementProgramEnabled]
[-DaysToKeepLogs <Int32>] [-DownloadErrorReportingUpdatesEnabled] [-ErrorReportingAutomaticUploadEnabled]
[-ErrorReportingEnabled] [-EventLogFloodProtectionEnabled] [-EventLogFloodProtectionNotifyInterval <Int32>]
[-EventLogFloodProtectionQuietPeriod <Int32>] [-EventLogFloodProtectionThreshold <Int32>]
[-EventLogFloodProtectionTriggerPeriod <Int32>] [-InputObject <PSObject>] [-LogCutInterval <Int32>]
[-LogDiskSpaceUsageGB <Int32>] [-LogLocation <String>] [-LogMaxDiskSpaceUsageEnabled]
[-ScriptErrorReportingDelay <Int32>] [-ScriptErrorReportingEnabled] [-ScriptErrorReportingRequireAuth]
[<CommonParameters>]

Description
Use the Set-SPDiagnosticConfig cmdlet to set diagnostic configuration settings on the entire farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Set-SPDiagnosticConfig -ErrorReportingEnabled -DownloadErrorReportingUpdatesEnabled:$false -DaysToKeepLog 60

This example enables ErrorReporting, disables DownloadErrorReportingUpdatesEnable and sets DaysToKeepLog


to 60.
------------------EXAMPLE 2-----------------------

$config = Get-SPDiagnosticConfig
$config.CustomerExperienceImprovementProgramEnabled = $false
$config.LogCutInterval = 60
$config | Set-SPDiagnosticConfig

This example disables CEIP and sets LogCutInterval to 60 minutes.

Parameters
-AllowLegacyTraceProviders
Specifies that trace providers built for previous versions of SharePoint Products and Technologies can write to the
trace session for SharePoint Products.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AppAnalyticsAutomaticUploadEnabled
Specifies whether aggregated app usage data is automatically uploaded to Microsoft.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CustomerExperienceImprovementProgramEnabled
Specifies whether participation in the Customer Experience Improvement Program (CEIP ) is enabled.
The CEIP is designed to improve the quality, reliability, and performance of Microsoft products and technologies.
With your permission, anonymous information about your server is sent to Microsoft to help improve SharePoint
Products.
The type must be either of the following values:
$True
$False
The default value is $True.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DaysToKeepLogs
Specifies the number of days to keep trace log files. The type must be a valid number between 1 and 366. The
default value is 14 days.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DownloadErrorReportingUpdatesEnabled
Specifies whether the error reporting remote control file is downloaded.
The type must be either of the following values:
$True
$False
The default value is $True.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ErrorReportingAutomaticUploadEnabled
Specifies whether error reports are uploaded to Microsoft automatically.
Error reports include the following: information regarding the condition of the server when a problem occurs; the
operating system version and computer hardware in use; and the digital product ID, which can be used to identify
your license. The IP address of your computer is also sent because you are connecting to an online service to send
error reports; however, the IP address is used only to generate aggregate statistics.
The type must be either of the following values:
$True
$False
The default value is $True.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ErrorReportingEnabled
Specifies whether collection of error reports is enabled.
Error reports are created when your system encounters hardware or software problems. Microsoft and its partners
actively use these reports to improve the reliability of the software. Error reports include the following: information
regarding the condition of the server when the problem occurs; the operating system version and computer
hardware in use; and the digital product ID, which can be used to identify your license. The IP address of your
computer is also sent because you are connecting to an online service to send error reports; however, the IP
address is used only to generate aggregate statistics.
The type must be either of the following values:
$True
$False
The default value is $True.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EventLogFloodProtectionEnabled
Specifies whether the Event log flood protection feature is enabled.
If multiple similar events are written to the event log, some duplicate messages are suppressed. Then, after a period
of time, a summary message is written that shows how many events were suppressed.
The type must be either of the following values:
$True
$False
The default value is $True.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EventLogFloodProtectionNotifyInterval
Specifies in minutes how often to write a summary event indicating how many events were suppressed due to
flood protection.
The integer range is between 1 and 1440. The default value is 5.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EventLogFloodProtectionQuietPeriod
Specifies in minutes how much time must pass without an event firing to exit flood protection.
The integer range is between 1 and 1440. The default value is 2.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EventLogFloodProtectionThreshold
Specifies the number of events allowed in a given timeframe before an event is considered to be flooding the event
log.
The integer range is between 1 and 100. The default value is 5.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-EventLogFloodProtectionTriggerPeriod
Specifies in minutes the timeframe to watch for events that may be flooding.
The integer range is between 1 and 1440. The default value is 2.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-InputObject
Use the result from the Get-SPDiagnosticConfig cmdlet, make modifications and then pipeline the object into
Set-SPDiagnosticConfig cmdlet to update the content database.
Type: PSObject
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LogCutInterval
Specifies the number of minutes between log file rollovers.
The value must be a valid integer between 0 and 1440.
The default value is 30.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LogDiskSpaceUsageGB
Specifies the maximum amount of storage to use for trace log files, in gigabytes (GB ).
The default value is 1000 and only takes effect when the LogMaxDiskSpaceusageEnabled cmdlet is set to True.
The type must be a valid number between 1 and 1000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LogLocation
Specifies the path of where to log files will reside.
The type must be a valid path, in the form C:\Logs.
The default location is %CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14\Logs.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LogMaxDiskSpaceUsageEnabled
Specifies whether to restrict the maximum space to use for trace log files.
The type must be either of the following values:
$True
$False
The default value is $False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ScriptErrorReportingDelay
Specifies the time (in minutes) between script error reports.
The type must be a valid integer between 0 and 1440. The value is specified in minutes.
The default value is 30.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ScriptErrorReportingEnabled
Specifies whether error reporting is enabled for client script errors.
The type must be either of the following values:
$True
$False
The default value is $True.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ScriptErrorReportingRequireAuth
Specifies whether script error reporting requires authentication.
The type must be either of the following values:
$True
$False
The default value is $True.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPDiagnosticsProvider
In ths Article

Enables a diagnostics provider and updates its retention policy.

Syntax
Set-SPDiagnosticsProvider [-Identity] <SPDiagnosticsProviderPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DaysRetained <Int32>] [-Enable] [-WhatIf]
[-MaxTotalSizeInBytes <Int64>] [<CommonParameters>]

Description
The Set-SPDiagnosticsProvider cmdlet enables a diagnostics provider and updates its retention policy.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Get-SPDiagnosticsProvider job-diagnostics-event-log-provider | Set-SPDiagnosticsProvider -Enable:$false


Get-SPDiagnosticsProvider job-diagnostics-event-log-provider

This example disables the event log diagnostics provider.


------------------EXAMPLE 2-----------------------

Get-SPDiagnosticsProvider job-diagnostics-event-log-provider | Set-SPDiagnosticsProvider -Enable -DaysRetained


10
Get-SPDiagnosticsProvider job-diagnostics-event-log-provider

This example enables the event log diagnostics provider and changes its retention policy to 10 days.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DaysRetained
Specifies the number of days to retain the data collected by a diagnostics provider.
The type must be a valid integer value in the range of 1 to 14.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Turns on or off the specified diagnostics provider.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the diagnostics provider to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
diagnostic provider (for example, DiagnosticProv1); or an instance of a valid SPDiagnosticsProvider object.
Type: SPDiagnosticsProviderPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MaxTotalSizeInBytes
The maximum size of the partition within the Usage database.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPDistributedCacheClientSetting
In ths Article

Sets distributed cache settings.

Syntax
Set-SPDistributedCacheClientSetting [-ContainerType] <SPDistributedCacheContainerType>
[-DistributedCacheClientSettings] <SPDistributedCacheClientSettings>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Set-SPDistributedCacheClientSettings cmdlet to set the distributed cache service based on usage. Usage
can be any type of cache that the ContainerType parameter specifies.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$settings = Get-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache


$settings.MaxConnectionsToServer = 10
Set-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache -DistributedCacheClientSettings
$settings

This example updates the MaxConnectionsToServer to 10 for DistributedLogonTokenCache.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ContainerType
Specifies the container type to clear.
The valid values are the following:
-DistributedDefaultCache
-DistributedAccessCache
-DistributedActivityFeedCache
-DistributedBouncerCache
-DistributedLogonTokenCache
-DistributedServerToAppServerAccessTokenCache
-DistributedSearchCache
-DistributedSecurityTrimmingCache
-DistributedActivityFeedLMTCache
-DistributedViewStateCache

Type: SPDistributedCacheContainerType
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DistributedCacheClientSettings
Updates the various cache client settings. It is recommended to use the default settings.

Type: SPDistributedCacheClientSettings
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Get-SPDistributedCacheClientSetting
minutes to read • Edit Online

Set-SPEduServiceSetting
In ths Article

Do not use

Syntax
Set-SPEduServiceSetting [[-Enabled] <Boolean>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-Service <Services> -Site <SPSitePipeBind> [-WhatIf] [<CommonParameters>]

Description
Do not use

Examples
--------------------EXAMPLE---------------------

Do not use

Parameters
-AssignmentCollection
Do not use

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enabled
Do not use
Type: Boolean
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Service
Do not use

Type: Services
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Do not use

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPSitePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPEnterpriseSearchAdministrationComponent
In ths Article

Sets properties of an administration component for a search service application.

Syntax
Set-SPEnterpriseSearchAdministrationComponent [[-Identity] <AdminComponentPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force]
[-SearchApplication <SearchServiceApplicationPipeBind>]
[-SearchServiceInstance <SearchServiceInstancePipeBind>] [-StoragePath <String>] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPEnterpriseSearchAdministrationComponent cmdlet updates properties of an
AdministrationComponent object for a search service application.
For permissions and the most current information about search cmdlets, see the online documentation,
https://go.microsoft.com/fwlink/?LinkId=163185.

Examples
--------------------EXAMPLE---------------------

$ssa = Get-SPEnterpriseSearchServiceApplication "Search Service Application"


$admin = Get-SPEnterpriseSearchAdministrationComponent -SearchApplication $ssa
$admin | Set-SPEnterpriseSearchAdministrationComponent -SearchServiceInstance SP02 -Force

This example moves the administration component to a different server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifies that the admin component must be moved to the new search service instance.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the administration component to update.
The type must be a valid name (GUID ), such as 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a
valid AdminComponent object.

Type: AdminComponentPipeBind
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the administration component.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SearchServiceInstance
Specifies the search service instance to host the administration component.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a search
server (for example, MyQueryServer); or an instance of a valid SearchServiceInstance object.

Type: SearchServiceInstancePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StoragePath
Specifies the path for storing data for the administration component. The path must contain a valid file share and
use valid registry characters.
The type must be a valid path in either of the following forms:
C:\folder_name
\\server_name\folder_name

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Office.Server.Search.Cmdlet.AdminComponentPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPEnterpriseSearchContentEnrichmentConfiguration
In ths Article

Stores the specified content enrichment configuration to the search service application.

Syntax
Set-SPEnterpriseSearchContentEnrichmentConfiguration
-ContentEnrichmentConfiguration <ContentEnrichmentConfigurationPipeBind>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet validates the ContentEntrichmentConfiguration object and stores the provided configuration in the
SearchServiceApplication. Both a ContentEnrichmentConfiguration and a SearchServiceApplication object have to
be provided.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1 ------------------

$config = New-SPEnterpriseSearchContentEnrichmentConfiguration
$config.Endpoint = "https://server/service"
$config.InputProperties = "Title", "Url"
$config.OutputProperties = "Title", "Url"
$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication $ssa -ContentEnrichmentConfiguration
$config

This example creates a new ContentEnrichmentConfiguration object. The URL of the external web service is stored
in the $config.Endpoint property. The new ContentEnrichmentConfiguration is configured to use Title and URL,
which are the managed properties that you want to send to the external web service. It is also configured to expect
the external web service to output the same managed properties. The SearchServiceApplication object is retrieved
and used for storing the newly created ContentEnrichmentConfiguration.
------------------EXAMPLE 2 ------------------
C:\PS>$config = New-SPEnterpriseSearchContentEnrichmentConfiguration
$config.Endpoint = "https://server/service"
$config.InputProperties = "Title"
$config.OutputProperties = "Title"
$config.Trigger = 'Contains(Title, "Example")'
$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SPEnterpriseSearchContentEnrichmentConfiguration -SearchApplication $ssa -ContentEnrichmentConfiguration
$config

This example creates a new ContentEnrichmentConfiguration object. The URL of the external web service is stored
in the $config.Endpoint property. The new ContentEnrichmentConfiguration is configured to use Title, which is the
managed property that you want to send to the external web service. It is also configured to expect the external
web service to output the same managed property. The $config.Trigger is set to only send the managed property
when the Boolean trigger expression is true, in this case when the managed property Title contains the string
"Example". The SearchServiceApplication object is retrieved, and used for storing the newly created
ContentEnrichmentConfiguration.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentEnrichmentConfiguration
Specifies the ContentEnrichmentConfiguration that should be stored in the SearchServiceApplication.
Type: ContentEnrichmentConfigurationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the SearchServiceApplication that contains the ContentEnrichmentConfiguration.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchContentEnrichmentConfiguration
New -SPEnterpriseSearchContentEnrichmentConfiguration
Remove-SPEnterpriseSearchContentEnrichmentConfiguration
minutes to read • Edit Online

Set-SPEnterpriseSearchCrawlContentSource
In ths Article

Sets the properties of a crawl content source for a Search service application.

Syntax
Set-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind>
[-AssignmentCollection <SPAssignmentCollection>]
[-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm]
[-CrawlPriority <CrawlPriority>] [-CrawlScheduleDaysOfMonth <Int32>]
[-CrawlScheduleMonthsOfYear <MonthsOfYear>] [-CrawlScheduleRepeatDuration <Int32>]
[-CrawlScheduleRepeatInterval <Int32>] [-CrawlScheduleStartDateTime <DateTime>] [-CustomProtocol <String>]
[-EnableContinuousCrawls <Boolean>] [-LOBSystemSet <String[]>] [-MaxPageEnumerationDepth <Int32>]
[-MaxSiteEnumerationDepth <Int32>] [-MonthlyCrawlSchedule] [-Name <String>]
[-ScheduleType <ContentSourceCrawlScheduleType>] [-SearchApplication <SearchServiceApplicationPipeBind>]
[-StartAddresses <String>] [-Tag <String>] [-WhatIf] [<CommonParameters>]

Set-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind>


[-AssignmentCollection <SPAssignmentCollection>]
[-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm]
[-CrawlPriority <CrawlPriority>] [-CrawlScheduleDaysOfWeek <DaysOfWeek>]
[-CrawlScheduleRepeatDuration <Int32>] [-CrawlScheduleRepeatInterval <Int32>]
[-CrawlScheduleRunEveryInterval <Int32>] [-CrawlScheduleStartDateTime <DateTime>] [-CustomProtocol <String>]
[-EnableContinuousCrawls <Boolean>] [-LOBSystemSet <String[]>] [-MaxPageEnumerationDepth <Int32>]
[-MaxSiteEnumerationDepth <Int32>] [-Name <String>] [-ScheduleType <ContentSourceCrawlScheduleType>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-StartAddresses <String>] [-Tag <String>]
[-WeeklyCrawlSchedule] [-WhatIf] [<CommonParameters>]

Set-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind>


[-AssignmentCollection <SPAssignmentCollection>]
[-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm]
[-CrawlPriority <CrawlPriority>] [-CrawlScheduleRepeatDuration <Int32>] [-CrawlScheduleRepeatInterval <Int32>]
[-CrawlScheduleRunEveryInterval <Int32>] [-CrawlScheduleStartDateTime <DateTime>] [-CustomProtocol <String>]
[-DailyCrawlSchedule] [-EnableContinuousCrawls <Boolean>] [-LOBSystemSet <String[]>]
[-MaxPageEnumerationDepth <Int32>] [-MaxSiteEnumerationDepth <Int32>] [-Name <String>]
-ScheduleType <ContentSourceCrawlScheduleType> [-SearchApplication <SearchServiceApplicationPipeBind>]
[-StartAddresses <String>] [-Tag <String>] [-WhatIf] [<CommonParameters>]

Set-SPEnterpriseSearchCrawlContentSource [-Identity] <ContentSourcePipeBind>


[-AssignmentCollection <SPAssignmentCollection>]
[-BDCApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm]
[-CrawlPriority <CrawlPriority>] [-CustomProtocol <String>] [-EnableContinuousCrawls <Boolean>]
[-LOBSystemSet <String[]>] [-MaxPageEnumerationDepth <Int32>] [-MaxSiteEnumerationDepth <Int32>]
[-Name <String>] [-RemoveCrawlSchedule] [-ScheduleType <ContentSourceCrawlScheduleType>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-StartAddresses <String>] [-Tag <String>] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPEnterpriseSearchCrawlContentSource cmdlet updates the rules of a crawl content source when the search
functionality is initially configured and after any new content source is added. This cmdlet is called once to set the
incremental crawl schedule for a content source and it is called again to set a full crawl schedule.
The value of the optional EnableContinuousCrawls parameter can be True or False. A value of True enables
continuous crawls of items in this content source. This causes the search system to automatically start incremental
crawls to process the latest changes to items in the corresponding data repositories. This helps to keep the index
fresh for items in this content source. Search service application administrators can still configure full crawls as
needed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$cs = Get-SPEnterpriseSearchCrawlContentSource -Identity 'Local SharePoint Sites' -SearchApplication $ssa
$cs | Set-SPEnterpriseSearchCrawlContentSource -ScheduleType Full -DailyCrawlSchedule -
CrawlScheduleRunEveryInterval 30
$cs | Set-SPEnterpriseSearchCrawlContentSource -ScheduleType Incremental -DailyCrawlSchedule -
CrawlScheduleRepeatInterval 60 -CrawlScheduleRepeatDuration 1440

This example returns the "Local SharePoint Sites" content source and creates a schedule to run a full crawl every
30 days and an incremental crawl every hour every day.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BDCApplicationProxyGroup
Specifies the proxy to use for a business type content source. This proxy group must contain a default Business
Data Connectivity Metadata Store proxy.
Type: SPServiceApplicationProxyGroupPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlPriority
Specifies the priority of this content source.
The type must be one of the following integers: 1= Normal, 2=High.

Type: CrawlPriority
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlScheduleDaysOfMonth
Specifies the days on which to crawl when the MonthlyCrawlSchedule parameter is set.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlScheduleDaysOfWeek
Specifies the days on which to crawl when the WeeklyCrawlSchedule parameter is set.

Type: DaysOfWeek
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlScheduleMonthsOfYear
Specifies the months on which to crawl when the MonthlyCrawlSchedule parameter is set.
Type: MonthsOfYear
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlScheduleRepeatDuration
Specifies the number of times to repeat the crawl schedule.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlScheduleRepeatInterval
Specifies the number of minutes between each repeat interval for the crawl schedule

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlScheduleRunEveryInterval
Specifies the interval between crawls.
When the DailyCrawlSchedule parameter is set, specifies the number of days between crawls.
When the WeeklyCrawlSchedule parameter is set, specifies the number of weeks between crawls.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlScheduleStartDateTime
Specifies the initial date of the crawl. The default value is midnight on the current day.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CustomProtocol
Specifies the custom protocol, handled by the custom connector, to use for this content source.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DailyCrawlSchedule
Base schedule on days between crawls.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableContinuousCrawls
Specifies the value of the EnableContinuousCrawls parameter: True or False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the crawl content source to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
ContentSource object (for example, ContentSource1); or an instance of a valid ContentSource object.

Type: ContentSourcePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LOBSystemSet
Specifies a comma-separated list of Business Data Connectivity Metadata Store system names and system instance
names for a business type content source.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxPageEnumerationDepth
Specifies, for a web or custom type content source, the number of page hops that the crawler can make from the
start address to a content item.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxSiteEnumerationDepth
Specifies, for a web or custom type content source, the number of site hops that the crawler can take from the start
address to a content item.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MonthlyCrawlSchedule
Base the schedule on months between crawls.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the new display name for the content source.
The type must be a valid name of a content source; for example, ContentSource1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveCrawlSchedule
Deletes the specified crawl.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScheduleType
Specifies the type of crawl schedule.
The type must be one of the following values: Full or Incremental.

Type: ContentSourceCrawlScheduleType
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the content source.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartAddresses
Specifies the comma-separated list of URLs at which to start a crawl for this content source.
The type must be a valid URL, in the form https://server_name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tag
Specifies the URL for the page to modify the settings for a custom content source. The string that specifies the URL
can contain a maximum of 1,024 characters.
The type must be a valid URL, in the form https://server_name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WeeklyCrawlSchedule
Base the schedule on weeks between crawls.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Office.Server.Search.Cmdlet.ContentSourcePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPEnterpriseSearchCrawlDatabase
In ths Article

Sets properties of a crawl database for a Search service application.

Syntax
Set-SPEnterpriseSearchCrawlDatabase [-Identity] <CrawlStorePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-FailoverDatabaseServer <String>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [-DatabaseName <String>]
[-DatabasePassword <SecureString>] [-DatabaseServer <String>] [-DatabaseUsername <String>]
[<CommonParameters>]

Description
The Set-SPEnterpriseSearchCrawlDatabase cmdlet sets properties of a specified crawl database for a Search service
application. A crawl database stores crawl history for a Search service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SPEnterpriseSearchCrawlDatabase -Identity SearchApp_CrawlStore -SearchApplication $ssa -
FailoverDatabaseServer \\failoverServer

This example sets the failover database server for the crawl database, SearchApp_CrawlStore, to the
\\failoverServer server.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database to create for the crawl database. The type must be a valid name of a SQL Server
database; for example, CrawlStoreDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password for the Microsoft SQL Server database server.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName. The type must be a valid SQL
Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the account name on the Database Server.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the server to be used for failover when SQL Server mirroring is used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the crawl database to modify.
A valid crawl database name, in the form CrawlStore1; or a valid GUID, such as 12345678-90ab-cdef-1234-
567890bcdefgh; or an instance of a valid CrawlStore object.

Type: CrawlStorePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the name of the search application to which the crawl database applies.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchCrawlLogReadPermission
In ths Article

Grants users permission to view the crawl log information.

Syntax
Set-SPEnterpriseSearchCrawlLogReadPermission [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Identity <CrawlLogReadPermissionPipeBind>] [-SearchApplication <SearchServiceApplicationPipeBind>]
[-Tenant <Guid>] [-UserNames <String>] [-WhatIf] [<CommonParameters>]

Description
Only the Search Service Application administrator can use this cmdlet.
The administrator uses the Set-SPEnterpriseSearchCrawlLogReadPermission cmdlet to grant users permission to view
crawl log information. The administrator can choose to restrict the permission to crawl log information from a
particular tenant.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$crawlLogPermission = Get-SPEnterpriseSearchCrawlLogReadPermission -SearchApplication $ssa -Tenant "00000000-
0000-0000-0000-000000000001"
Set-SPEnterpriseSearchCrawlLogReadPermission -Identity $crawlLogPermission -SearchApplication $ssa -UserNames
"user1;user2" -Tenant "00000000-0000-0000-0000-000000000001"

This example first defines $crawlLogPermission, which is the list of users who have permission to view the crawl
log information from the tenant with id "00000000-0000-0000-0000-000000000001" on the search application
referenced by $ssa. Then the example uses the Set-SPEnterpriseSearchCrawlLogReadPermission cmdlet to add user1
and user2 to the list of users referenced by $crawlLogPermission.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the crawl log permissions list to which users should be added.

Type: CrawlLogReadPermissionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the crawl log. The type must be a valid GUID, of the form 12345678-
90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a
valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Tenant
Specifies that the users shall be added to the crawl log permissions list within the scope of this tenant only. The
type must be a valid GUID of the form 12345678-90ab-cdef-1234-567890bcdefgh.
Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserNames
Specifies the user names that shall be granted permission to view the crawl log information Use
"domain\username" or "username". When adding several user names, separate names with semi-colons.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchCrawlLogReadPermission
Remove-SPEnterpriseSearchCrawlLogReadPermission
minutes to read • Edit Online

Set-SPEnterpriseSearchCrawlRule
In ths Article

Sets properties for a crawl rule.

Syntax
Set-SPEnterpriseSearchCrawlRule [-AccountName <String>] [-AccountPassword <SecureString>]
[-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationType <CrawlRuleAuthenticationType>]
[-Confirm] [-ContentClass <String>] [-CrawlAsHttp <Boolean>] [-FollowComplexUrls <Boolean>]
-Identity <CrawlRulePipeBind> [-IsAdvancedRegularExpression <Boolean>] [-PluggableSecurityTimmerId <Int32>]
[-Priority <Int32>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-SuppressIndexing <Boolean>]
[-Type <CrawlRuleType>] [-WhatIf] [<CommonParameters>]

Description
A search administrator runs the Set-SPEnterpriseSearchCrawlRule cmdlet at initial search configuration or any other
time, to set or update various attributes of a crawl rule.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$crawlRule = Get-SPEnterpriseSearchCrawlRule -Identity 'file://fileserver/root' -SearchApplication $ssa
Set-SPEnterpriseSearchCrawlRule -Identity $crawlRule -Type "ExclusionRule"

This example sets the type of the crawl rule pertaining to the URL, file://fileserver/root, to exclude this path from
future crawls.

Parameters
-AccountName
Specifies the name of the account to be used to crawl content identified by the crawl rule.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AccountPassword
Specifies the password for AccountName.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationType
Specifies one of the following authentication types:
BasicAccountRuleAccess -Specifies basic authentication.
CertificateRuleAccess -Specifies the X.509 certificate name.
NTLMAccountRuleAccess -Specifies the account name for integrated authentication.

Type: CrawlRuleAuthenticationType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentClass
Specifies a string that is sent to the protocol handler for any content that matches the crawl rule.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawlAsHttp
Specifies whether the crawler crawls content from a hierarchical content source as HTTP content.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FollowComplexUrls
Specifies whether the index engine crawls content from URLs that contain a question mark (?).

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the crawl rule.
The type must be a valid crawl rule URL, such as https://server_name, or an instance of a valid CrawlRule object.

Type: CrawlRulePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsAdvancedRegularExpression
Specifies whether the rule has full regular expression syntax.
The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PluggableSecurityTimmerId
Specifies the ID of the custom pluggable security trimmer to use, if registered.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Priority
Defines where in the list of crawl rules this crawl rule is to be applied.
The priority value cannot be less than 0 or greater than or equal to the number of crawl rules for the search
application.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
The name of the search application that is associated with the crawl rule to be modified.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SuppressIndexing
Specifies whether the crawler excludes the content of items, to which this rule applies, from the content index.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the type of crawl rule. A value of zero (0) includes the rule and a value of 1 excludes the rule.
Type: CrawlRuleType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchFileFormatState
In ths Article

Sets the activation state of a parser for a given file format.

Syntax
Set-SPEnterpriseSearchFileFormatState [-Identity] <DocumentParserFileFormatStatePipeBind> [-Enable] <Boolean>
-SearchApplication <SearchServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [-UseIFilter <Boolean>] [<CommonParameters>]

Description
The Set-SPEnterpriseSearchFileFormatState cmdlet sets the activation state of the parser that corresponds to the
specified file format. By default, the initial activation state of all file formats is $TRUE (enabled). Use this cmdlet to
temporarily disable a malfunctioning parser. The system will only consider the change after a restart of the content
processing components.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SPEnterpriseSearchFileFormatState -SearchApplication $ssa -Identity PDF -Enable $false

This example uses the Set-SPEnterpriseSearchFileFormatState cmdlet to disable the parser for the file format
"PDF".

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Specifies the activation state of the parser that corresponds to the specified file format. The activation state can be
$FALSE (disabled) or $TRUE (enabled).

Type: Boolean
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identification of the format to be disabled or enabled.

Type: DocumentParserFileFormatStatePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the name of the search application. The type must be a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseIFilter
Specifies use of a third-party iFilter when parsing the file format. UseIFilter can be $false (built-in format handler is
used) or $TRUE (third-party iFilter is used). $false is the default value.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchFileFormat
Get-SPEnterpriseSearchFileFormat
Remove-SPEnterpriseSearchFileFormat
minutes to read • Edit Online

Set-SPEnterpriseSearchLinguisticComponentsStatus
In ths Article

Sets the operation status of the linguistic query and document processing components.

Syntax
Set-SPEnterpriseSearchLinguisticComponentsStatus [-AllEnabled <Boolean>]
[-AssignmentCollection <SPAssignmentCollection>] [-EntityExtractionEnabled <Boolean>]
[-Identity <LinguisticComponentsStatusPipeBind>] [-QuerySpellingEnabled <Boolean>]
-SearchApplication <SearchServiceApplicationPipeBind> [-StemmingEnabled <Boolean>]
[-ThesaurusEnabled <Boolean>] [<CommonParameters>]

Description
This cmdlet sets the operational status of the linguistic query and document processing components.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SpEnterpriseSearchLinguisticComponentsStatus -SearchApplication $ssa -StemmingEnabled $false

This example shows how to disable stemming during query processing by setting the parameter
StemmingEnabled to false.
------------------EXAMPLE 2-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SpEnterpriseSearchLinguisticComponentsStatus -SearchApplication $ssa -AllEnabled $false

This example shows how to disable all linguistic query and document processing functionalities.

Parameters
-AllEnabled
A Boolean value to enable or deactivate all linguistic functionalities.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-EntityExtractionEnabled
A Boolean value to enable or deactivate the company extractor and all custom extractors during document
processing.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
An object that represents the current status of the linguistic components.

Type: LinguisticComponentsStatusPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-QuerySpellingEnabled
A Boolean value to enable or deactivate query spelling correction.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the linguistic processing components.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StemmingEnabled
A Boolean value to enable or deactivate expansive stemming during query processing.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ThesaurusEnabled
A Boolean value to enable or deactivate thesaurus lookup during query processing.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchLinguisticComponentsStatus
minutes to read • Edit Online

Set-SPEnterpriseSearchLinksDatabase
In ths Article

Sets properties of a links database for a search service application.

Syntax
Set-SPEnterpriseSearchLinksDatabase [-Identity] <LinksStorePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseName <String>]
[-DatabasePassword <SecureString>] [-DatabaseServer <String>] [-DatabaseUsername <String>]
[-FailoverDatabaseServer <String>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPEnterpriseSearchLinksDatabase cmdlet sets properties of a specified links database for a search service
application. A links database stores query logging and analytics information.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$ssa = Get-SPEnterpriseSearchServiceApplication mySearchServiceApp


Set-SPEnterpriseSearchLinksDatabase -Identity SearchApp_LinksStore -SearchApplication $ssa -
FailoverDatabaseServer \\failoverServer

This example sets the failover database server to \\failoverServer for the links database SearchApp_LinksStore in
the search service application mySearchServiceApp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the links database name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password of the account to connect to the database.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the server to use for the host SQL database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the name of the account to connect to the database.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the server to use for failover when using SQL Server mirroring.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the links database to modify. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-
567890bcdefgh; a valid name of a LinksStore object, in the form LinksStore1; or an instance of a valid LinksStore
object.

Type: LinksStorePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the links database. The type must be a valid GUID, in the form
12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an
instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchLinksDatabase
Get-SPEnterpriseSearchLinksDatabase
Remove-SPEnterpriseSearchLinksDatabase
Move-SPEnterpriseSearchLinksDatabases
minutes to read • Edit Online

Set-SPEnterpriseSearchMetadataCategory
In ths Article

Sets properties of a crawled property category.

Syntax
Set-SPEnterpriseSearchMetadataCategory [-AssignmentCollection <SPAssignmentCollection>]
[-AutoCreateNewManagedProperties <Boolean>] [-Confirm] [-DiscoverNewProperties <Boolean>]
-Identity <CategoryPipeBind> [-MapToContents <Boolean>] [-Name <String>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet updates properties of a crawled property category when the search functionality is configured for the
first time and after a new crawled property category is discovered during a crawl.
SPEnterpriseSearchMetadataCategory represents a category in the enterprise search metadata property schema.
Note that a category may represent multiple propsets. Changes to the category will overwrite all propsets.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SPEnterpriseSearchMetadataCategory -Identity People -SearchApplication $ssa -DiscoverNewProperties $false -
MapToContents $false

This example sets both DiscoverNewProperties and MapToContents properties to False for the People category for
the default search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AutoCreateNewManagedProperties
Specifies that when a new crawled property in this category is found, a corresponding managed property is
created and mapped to this new crawled property.
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DiscoverNewProperties
Specifies that if there are unknown properties in this category, these new properties are discovered during a crawl.
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the metadata category to update.
The type must be a valid name of a metadata category, for example, MetadataCategory1, or an instance of a valid
Category object.
Type: CategoryPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MapToContents
Specifies that all crawled properties of type string are mapped to corresponding managed properties of this
category.
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the enterprise search metadata category.
The type must be a valid name of a metadata category, for example MetadataCategory1.
Note: Null indicates that the value is unchanged.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the enterprise search metadata categories.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchMetadataCrawledProperty
In ths Article

Sets the properties of a metadata crawled property.

Syntax
Set-SPEnterpriseSearchMetadataCrawledProperty [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-Identity <CrawledPropertyPipeBind> -IsMappedToContents <Boolean> [-WhatIf] [<CommonParameters>]

Description
This cmdlet updates properties of a crawled property when the search functionality is configured for the first time
and after any new crawled property is added to create the rules for the crawled property.
SPEnterpriseSearchMetadataCrawledProperty represents a crawled property in the enterprise search metadata
property schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$crawlprop = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name MyCrawlProp
Set-SPEnterpriseSearchMetadataCrawledProperty -Identity $crawlprop -IsMappedToContent $true

This example sets the IsMappedToContent parameter of the crawled property MyCrawlProp to false (see the
example for the New-SPEnterpriseSearchMetadataCrawledProperty command) for the default search service
application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the crawled property to update.
The type must be an instance of a valid CrawledProperty object.

Type: CrawledPropertyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsMappedToContents
Specifies that the crawled property is mapped to managed properties. Specify true to map a crawled property to a
managed property.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchMetadataManagedProperty
In ths Article

Sets the properties of a metadata managed property.

Syntax
Set-SPEnterpriseSearchMetadataManagedProperty [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DefaultForQueryIndependentRank <UInt32>] [-Description <String>] [-EnabledForQueryIndependentRank <Boolean>]
[-EnabledForScoping <Boolean>] [-FullTextQueriable <Boolean>] -Identity <ManagedPropertyPipeBind>
[-IncludeInAlertSignature <Boolean>] [-IncludeInMd5 <Boolean>] [-Name <String>] [-NameNormalized <Boolean>]
[-NoWordBreaker <Boolean>] [-RemoveDuplicates <Boolean>] [-RespectPriority <Boolean>] [-Retrievable <Boolean>]
[-SafeForAnonymous <Boolean>] [-SearchApplication <SearchServiceApplicationPipeBind>] [-SiteCollection <Guid>]
[-Tenant <Guid>] [-UserFlags <Int16>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet updates the properties of a managed property. It is typically used to change the name or description of
a managed property. SPEnterpriseSearchMetadataManagedProperty represents a managed property in the
enterprise search metadata property schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $ssa -Identity UserName -EnabledForScoping
$true

This example sets the EnabledForScoping property to true for the managed property named UserName in the
default search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultForQueryIndependentRank
Specifies that the managed property is mandatory when it is used in query-independent rank (relevance).
Note: Null indicates that the value is unchanged.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Adds a description to the metadata managed property.
The type must be a valid string.
Note: Null indicates that the value is unchanged.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForQueryIndependentRank
Specifies that the managed property is mandatory when it is used in the custom ranking model for the query-
independent work of ranking.
The type must be one of the following query-independent ranking features in the custom model XML:
queryIndependentFeature
categoryFeature
languageFeature
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnabledForScoping
Specifies that the managed property can be used in a scope definition.
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FullTextQueriable
Specifies that the managed property can be used in enterprise search SQL queries.
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the managed property to update.
The type must be a valid name of a managed property, for example, ManagedProperty1, or an instance of a valid
ManagedProperty object

Type: ManagedPropertyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncludeInAlertSignature
Specifies whether this managed property should be included in alert signature.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IncludeInMd5
Specifies that the managed property is included in the hash used by the crawler to determine whether a document
has changed.
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a name for the managed property.
The type must be a valid managed property name, for example ManagedProperty1.
Note: Null indicates that the value is unchanged.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NameNormalized
Specifies if the values of the managed property should be normalized, that is, enable to return results independent
of letter casing and diacritics used in the query. If value is set to true, the values are normalized.
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoWordBreaker
Specifies that the values for this managed property are processed by a word breaker.
Note: Null indicates that the value is unchanged.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveDuplicates
Specifies that duplicate values for the managed property are removed.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RespectPriority
Specifies that when a mapped crawled property contains multiple values and RespectPriority is set to true, only the
first mapped crawled property is copied. Otherwise, all mapped crawled properties that have a value are copied.
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Retrievable
Specifies whether the values for this managed property are retrievable or not.
Note: Null indicates that the value is unchanged.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SafeForAnonymous
Specifies whether it is acceptable to display the contents of the property in search results for anonymous searches.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the managed property collection.
The type must be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollection
Specifies that the managed properties returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
Specifies that the managed properties returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserFlags
Reserved for future use.
Note: Null indicates that the value is unchanged.

Type: Int16
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchMetadataMapping
In ths Article

Sets the properties of a managed property mapping for a search service application.

Syntax
Set-SPEnterpriseSearchMetadataMapping [-Identity] <MappingPipeBind>
[-SearchApplication <SearchServiceApplicationPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-CrawledProperty <CrawledPropertyPipeBind>] [-ManagedProperty <ManagedPropertyPipeBind>]
[-SiteCollection <Guid>] [-Tenant <Guid>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet updates properties of a managed property mapping. SPEnterpriseSearchMetadataMapping represents
a mapping between a managed property and one or more crawled properties in the enterprise search metadata
property schema.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
## get the crawl property to set to, in this case a new property is created
$cat = Get-SPEnterpriseSearchMetadataCategory -SearchApplication $ssa -Identity People
$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Category $cat -Limit 1
$ncp = New-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name "MyNewCrawlProp" -PropSet
$cp.PropSet -Category $cp.CategoryName -IsNameEnum $false -VariantType $cp.VariantType -IsMappedToContents
$true
## get the mapping to replace
$mycp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $ssa -Name MyCrawlProp
$map = Get-SPEnterpriseSearchMetadataMapping -SearchApplication $ssa -ManagedProperty $mp -CrawledProperty
$mycp
## set the new crawl property to map to for this mapping
Set-SPEnterpriseSearchMetadataMapping -Identity $map -SearchApplication $ssa -CrawledProperty $ncp

This example updates an existing mapping between the managed property UserName and the crawled property
MyCrawlProp (see New-SPEnterpriseSearchMetadataMapping ) for the default search service application. The crawled
property is replaced with a new crawled property named MyNewCrawlProp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrawledProperty
Specifies the crawled property to map.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid URL in the form
https://server_name, or an instance of a valid CrawledProperty object.
Note: Null indicates that the value is unchanged.

Type: CrawledPropertyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the metadata mapping to update.
The type must be a valid URL, in the form https://server_name, or an instance of a valid Mapping object.

Type: MappingPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ManagedProperty
Specifies the managed property to receive the crawled property mapping.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid name of a
managed property, for example, ManagedProperty1, or an instance of a valid ManagedProperty object.
Note: Null indicates that the value is unchanged.

Type: ManagedPropertyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the metadata mapping.
The type be a valid search application name, for example, SearchApp1, or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollection
Specifies that the metadata mappings returned are to be within the scope of a site collection (SPSite).
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tenant
Specifies that the metadata mappings returned are to be within the scope of a tenant.
The type must be a valid GUID that specifies the property set in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchPrimaryHostController
In ths Article

Sets the primary search host controller for the farm.

Syntax
Set-SPEnterpriseSearchPrimaryHostController [-SearchServiceInstance] <SearchServiceInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
This cmdlet sets the primary SearchHostController for the farm to the defined SearchHostController.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$si = Get-SPEnterpriseSearchServiceInstance -Local


Set-SPEnterpriseSearchPrimaryHostController $si

This example sets the local SearchHostController instance as the new primary SearchHostController. It is up to the
user to select the HostController with latest version available.
If you choose a SearchHostController that is not running the latest version of the repository, you will have to
confirm before you continue.
------------------EXAMPLE 2------------------

$si = Get-SPEnterpriseSearchServiceInstance -Local


Set-SPEnterpriseSearchPrimaryHostController $si -Force

This example sets the local SearchHostController instance as the new primary SearchHostController.
If you choose a SearchHostController that is not running the latest version of the repository, you will not get a
confirmation message before you continue.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Force the change of the primary SearcHostController. No confirmation messages are asked, even if user tries to set
primary to a SearchHostController not running the latest version of the repository.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchServiceInstance
SearchServiceInstance of the server from where the SearchHostController object is returned.

Type: SearchServiceInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchQueryAuthority
In ths Article

Sets the properties of an authoritative page for a shared search application.

Syntax
Set-SPEnterpriseSearchQueryAuthority [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
-Identity <AuthorityPagePipeBind> [-Level <Single>] -Owner <SearchObjectOwner>
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPEnterpriseSearchQueryAuthority cmdlet updates properties of an authoritative page and adjusts the
query rank of an authoritative page. SPEnterpriseSearchQueryAuthority represents authoritative sites that rank
higher in relevance than demoted sites, which are de-emphasized in relevance.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Set-SPEnterpriseSearchQueryAuthority -Identity https://contoso.com -Level 0.5 -SearchApplication MySSA

This example adjusts the authoritative level of the URL https://contoso.com to 0.5 on the search service application
named MySSA.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the query authority page to update.
The type must be a valid URL, in the form https://server_name; or an instance of a valid AuthorityPage object.

Type: AuthorityPagePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Level
Specifies the level of the new authoritative page. Authoritative pages, designated by the service application
administrator, are expert pages that link to the most relevant information. Because a search service application can
have several designated authoritative pages, you use the Level property to specify the value of a specific page. This
parameter sets the level for the most valuable authoritative pages to 0.
The type must be one of the following floating-point numbers: 0, 1, or 2.

Type: Single
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding Query Authority is created.
The owner must be one of the following valid levels:- Search Service Application- Site Subscription
Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the authority page collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchQueryKeyword
In ths Article

Sets the properties of a keyword term for a shared search application.

Syntax
Set-SPEnterpriseSearchQueryKeyword [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Contact <String>] [-Definition <String>] [-EndDate <DateTime>] -Identity <KeywordPipeBind>
[-ReviewDate <DateTime>] -Site <SPSitePipeBind> [-StartDate <DateTime>] [-Term <String>] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPEnterpriseSearchQueryKeyword cmdlet updates properties and rules of a keyword term. A query keyword
is a query component of a query topology. SPEnterpriseSearchQueryKeyword represents relevance setting
through keywords.
You can use this cmdlet for keywords in site collections that are in SharePoint Server mode.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPEnterpriseSearchQueryKeyword -Identity Engineering -Site https://myserver/sites/engineering | Set-


SPEnterpriseSearchQueryKeyword -StartDate "12/25/2009" -EndDate "12/24/2010" -Site
https://myserver/sites/engineering

This example gets a reference to the keyword with the term Engineering from the site
https://myserver/sites/engineering and sets the start dates and end dates for the keyword.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Contact
Specifies the user name associated with the new keyword.
The type must be a valid user name; for example, KeywordUser1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Definition
Specifies the definition of the new keyword term.
The type must be a valid string; for example, a keyword term definition.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndDate
Specifies the expiration date of the keyword term. The default value is MaxDate.
The type must be a valid DateTime type, in the form 2010,12,05.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
Specifies the keyword term to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid string that contains
a keyword term (for example, KeywordTerm1); or an instance of a valid Keyword object.

Type: KeywordPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ReviewDate
Specifies the review date of the keyword term. The default value is MaxDate.
The type must be a valid DateTime type, in the form 2010,12,05.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Associates the new keyword term to the specified results URL.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate
Specifies the activation date for the keyword term. The default value is the current date.
The type must be a valid date, in the form 2010,12,05.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Term
Specifies the keyword term that triggers keyword results.
The type must be a valid string; for example, a keyword term.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchQueryScope
In ths Article

Sets the properties of a query results scope for a shared search application.

Syntax
Set-SPEnterpriseSearchQueryScope -AlternateResultsPage <String>
[-AssignmentCollection <SPAssignmentCollection>] [-CompilationType <Int32>] [-Confirm] [-Description <String>]
[-DisplayInAdminUI <Boolean>] -Identity <ScopePipeBind> [-Name <String>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-Url <Uri>] [-WhatIf] [<CommonParameters>]

Description
After you upgrade a Search service application to SharePoint Server, you can view shared scopes, but you cannot
create, update, or delete them. Therefore, you cannot use this cmdlet for shared scopes after upgrade. However,
you can convert shared scopes to result sources, which serve a similar purpose. Similarly, after you upgrade to
Sharepoint Server Site Collection to SharePoint Server mode, you can view local scopes, but you cannot create,
update, or delete them. Therefore, you cannot use this cmdlet for local scopes after you upgrade a site collection.
However, you can convert local scopes to result sources, which serve a similar purpose.
The Set-SPEnterpriseSearchQueryScope cmdlet updates properties of a shared scope.
SPEnterpriseSearchQueryScope represents a query results scope used by all shared search applications on the
farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPenterpriseSearchServiceApplication
Get-SPEnterpriseSearchQueryScope -Identity MustCrawl -SearchApplication $ssa | Set-SPEnterpriseSearchQueryScope
-Description "Business critical sites to index" -CompilationType 1 -AlternateResultsPage https://altServer

This example obtains a reference to the scope named MustCrawl on the search service application named MySSA
and changes the description, compilation type and alternate access URL.

Parameters
-AlternateResultsPage
Specifies the location to display results for the new query scope.
The type must be a valid URL, in the form https://server_name.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompilationType
Specifies the compilation type of the new scope. The value 0 specifies the conditionally compiled scope type, and
the value 1 specifies the always compiled scope type.
The type must be either of the following: 0 or 1.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Adds a description of the new query scope.
The type must be a valid string; for example, a description of a query scope.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayInAdminUI
Specifies that the new scope is displayed in the administration application user interface (UI). The default setting is
to hide the new scope in the administration application UI.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity of the scope to create.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a scope
(for example, Scope1); or an instance of a valid Scope object.

Type: ScopePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies a name for the query scope.
The type must be a valid name of a query scope; for example, QueryScope1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the query scope collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.
Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Filters to delete scopes for the specified results URL.
The type must be a valid URL, in the form https://server_name.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchQueryScopeRule
In ths Article

Sets the properties of a shared scope rule for a query scope.

Syntax
Set-SPEnterpriseSearchQueryScopeRule [-Identity] <ScopeRulePipeBind> -Url <Uri>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-FilterBehavior <String>]
[-ManagedPropertyName <String>] [-MatchingString <String>] [-PropertyValue <String>] [-Scope <ScopePipeBind>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-UrlScopeRuleType <String>] [-WhatIf]
[<CommonParameters>]

Description
After you upgrade a Search service application SharePoint Server, you can view shared scopes, but you cannot
create, update, or delete them. Therefore, you cannot use this cmdlet for shared scopes after upgrade. However,
you can convert shared scopes to result sources, which serve a similar purpose. Similarly, after you upgrade a
SharePoint Server site collection to SharePoint Server mode, you can view local scopes, but you cannot create,
update, or delete them. Therefore, you cannot use this cmdlet for local scopes after you upgrade a site collection.
However, you can convert local scopes to result sources, which serve a similar purpose.
The Set-SPEnterpriseSearchQueryScopeRule cmdlet updates the properties of a query scope.
SPEnterpriseSearchQueryScopeRule represents a query results scope rule that can be applied to a scope.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$scope = Get-SPEnterpriseSearchQueryScope -Identity MustCrawl -SearchApplication $ssa
Get-SPEnterpriseSearchQueryScopeRule -Scope $scope -Url https://criticalSite | Set-
SPEnterpriseSearchQueryScopeRule -Url https://criticalSite -UrlScopeRuleType Url

This example gets a reference to a scope rule for the URL https://criticalSite and sets its rule type to Url.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilterBehavior
Specifies the type of scope rule to create for the query scope.
The type must be one of the following values: Exclude, Include, or Require.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the scope rule to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a scope
rule (for example, ScopeRule1); or an instance a valid ScopeRule object.

Type: ScopeRulePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ManagedPropertyName
Specifies the name of the managed property to use for the PropertyQuery scope rule.
The type must be a valid name of a managed property; for example, ManagedProp1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MatchingString
Specifies the string to use when matching the URL rule type.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertyValue
Specifies the property value to use when matching the PropertyQuery rule type.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scope
Applies the query scope rule to the specified scope.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a scope
(for example, Scope1); or an instance of a valid Scope object.

Type: ScopePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the query scope rule collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Url
Specifies the results URL that is associated with the query scope rule.
The type must be a valid URL, in the form https://server_name.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UrlScopeRuleType
Specifies the value to use when matching the URL rule type.
The type must be one of the following values: Folder, HostName, or Domain.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchQuerySpellingCorrection
In ths Article

Sets the operation status of the Query Spelling Corrections (QSC ) component.

Syntax
Set-SPEnterpriseSearchQuerySpellingCorrection [-AssignmentCollection <SPAssignmentCollection>]
[-ContentAlignmentEnabled <Boolean>] [-DiacriticsInSuggestionsEnabled <Boolean>]
[-Identity <QuerySpellingCorrectionPipeBind>] [-MaxDictionarySize <Int32>] [-MaxProcessingTime <TimeSpan>]
-SearchApplication <SearchServiceApplicationPipeBind> [-SecurityTrimmingEnabled <Boolean>]
[-SpellingDictionary <SpellingDictionaryType>] [-TermFrequencyThreshold <Int32>] [<CommonParameters>]

Description
This cmdlet provides access to the configuration options for the QSC component. The two most prominent
configuration options are the switch to enable the content-alignment process and the selection of dictionaries to be
used for query spelling correction, that is the set of fixed dictionaries per language or the dynamic dictionary that is
being produced by the content alignment process.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------

$ssa = Get-SPEnterpriseSearchServiceApplication
Set-SpEnterpriseSEarchQuerySpellingCorrection -SearchApplication $ssa -SpellingDictionary dynamic

This example sets the dictionary named dynamic to be used for query spelling correction for the default search
service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ContentAlignmentEnabled
A Boolean value to enable or deactivate the content alignment process.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DiacriticsInSuggestionsEnabled
A switch to enable or disable spelling suggestions that contain diacritics (for example, German umlaut umlaut). The
default setting is true.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies an object that represents the current status for the query spelling correction.

Type: QuerySpellingCorrectionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MaxDictionarySize
Specifies the maximal number of terms in a content-aligned spelling dictionary. In a multi-tenant environment, this
number is valid per tenant.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxProcessingTime
Specifies the maximum runtime for compiling a content-aligned spelling dictionary. The default value is 6 hours.
Type: TimeSpan
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search service application that contains the QSC components.

Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecurityTrimmingEnabled
A Boolean value to enable or deactivate the security check for spelling suggestions. If enabled, only spelling
suggestions that deliver at least one document for the current user are shown.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SpellingDictionary
Specifies the dictionary to be used for query spelling correction. The two available values are dynamic and static.
When value is set to dynamic, the query spelling correction uses the content-aligned dictionary. When value is set
to static, the query spelling correction uses the out of the box static spelling dictionaries.

Type: SpellingDictionaryType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TermFrequencyThreshold
Specifies the minimum number of documents that must contain the most frequently used term in the document
collection for the content-alignment process to be executed. In a multi-tenant environment, this number is valid per
tenant.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchRankingModel
In ths Article

Sets the properties of a ranking model for a shared search service application.

Syntax
Set-SPEnterpriseSearchRankingModel [-Identity] <RankingModelPipeBind> -Owner <SearchObjectOwner>
-RankingModelXML <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet updates properties of a ranking model for a search service application. The name, description, and
identifier (ID ) for a ranking model are contained in the .xml file specified in RankingModelXML. If the Identity
parameter is not specified or the identity does not match any of the ranking models in the collection, an exception
is thrown and the default ranking model is used.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$owner = Get-SPEnterpriseSearchOwner -Level ssa
$rankingModel = Get-SPEnterpriseSearchRankingModel -Identity 8f6fd0bc-06f9-43cf-bbab-08c377e083f4 -
SearchApplication $ssa -Owner $owner
$newrankmodel = Get-Content .\newRankModel.xml
$newrankmodel = [String]$newrankmodel
Set-SPEnterpriseSearchRankingModel -Identity $rankingModel -SearchApplication $ssa -Owner $owner -
RankingModelXML $newrankmodel

This example reconfigures the ranking model with the identity 8f6fd0bc-06f9-43cf-bbab-08c377e083f4 with the
new ranking model specified in newRankModel.xml.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the ranking model to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, or an instance of a valid
RankingModel object.

Type: RankingModelPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Owner
Specifies the scope where the ranking model is available. The available scopes are: SSA, Tenant, Site Collection or
Site. A ranking model can be available in multiple scopes.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RankingModelXML
Specifies the name of the XML representation of the new ranking model.
Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application that contains the ranking model.
The type must be a valid GUID in the 9bf36458-fc99-4f7b-b060-867e5a63adce, a valid search application name
(for example, SearchApp1), or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchResultItemType
In ths Article

Sets properties of a result item type.

Syntax
Set-SPEnterpriseSearchResultItemType [-Identity] <ResultItemTypePipeBind> -Owner <SearchObjectOwner>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DisplayProperties <String>]
[-DisplayTemplateUrl <String>] [-Name <String>] [-OptimizeForFrequentUse <Boolean>] [-RulePriority <Int32>]
[-Rules <PropertyRuleCollection>] [-SearchApplication <SearchServiceApplicationPipeBind>]
[-SearchApplicationProxy <SearchServiceApplicationProxyPipeBind>] [-SourceID <Guid>] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPEnterpriseSearchResultItemType cmdlet sets properties of user-created result item types. You cannot use
this cmdlet to set or change properties of the built-in result item types that are included with SharePoint products.
Result item types enable you to change the look of search results based on the type of result. You start by defining
a collection of rules, which will be evaluated against the properties of results. Then you define the display template
to use for rendering that type of result. Once you have created the result item type, results matching the rules of
the result item type will render using the specified display template.
Example use cases:
Change the look of results for a particular file name extension, for example Word documents.
Change the look of a particular content type in search results.
Change the look of results from a particular author.
Add a result action to results from a particular result source as part of a custom search application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------
$web = Get-SPWeb https://webUrl
$tenantOwner = Get-SPEnterpriseSearchOwner -Level SPSite -SPWeb $web
$ssa = Get-SPEnterpriseSearchServiceApplication
$resultType = Get-SPEnterpriseSearchResultItemType -Owner $tenantOwner -SearchApplication $ssa
$resultType.BuiltIn
$rule = Get-SPEnterpriseSearchPropertyRule -PropertyName "ContentTypeId" -Operator "StartsWith"
$rule.AddValue('0x010063C2F478ACC511DFB869B5BFDFD720851252')
$ruleCollection = Get-SPEnterpriseSearchPropertyRuleCollection
$ruleCollection.Add($rule)
$displayProperties =
"WorkId,Rank,Title,Size,Path,Description,SiteName,HitHighlightedSummary,HitHighlightedProperties,ViewsLifeTime"
$displaytemplateUrl = "~sitecollection/_catalogs/masterpage/Display
Templates/Search/Item_MyCustomDisplayTemplate.js"
Set-SPEnterpriseSearchResultItemType
-Identity $resultType `
-SearchApplication $ssa `
-Name "CustomResultType" `
-Rules $ruleCollection `
-RulePriority 1
-DisplayProperties $displayProperties `
-DisplayTemplateUrl $displaytemplateUrl `
-Owner $tenantOwner

This example first defines variables for the URL of the site, the search owner and search application. It retrieves the
result item type and checks whether the result item type is a built-in result item type. If $resultType.BuiltIn returns
false then the result item type is not built-in and you can set its properties by using the
Set-SPEnterpriseSearchResultItemType .

Next, the example creates the rule that result item types shall be matched against and adds it to a property rule
collection.
Next, the example defines which properties of the result item type that shall be displayed and the display template
to use.
Finally, the example uses the Set-SPEnterpriseSearchResultItemType cmdlet to modify the result item type.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayProperties
Specifies which result properties to display.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayTemplateUrl
Specifies the URL of the display template that shall be used for rendering the results.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the result item type to update. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-
567890bcdefgh.

Type: ResultItemTypePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of the result item type.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OptimizeForFrequentUse
{{ Fill OptimizeForFrequentUse Description }}
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the result item type was created.

Type: SearchObjectOwner
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RulePriority
Specifies which priority the collection of rules has compared to other rules.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Rules
Specifies the collection of rules to evaluate the result properties against.

Type: PropertyRuleCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the name of the search application. The type must be a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid
SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplicationProxy
Specifies the proxy of the search application that contains the result item type. The type must be a valid GUID, in
the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application proxy name (for example,
SearchAppProxy1); or an instance of a valid SearchServiceApplicationProxy object.

Type: SearchServiceApplicationProxyPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SourceID
Identifies the search result source that the result item type applies to.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchResultItemType
Get-SPEnterpriseSearchResultItemType
Remove-SPEnterpriseSearchResultItemType
Get-SPEnterpriseSearchOwner
Get-SPEnterpriseSearchPropertyRule
Get-SPEnterpriseSearchPropertyRuleCollection
minutes to read • Edit Online

Set-SPEnterpriseSearchResultSource
In ths Article

Sets properties of a result source.

Syntax
Set-SPEnterpriseSearchResultSource [-AssignmentCollection <SPAssignmentCollection>]
[-AuthenticationType <FederationAuthType>] [-AutoDiscover <Boolean>] [-Confirm] [-Description <String>]
-Identity <ResultSourcePipeBind> [-MakeDefault <Boolean>] [-Name <String>] [-Owner <SearchObjectOwner>]
[-Password <String>] [-ProviderId <Guid>] [-QueryTemplate <String>] [-RemoteUrl <String>]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-SsoId <String>] [-UserName <String>] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet updates properties of a user-created result source. This cmdlet supports the same update operations
as are supported through the "Manage Result Sources" page in Central Administration. The result source cannot
be a built-in source (a built-in source has the BuiltIn property set to true) for any update operation other than
changing the default result source using the MakeDefault parameter. For permissions and the most current
information about Windows PowerShell for SharePoint Products, see the online documentation at SharePoint
Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$owner = Get-SPEnterpriseSearchOwner -Level SSA
$customResultSource = New-SPEnterpriseSearchResultSource -SearchApplication $ssa -Owner $owner -ProviderId
fa947043-6046-4f97-9714-40d4c113963d -Name "Custom SharePoint Result Source"
Set-SPEnterpriseSearchResultSource -Identity $customResultSource -Name "Basic SharePoint Result Source"

This example updates the name of the result source and the identity of the result source is specified as a result
source instance. SearchApplication and Owner are not required for this update operation.
--------------------EXAMPLE 2---------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$owner = Get-SPEnterpriseSearchOwner -Level SSA
$customResultSource = New-SPEnterpriseSearchResultSource -SearchApplication $ssa -Owner $owner -ProviderId
fa947043-6046-4f97-9714-40d4c113963d -Name "Custom SharePoint Result Source"
Set-SPEnterpriseSearchResultSource -SearchApplication $ssa -Owner $owner -Identity "Custom SharePoint Result
Source" -Description "A custom SharePoint Result Source for demonstration purposes"

This example updates the description of the result source and the identity of the result source is specified by name.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationType
Specifies an authentication type for the result source. If parameter is not specified, the value is unchanged.
A specific set of authentication types are supported for each search provider type and if parameter is not specified,
the authentication type will default based on search provider type.
This cmdlet supports the following set of authentication mechanisms and corresponding types: Default SharePoint
Authentication (FederationAuthType.LocalNTAuth), Basic Authentication
(FederationAuthType.SingleAccountBasicAuth - specify UserName and Password), Default Remote SharePoint
Authentication (FederationAuthType.PerUserBasicAuth), Single Sign On (FederationAuthType.SSO - requires
SsoId to be specified), Anonymous (FederationAuthType.Anonymous), Digest Authentication
(FederationAuthType.SingleAccountDigest - specify UserName and Password), NTLM Application Pool Identity
(FederationAuthType.ApplicationPoolIdentity), NTLM User Name and Password
(FederationAuthType.SingleAccountNTLM - specify UserName and Password).

When using a Local SharePoint Search/Local SharePoint People Search provider, then
FederationAuthType.LocalNTAuth (default) and FederationAuthType.SingleAccountBasicAuth are supported.
When using a Remote SharePoint Search/Remote SharePoint People Search provider, then
FederationAuthType.PerUserBasicAuth (default) and FederationAuthType.SSO are supported.
When using OpenSearch 1.0/1.1 search provider, then the following authentication types are supported:
FederationAuthType.Anonymous (default), FederationAuthType.SingleAccountBasicAuth,
FederationAuthType.SingleAccountDigest, FederationAuthType.SingleAccountNTLM, and
FederationAuthType.ApplicationPoolIdentity.
All authentication types are listed in the enum FederationAuthType.

Type: FederationAuthType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AutoDiscover
Specifies whether to use automatic discovery of the Exchange server endpoint for the result source.
Setting value to true ($true) states that automatic discovery should be used.
If parameter is not specified, the value is unchanged.
Only applicable when using an Exchange search provider.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the result source.
If parameter is not specified, the value is unchanged.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the result source to update.
The type must be a valid GUID string, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
result source (for example, "Custom SharePoint Result Source"); or an instance of a valid Source object.

Type: ResultSourcePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MakeDefault
Specifies whether the result source should be set as default result source or not, for the scope specified by the
Owner parameter.
If parameter is not specified, the default result source will not change.
Setting value to true ($true) states that the result source should be set as default.
Setting value to false ($false) states that the result source should not be set as default and in this case, if the result
source to update is currently the default, the original default result source ("Local SharePoint Results") will be set as
default again.
Tip: Use instance, not name or GUID string Id, as Identity when using Makedefault, to clearly specify that Owner is
only to be used for specifying the level where the result source should be set as default (if value is true) or where
the default should be reset to original (if value is false).

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies a name for the result source.
If parameter is not specified, the value is unchanged.
Names must be unique at each administrative level.
For example, two result sources in a site cannot share a name, but one in a site and one provided by the site
collection can.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Owner
Specifies the search object owner that defines the scope at which the corresponding result source is available.

Type: SearchObjectOwner
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password of the user credentials to use to connect to the result source.
If parameter is not specified, the value is unchanged.
Used when authentication type (AuthenticationType) is set to a type that consumes user credentials
(FederationAuthType.SingleAccountBasicAuth, FederationAuthType.SingleAccountDigest or
FederationAuthType.SingleAccountNTLM ).
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProviderId
Specifies a search provider to be used by the result source.
If parameter is not specified, the value is unchanged.
Is specified as a Guid or GUID string, which must be one of the following: FA947043-6046-4F97-9714-
40D4C113963D (Local SharePoint Search), E4BCC058-F133-4425-8FFC -1D70596FFD33 (Local SharePoint
People Search), 1E0C8601-2E5D -4CCB -9561-53743B5DBDE7 (Remote SharePoint Search), E377CAAA-FCAF -
4a1b-B7A1-E69A506A07AA (Remote SharePoint People Search), 3A17E140-1574-4093-BAD6-E19CDF1C0122
(Exchange Search), 3A17E140-1574-4093-BAD6-E19CDF1C0121 (OpenSearch 1.0/1.1).

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueryTemplate
Specifies the query transformation template of the result source.
If parameter is not specified, the value is unchanged.
Incoming queries are changed according to the template, to use this new query text instead. Include the incoming
query in the new text by using the query variable "{searchTerms}". Use this to scope results.
For example, to only return OneNote items, set the new text to "{searchTerms} fileextension=one". Then, an
incoming query "sharepoint" becomes "sharepoint fileextension=one". Default value is {searchTerms}.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoteUrl
Specifies a connection URL template for the result source.
If parameter is not specified, the value is unchanged.
Must be set when using a search provider that consumes it: Remote SharePoint Search, Remote SharePoint People
Search, OpenSearch 1.0/1.1, and Exchange (if AutoDiscover is not turned on).
When using other search providers the parameter is ignored.
For Remote SharePoint Search/Remote SharePoint People Search, specify the address of the root site collection of
the remote SharePoint farm.
For OpenSearch 1.0/1.1, specify the URL of the OpenSearch source.
Include the query in the URL by using the query variable "{searchTerms}", which will be automatically replaced
with the query. For Exchange, specify the Exchange EWS URL from which to retrieve results.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchApplication
Specifies the search application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SsoId
Specifies the reverse proxy certificate Secure Store Id to use to connect to the result source.
If parameter is not specified, the value is unchanged.
Must be specified if authentication type (AUthenticationType) is set to FederationAuthType.SSO (Single Sign On).
If you are connecting to your intranet through a reverse proxy, enter the SSO Id of the Single Sign On entry which
stores the certificate used to authenticate against the reverse proxy.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserName
Specifies the user name of the user credentials to use to connect to the result source.
If parameter is not specified, the value is unchanged.
Used when authentication type (AuthenticationType) is set to a type that consumes user credentials
(FederationAuthType.SingleAccountBasicAuth, FederationAuthType.SingleAccountDigest or
FederationAuthType.SingleAccountNTLM ).
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPEnterpriseSearchResultSource
Get-SPEnterpriseSearchResultSource
Remove-SPEnterpriseSearchResultSource
Get-SPEnterpriseSearchOwner
minutes to read • Edit Online

Set-SPEnterpriseSearchService
In ths Article

Sets the properties of a search service for a farm.

Syntax
Set-SPEnterpriseSearchService [[-Identity] <SearchServicePipeBind>] [-AcknowledgementTimeout <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-ConnectionTimeout <String>]
[-ContactEmail <String>] [-IgnoreSSLWarnings <String>] [-InternetIdentity <String>]
[-PerformanceLevel <String>] [-ProxyType <String>] [-ServiceAccount <String>]
[-ServicePassword <SecureString>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet updates properties of a search service for a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$password = Read-Host -AsSecureString


Set-SPEnterpriseSearchService -IgnoreSSLWarnings $true -ServiceAccount 'contoso\adminAccount' -ServicePassword
$password

This example configures the search service to ignore SSL warnings and changes the service account for the search
service.

Parameters
-AcknowledgementTimeout
Specifies the time in seconds that the search server will wait for request acknowledgement while connecting to
other services.
The type must be string input that can be parsed to an integer value.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionTimeout
Specifies the time in seconds that the search server waits while connecting to other services.
The type must be string input that can be parsed to an integer value.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContactEmail
Specifies an e-mail address to which external site administrators can write if problems occur when the site is being
crawled.
The type must be a valid e-mail address, in the form MyAddress@mycompany.com.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
Specifies the search service to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchService1); or an instance of a valid SearchService object.

Type: SearchServicePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IgnoreSSLWarnings
Specifies that the search service will ignore Secure Sockets Layer (SSL ) certificate name warnings. The default
value is False.
The type must be a string that can be cast to a Boolean value, for example, True or False.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InternetIdentity
Specifies the value that the crawler sends in the headers of its HTTP requests to sites when it fetches their pages.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PerformanceLevel
Specifies the relative number of threads for the crawl component performance. The type must be one of the
following values: Reduced, PartlyReduced, or Maximum. The default value is Maximum.
Reduced: Total number of threads = number of processors, Max Threads/host = number of processors. Threads
are assigned Below Normal priority.
Partly Reduced: Total number of threads = 16 times the number of processors , Max Threads/host = 8 plus the
number of processors. Threads are assigned Below Normal priority.
Maximum: Total number of threads = 32 times the number of processors, Max Threads/host = 8 plus the
number of processors. Threads are assigned Normal priority.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxyType
Specifies whether the search service uses a proxy server or connects directly when crawling content. The default
value is Direct, (No proxy server is used).
The type must be one of the following values: Direct or Proxy.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceAccount
Specifies the user account or service account to use for running the Office Server Search service. When this
parameter is used, the ServicePassword parameter must also be specified.
The type must be a valid account name on the domain, in the form Domain\user name or user name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServicePassword
Specifies the password for the service account specified in ServiceAccount.
The type must contain the domain password to the account specified in the ServiceAccount parameter.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchServiceApplication
In ths Article

Sets the properties of a search service application for a farm.

Syntax
Set-SPEnterpriseSearchServiceApplication [-AdminApplicationPool <SPIisWebServiceApplicationPoolPipeBind>]
[-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DatabaseName <String>] [-DatabasePassword <SecureString>] [-DatabaseServer <String>]
[-DatabaseUsername <String>] [-DefaultContentAccessAccountName <String>]
[-DefaultContentAccessAccountPassword <SecureString>] [-DefaultSearchProvider <SearchProvider>]
[-DiacriticSensitive <String>] [-FailoverDatabaseServer <String>] -Identity <SearchServiceApplicationPipeBind>
[-VerboseQueryMonitoring <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet updates properties of a search service application. SPEnterpriseSearchServiceApplication represents a
self-contained aggregation of indexed content and properties available for search and provides an anchor class for
setting global search properties. A search application can include multiple search service applications.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Set-SPEnterpriseSearchServiceApplication -Identity "Search Service Application" -VerboseQueryMonitoring True

This example turns on verbose query logging in the default search service application named Search Service
Application.

Parameters
-AdminApplicationPool
Specifies the application pool for the administrative web service for the search service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AdminAppPool1); or an instance of a valid IISWebServiceApplicationPool object.
Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies an application pool for the search service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPool1); or an instance of a valid IISWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
This parameter is obsolete and has no function. You should not use this parameter.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password for the user ID that is used for accessing the web service administration database on SQL
Server.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the web service administration database.
The type must be a valid SQL Server host name, for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the user ID to use for accessing the web service administration database.
The type must be a valid user name, for example, WebAdminUserDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultContentAccessAccountName
Specifies the account ID to use for accessing content.
The type must be a valid user name, for example, ContentAccessUser1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DefaultContentAccessAccountPassword
Specifies the password for the content access account.
The type must be a valid password.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultSearchProvider
Specifies the search application type to be used for this application. This parameter has been deprecated for
SharePoint Server.

Type: SearchProvider
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DiacriticSensitive
Specifies that the search application respects diacritics (for example, ä). The default value is false.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host SQL instance for the failover database server.
The type must be a valid SQL Server instance name, for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search service application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a search
service application (for example, MySearchApp); or an instance of a valid SearchServiceApplication object.
Type: SearchServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-VerboseQueryMonitoring
Enables verbose query logging. The default value is False.
The type must be a string that can be cast to a Boolean value, for example, True or False.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchServiceApplicationProxy
In ths Article

Sets properties of a search service application proxy.

Syntax
Set-SPEnterpriseSearchServiceApplicationProxy [-Identity] <SearchServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Name <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet updates properties of a site administration service application proxy for a search application.
SPEnterpriseSearchServiceApplicationProxy represents the proxy for search site administration functionality. One
search service application proxy exists for each search application on a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPEnterpriseSearchServiceApplicationProxy -Identity SsaProxy | Set-


SPEnterpriseSearchServiceApplicationProxy -Name ContosoSearchProxy

This example sets the display name of a search service application proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specified the search service application proxy to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a search
service application proxy (for example, SearchServiceAppProxy1); or an instance of a valid
SearchServiceApplicationProxy object.

Type: SearchServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the display name of the search application proxy to retrieve.
The type must be a valid string, for example, SearchAppProxy1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPEnterpriseSearchServiceInstance
In ths Article

Sets the properties of a search service instance.

Syntax
Set-SPEnterpriseSearchServiceInstance [-Identity] <SearchServiceInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultIndexLocation <String>] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet updates properties of the search service instance for a farm.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
[https://go.microsoft.com/fwlink/p/?LinkId=671715](https://go.microsoft.com/fwlink/p/?LinkId=671715).

Examples
--------------------EXAMPLE---------------------

$si = Get-SPEnterpriseSearchServiceInstance -Local


Set-SPEnterpriseSearchServiceInstance -Identity $si -DefaultIndexLocation F:\SearchIndex

Sets the default index location to F:\SearchIndex.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultIndexLocation

NOTE
On SharePoint Server 2013 and SharePoint Server 2016, SharePoint Server 2019 this parameter is obsolete and has no
function. You should not use this parameter.

Specifies the default path to use for creating an index of content.


The type must be a valid path in either of the following forms:
C:\folder_name
\\server_name\folder_name

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search service instance to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a query
server (for example, MyQueryServer); or an instance of a valid SearchServiceInstance object.

Type: SearchServiceInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Office.Server.Search.Cmdlet.SearchServiceInstancePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPEnterpriseSearchTopology
In ths Article

Activates a given search topology.

Syntax
Set-SPEnterpriseSearchTopology [-Identity] <SearchTopologyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SearchApplication <SearchServiceApplicationPipeBind>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet enables the search topology with the given identity, marking the currently active search topology as
inactive.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Identity 10fa59cb-4b32-4fe6-8f8d-
065388df201e
Set-SPEnterpriseSearchTopology -Identity $topology -SearchApplication $ssa

This example enables a search topology with the Identity 10fa59cb-4b32-4fe6-8f8d-065388df201e.


------------------EXAMPLE 2------------------

$ssa = Get-SPEnterpriseSearchServiceApplication
$topology = Get-SPEnterpriseSearchTopology -SearchApplication $ssa | ?{$_.State -eq 'Inactive'}
Set-SPEnterpriseSearchTopology -Identity $topology -SearchApplication $ssa

This example retreives an inactive topology and sets it to the active topology.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search topology to enable.

Type: SearchTopologyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SearchApplication
Specifies the search application to which the search topology will belong.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPEnterpriseSearchTopology
New -SPEnterpriseSearchTopology
Remove-SPEnterpriseSearchTopology
minutes to read • Edit Online

Set-SPExcelBIServer
In ths Article

Specifies a description for an existing BI server for Excel Services.

Syntax
Set-SPExcelBIServer [-Identity] <SPExcelBIServerPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Description <String>] -ExcelServiceApplication <SPExcelServiceApplicationPipeBind>
[-ServerId <String>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPExcelBIServer cmdlet to specify a description for an existing BI server for Excel Services.

Examples
--------------------EXAMPLE---------------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Excel Services Application Web Service Application'}
Set-SPExcelBIServer -Identity "ExcelServices" -ExcelServiceApplication $sa

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the Analysis server.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelFileLocation list
object.The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
Excel Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a
valid SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the ExcelServiceApplication identity.

Type: SPExcelBIServerPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServerId
The name of the Analysis Services server.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.Office.Excel.Server.Cmdlet.SPExcelBIServerPipeBind
Microsoft.Office.Excel.Server.Cmdlet.SPExcelServiceApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPExcelDataConnectionLibrary
In ths Article

Sets properties of a data connection library for Excel Services Application.

Syntax
Set-SPExcelDataConnectionLibrary [-Identity] <SPExcelDCLPipeBind>
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-Address <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPExcelDataConnectionLibrary cmdlet sets the properties of a library from which Excel Services Application
loads data connection files. Excel Services Application loads data connection files only if they are stored in a data
connection library that is on the list of trusted data connection libraries. Data connection libraries constitute a kind
of list that contains data connection files. These files contain everything that Excel Services Application and the
Excel client require to connect to an external data source. Data connection libraries enable you to reuse and share
data connections. Data connections can be loaded by using information from the workbook file. However, using a
data connection library to load data connections provides an additional layer for data connections so that they can
be managed separately from workbooks.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------------

Get-SPExcelServiceApplication -Identity "MyExcelService" | Get-SPExcelDataConnectionLibrary | where {$_.address


-eq "https://portal/site/salesDCL" } | Set-SPExcelDataConnectionLibrary -Description "This is the DCL where all
the connections to the sales data are stored

This example sets a display description for the entry https://portal/site/salesDCL in the list of trusted data
connection libraries (DCLs) that is on the Excel Services Application Web service application named
MyExcelService.
--------------EXAMPLE 2--------------

Get-SPExcelServiceApplication -Identity "MyExcelService" | Get-SPExcelDataConnectionLibrary | where {$_.address


-eq "https://portal/site/salesDCL" } | Set-SPExcelDataConnectionLibrary -Address "https://portal/site/salesDCL

This example updates the address of the data connection library for the entry https://portal/test/site/salesDCL to
https://portal/site/salesDCL in the list of trusted data connection libraries, which is on the Excel Services
Application Web service application named MyExcelService.
Parameters
-Address
Specifies the address of the data connection library. The address must be unique in the list of trusted data
connection libraries.
The type must be a valid URL, in the form https://server_name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a friendly description for the data connection library.
The type must a valid a string; for example, "This is the data connection library where all the connections to the
sales data are stored".
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains SPExcelDataConnectionLibrary list
object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the DataConnectionLibrary object to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data
connection library (for example, DataConnectionLib1); a valid URL, in the form https://server_name; or an instance
of a valid SPExcelDCL object.

Type: SPExcelDCLPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPExcelDataProvider
In ths Article

Sets properties of a safe data provider for Excel Services Application.

Syntax
Set-SPExcelDataProvider [-Identity] <SPExcelDataProviderPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>] [-ProviderId <String>]
[-ProviderType <DataProviderType>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPExcelDataProvider cmdlet sets the properties of a data provider that is stored in the list of safe data
providers. Excel Services Application refreshes external data connections only if the data provider for that
connection is in the list of safe data providers. Excel Services Application include a set of common data providers in
this list. Therefore, using cmdlets to modify safe data providers is typically an operation of custom data connection
scenarios.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$provider = Get-SPExcelServiceApplication -Identity "MyExcelService" | Get-SPExcelDataProvider | where


{$_.ProviderID -eq "SQLOLEDB" }
Set-SPExcelDataProvider $provider -Description "The SQLOLEDB provider description has changed."
$provider | format-table

This example retrieves the SQLOLEDB data provider from the list of safe data providers that is on the Excel
Services Application Web service application named MyExcelService, as an object, adds a new display description
and then displays the provider output in a Command Prompt window, formatted as a table.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a display description for the data provider.
The type must a valid a string; for example, this is a custom OLEDB provider.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SPExcelDataProvider object to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, or an instance of a valid
SPExcelDataProvider object.

Type: SPExcelDataProviderPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProviderId
Specifies the name of the data provider. This ID should be present in the connection strings generated by this data
provider and the ID must be unique for the data provider type.
The type must a valid name of a provider; for example, CustomOLEDB.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProviderType
Specifies the supported type of the data provider to set.
The type must be one of the following: OleDb, Odbc, or OdbcDsn.

Type: DataProviderType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPExcelFileLocation
In ths Article

Sets properties of a trusted file location for Excel Services Application.

Syntax
Set-SPExcelFileLocation [-Identity] <SPExcelFileLocationPipeBind>
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-AbortOnRefreshOnOpenFail] [-Address <String>]
[-AssignmentCollection <SPAssignmentCollection>] [-AutomaticVolatileFunctionCacheLifetime <Int32>]
[-ChartAndImageSizeMax <Int32>] [-ConcurrentDataRequestsPerSessionMax <Int32>] [-Confirm]
[-DefaultWorkbookCalcMode <DefaultWorkbookCalcMode>] [-Description <String>] [-DisplayGranularExtDataErrors]
[-ExternalDataAllowed <AllowExternalData>] [-IncludeChildren] [-LocationType <LocationType>]
[-ManualExtDataCacheLifetime <Int32>] [-NewWorkbookSessionTimeout <Int32>]
[-PeriodicExtDataCacheLifetime <Int32>] [-RequestDurationMax <Int32>] [-RESTExternalDataAllowed]
[-SessionTimeout <Int32>] [-ShortSessionTimeout <Int32>] [-UdfsAllowed] [-WarnOnDataRefresh] [-WhatIf]
[-WorkbookSizeMax <Int32>] [-ChartRenderDurationMax <Int32>] [<CommonParameters>]

Description
The Set-SPExcelFileLocation cmdlet sets properties of a location from which Excel Services Application loads
workbooks. Excel Services Application loads only workbooks that are stored in a trusted file location. Properties of
trusted file locations control how workbooks can be used when they are loaded on Excel Services Application. Excel
Services Application always enforces the properties that are defined by the trusted file location from which a
workbook was loaded. The properties that are used by the trusted file location are determined by comparison of
the file path for the workbook with the Address parameter of the trusted file location.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------------

Get-SPExcelFileLocation -ExcelServiceApplication "My Excel Service" | where { $_.externaldataallowed -eq


"DclAndEmbedded"} | Set-SPExcelFileLocation -ExernalDataAllowed Dcl

This example gets every trusted file location for the Excel Services Application Web service application named My
Excel Service that allows data connections to load from workbook files and specifies that the locations must use a
data connection library to load data connections.
--------------EXAMPLE 2--------------

Get-SPExcelServiceApplication | Get-SPExcelFileLocation | where {$_.Address -eq "https://"} | Set-


SPExcelFileLocation -Description "This is the default trusted file location for Excel Services Application. It
allows any file from anywhere in SharePoint to load."
This example changes the description of the default file location for every Excel Services Application Web service
application in the farm.

Parameters
-AbortOnRefreshOnOpenFail
Specifies that the load of a Excel Services Application file automatically fails if an automatic data refresh operation
fails when the file is opened. The load is failed only if the following conditions are true:
-- User has read-only permissions to the Excel Services Application file. -- Workbook file has data connections that
refresh automatically when the Excel file is opened.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Address
System.String
Specifies a Web folder, or file directory from which Excel Services Application can load workbooks.
The type must be a valid URL, in the form https://myPortal/myTeam; or a valid UNC path in form,
\\server_name\folder_name

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AutomaticVolatileFunctionCacheLifetime
Specifies the maximum time, in seconds, that a computed value for a volatile function is cached for automatic
recalculations. Valid values include:
-1, calculate once when the workbook loads
0, always calculate
1 to 2073600, cache 1 second to 24 days
The type must be the integers -1 or 0, or an integer value in the range of 1 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ChartAndImageSizeMax
Specifies the maximum size, in megabytes, of a chart or image that can be opened. The default value is 1.
The type must be a valid integer greater than 0.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ChartRenderDurationMax
The maximum time (in seconds) spent rendering any single chart.
Valid values: -1 (no limit); from 1 through 2073600 (24 days).

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConcurrentDataRequestsPerSessionMax
Specifies the maximum number of concurrent external data requests allowed in each session. If a session must
issue more than this number of requests, additional requests must be queued. The scope of this setting is the
logical server. The default value is 5.
The type must be a positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultWorkbookCalcMode
Specifies the calculation mode of workbooks. All of the settings except the File setting override the workbook
settings. If this parameter is changed, it is applied to all new sessions on Excel Services Application when the
ConfigDB properties cache is refreshed. The default setting is File.
The type must be one of the following: File, Manual, Auto, or AutoDataTables.

Type: DefaultWorkbookCalcMode
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a friendly description for the new file location.
The type must be a valid string; for example, this is the file location of the monthly sales reports.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayGranularExtDataErrors
Displays granular error messages for external data failures for files in this location.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelFileLocation list object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.
Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ExternalDataAllowed
Specifies the type of external data access allowed for workbooks: None specifies that data refresh is disabled. Dcl
specifies that data is refreshed only when it uses a connection file in a trusted data connection library.
DclandEmbedded specifies that a data connection library can be used but is not required. The scope of this setting
is the trusted location.
The default value is None.
The type must be one of the following: None, Dcl, or DclAndEmbedded.

Type: AllowExternalData
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the FileLocation object to update. The name must be unique in the list of file locations.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid string identifying
the file location, in the form https://myPortal/myTeam; a valid string identifying the path, in the form
C:\folder_name; or an instance of a valid SPExcelFileLocation object.

Type: SPExcelFileLocationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncludeChildren
Indicates that subordinate URLs, directories and libraries are trusted. For example, if the trusted file location is
https://portal, and IncludeChildren is true, then https://portal/subSite is also trusted, as is any subURL under the
URL specified in Address.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocationType
The type of location. LocationType indicates how Excel Services Application retrieves files from that location
specified in Address. The default value is SharePoint.
The type must be one of the following: SharePoint, UNC, or HTTP.

Type: LocationType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ManualExtDataCacheLifetime
Specifies the time, in seconds, that Excel Services Application waits before re-issuing a manual, or user-initiated,
external data request. During this period, the results from the previous external data request may be returned from
an external data cache.
Valid values are:
-1 Never refresh after first query
1 to 2073600 Caches 1 second to 24 days.
The default value is 300.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewWorkbookSessionTimeout
Specifies the time, in seconds, that a session for a new, unsaved, workbook will remain active on Excel Services
Application with no user activity. The default value 1800. Valid values include the following:
-1, session never expires
0, session expires at the end of a single request
1 to 2073600, remain active 1 second to 24 days.
The type must be -1, 0, or an integer in the range of 1 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeriodicExtDataCacheLifetime
Specifies the time, in seconds, that Excel Services Application waits before re-issuing an on-open or periodic (that
is, automatic) external data request. During this period, the results from the previous external data request may be
returned from an external data cache. A value -1 specifies to never refresh after the first query.
The type must be -1, 0, or an integer in the range of 1 to 2073600.
The default value is 300.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestDurationMax
Specifies the maximum duration, in seconds, for a single request in a session. After this time elapses the request is
timed out.
The type must be -1 (no limit) or an integer in the range of 1 to 2073600.
The default value is 300.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RESTExternalDataAllowed
Specifies whether requests from the Representational State Transfer (REST) Application Programming Interface
(API) are permitted to refresh external data connections.

The RESTExternalDataAllowed parameter has no effect if the External DataAllowed parameter is set to None.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionTimeout
Specifies the time, in seconds, that a session will remain active on Excel Services Application with no user activity.
The default is 300 seconds. The default value is 300. Valid values include:
-1, session never expires
0, session expires at the end of a single request
1 to 2073600, remain active 1 second to 24 days
The type must be -1, 0, or an integer in the range of 1 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShortSessionTimeout
Specifies the time, in seconds, that a user has to make the initial interaction with a spreadsheet. After this time has
elapsed, if the user is not active, then the session is closed. The value must always be less than SessionTimeout. If
the ShortSessionTimeout value is greater than or equal to SessionTimeout, an error is returned. The default value
is 75.
The type must be -1 or an integer in the range of 1 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UdfsAllowed
Specifies that user-defined functions can be called by workbooks loaded from the trusted file location that is
specified in Address.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WarnOnDataRefresh
Specifies that a warning is displayed to the user on the first refresh of data for the workbook. The default value is
True.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkbookSizeMax
Specifies the maximum size, in megabytes, of a workbook that can be loaded. The default value is 10.
The type must be an integer value in the range of 1 to 2000.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPExcelServiceApplication
In ths Article

Sets global properties for Excel Services Application.

Syntax
Set-SPExcelServiceApplication [[-Identity] <SPExcelServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-CachingOfUnusedFilesEnable] [-Confirm]
[-CrossDomainAccessAllowed] [-EncryptedUserConnectionRequired <EncryptedConnectionMode>]
[-ExternalDataConnectionLifetime <Int32>] [-FileAccessMethod <FileAccessMethod>]
[-LoadBalancingScheme <LoadBalancingScheme>] [-MemoryCacheThreshold <Int32>] [-PrivateBytesMax <Int32>]
[-SessionsPerUserMax <Int32>] [-SiteCollectionAnonymousSessionsMax <Int32>]
[-TerminateProcessOnAccessViolation] [-ThrottleAccessViolationsPerSiteCollection <Int32>]
[-UnattendedAccountApplicationId <String>] [-UnusedObjectAgeMax <Int32>] [-WhatIf] [-WorkbookCache <String>]
[-WorkbookCacheSizeMax <Int32>] [-UseEffectiveUserName] [-WorkbookModelUsageTracker <String>]
[<CommonParameters>]

Set-SPExcelServiceApplication [[-Identity] <SPExcelServiceApplicationPipeBind>]


[-AssignmentCollection <SPAssignmentCollection>] [-CachingOfUnusedFilesEnable] [-Confirm]
[-CrossDomainAccessAllowed] [-EncryptedUserConnectionRequired <EncryptedConnectionMode>]
[-ExternalDataConnectionLifetime <Int32>] [-FileAccessMethod <FileAccessMethod>]
[-LoadBalancingScheme <LoadBalancingScheme>] [-MemoryCacheThreshold <Int32>] [-PrivateBytesMax <Int32>]
[-SessionsPerUserMax <Int32>] [-SiteCollectionAnonymousSessionsMax <Int32>]
[-TerminateProcessOnAccessViolation] [-ThrottleAccessViolationsPerSiteCollection <Int32>]
[-UnusedObjectAgeMax <Int32>] [-WhatIf] [-WorkbookCache <String>] [-WorkbookCacheSizeMax <Int32>]
[-UnattendedServiceAccount <PSCredential>] [-UseEffectiveUserName] [-WorkbookModelUsageTracker <String>]
[<CommonParameters>]

Description
The Set-ExcelServiceApplication cmdlet changes global runtime properties for Excel Services Application.
Changes to properties that are made by using this cmdlet affect all machines in the farm that are running an
instance of the specified Excel Services Application Web service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Excel Services Application Web Service Application'}
Set-SPExcelServiceApplication -Identity $sa -SessionsPerUserMax 10

This example sets the Excel Services Application to enable each user to open no more than 10 sessions at one time
on a back-end application server that runs Excel Services Application.
--------------EXAMPLE 2--------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Excel Services Application Web Service Application'}
Set-SPExcelServiceApplication -Identity $sa -PrivateBytesMax -1

This example sets the maximum number of private bytes of memory on the computer to a value of -1, which
indicates that Excel Services Application will consume 50 percent of the available memory resources.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CachingOfUnusedFilesEnable
Specifies that files that are no longer used by Excel Services Application can remain in the cache for later use. The
default is true when the parameter is not specified on the command.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CrossDomainAccessAllowed
Specifies that trusted workbooks and data connection files can be requested and rendered by Web Parts or pages
that reside in other HTTP domains.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EncryptedUserConnectionRequired
Requires that encryption is used between the end-user and the server running Excel Services Application. The
scope of this setting is the logical server. The default value is None.
The type must be one of the following: None or Connection.

Type: EncryptedConnectionMode
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExternalDataConnectionLifetime
Specifies the maximum number of seconds that an external data connection can remain open in the connection
pool.
Valid values are:
-1 Never recycle
1 to 2073600 Remain active 1 second to 24 days.
The default value is 1800.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FileAccessMethod
Specifies the authentication method that Excel Services Application uses to retrieve files. UseFileAccessAccount
specifies that all workbooks always use the credentials of the service account running Excel Services Application.
UseImpersonation specifies that Excel Services Application retrieves the workbook files as the user who makes the
request. The default value is UseImpersonation.
The type must be one of the following: UseImpersonation or UseFileAccessAccount.

Type: FileAccessMethod
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SPExcelServiceApplication object to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LoadBalancingScheme
Specifies the load-balancing schema that is used by the Excel Services Application Web service application to send
requests to different back-end Excel Services Application computers. The default value is WorkbookURL.
The type must be one of the following: RoundRobin, Local, or WorkbookURL.

Type: LoadBalancingScheme
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MemoryCacheThreshold
Specifies the percentage of the maximum private bytes that can be allocated to inactive objects. When the memory
cache threshold is exceeded, cached objects that are not currently in use are released. Setting this value to 0
disables caching of inactive objects. The default value is 90.
The type must be an integer in the range of 0 to 95.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateBytesMax
Specifies the maximum private bytes, in megabytes, that are used by Excel Services Application. When set to -1, the
maximum private bytes defaults to 50 percent of physical memory on the computer. Valid values include -1 for no
limit, and any positive integer. The default value is -1.
The type must be -1 or any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SessionsPerUserMax
Specifies the maximum number of sessions allowed for a user. If a user reaches this maximum the oldest session is
deleted when a new session is started. Valid values include -1 for no limit, and any positive integer. The default
value is 25.
The type must be -1 or any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollectionAnonymousSessionsMax
Specifies the maximum number of anonymous sessions allowed per site collection. A value of 0 specifies that no
anonymous sessions are allowed. Valid values include -1 for no limit, 0 to disable the setting, or any positive
integer. The default value is 25.
The type must be -1, 0, or any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TerminateProcessOnAccessViolation
Terminates Excel Services Application when an access violation occurs in the process.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ThrottleAccessViolationsPerSiteCollection
Specifies that if a workbook causes an access violation error on Excel Services Application, all files originating from
that workbook's site collection are blocked from loading for the specified period (in seconds). Existing sessions for
files on that site collection are unaffected. Valid values include 0 to disable the setting, and the range of 1 to
2073600 seconds (24 days). The default value is 0.
The type must be an integer value in the range of 0 to 2073600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UnattendedAccountApplicationId
Specifies that the application ID that is used to look up the unattended service account credentials from the secure
storage service that is specified by the UnattendedAccountSecureServiceAppName parameter. The secure storage
service is contacted when this parameter is set and specific error cases occur. Valid values are alphanumeric strings
with a maximum of 256 characters. The default value is an empty string.
The type must be a valid string of alphanumeric characters; for example, UnattendedServiceAccountID.
The unattended account is a single account that all workbooks can use to refresh data. An unattended account is
required when workbook connections specify None for authentication, or when any non-Windows credentials are
used to refresh data.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UnattendedServiceAccount
The Unattended Service Account is a single account that all workbooks can use to refresh data. This account is
required to refresh data when workbook connections specify "Use the Unattended Service Account" without using
Windows Credentials.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UnusedObjectAgeMax
Specifies the maximum amount of time, in minutes, that objects not currently used in a session are kept in the
memory cache. Valid values include -1 for no maximum setting, and a positive integer in the range of 1 to 34560
minutes (24 days). The default value is -1.
The type must be -1, or an integer in the range of 1 to 34560.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseEffectiveUserName
The UseEffectiveUserName property is an alternative to Windows delegation for allowing users to securely access
Analysis Services data.
The setting will only impact external data connections based on Analysis Services workbook connections with an
authentication setting of "Use the authenticated user's account".
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkbookCache
Specifies the local file system location of the cache that is used to store workbooks that are used by Excel Services
Application.
If no value is specified, the default value is a subdirectory in the system temporary directory.
The type must be a valid path in either of the following forms:
-- C:\folder_name -- \\server_name\folder_name

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkbookCacheSizeMax
Specifies the maximum allowable size, in megabytes, of an individual session. The default value is 0.
The type must be any positive integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkbookModelUsageTracker
{{Fill WorkbookModelUsageTracker Description}}
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPExcelUserDefinedFunction
In ths Article

Sets properties of a user-defined function in Excel Services Application.

Syntax
Set-SPExcelUserDefinedFunction [-Identity] <SPExcelUDFPipeBind>
-ExcelServiceApplication <SPExcelServiceApplicationPipeBind> [-Assembly <String>]
[-AssemblyLocation <AssemblyLocation>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Description <String>] [-Enable] [-WhatIf] [<CommonParameters>]

Description
The Set-SPExcelUserDefinedFunction cmdlet sets properties of a user-defined function assembly. Excel Services
Application uses only user-defined functions that have an entry in the user-defined function list. User-defined
functions are managed code assemblies that can be called from an Excel Services Application workbook by using
standard Excel Services Application formula syntax. The assemblies can perform custom logic or other actions,
such as refresh data. Windows PowerShell cmdlets operate on the entries in the user-defined function list and do
not operate on the assemblies.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1--------------

Set-SPExcelUserDefinedFunction -ExcelServiceApplication "My Excel Service" -Identity


SampleCompany.SampleApplication.SampleUdf -Description "This is the new description for the sample UDF"

This example changes the description of the user-defined function (UDF ) to the UDF
SampleCompany.SampleApplication.SampleUdf file for the Excel Services Application Web service application
named My Excel Service.
--------------EXAMPLE 2--------------

Get-SPExcelServiceApplication "My Excel Service" | Set-SPExcelUserDefinedFunction -Identity


SampleCompany.SampleApplication.SampleUdf -Enable: $false

This example disables the sample UDF SampleCompany.SampleApplication.SampleUdf file from the Excel
Services Application named My Excel Service.

Parameters
-Assembly
Specifies the strongly-typed name of the assembly. The name must be unique in the list of user-defined functions
and cannot be more than 4096 alphanumeric characters long.
The type must be a string of alphanumeric characters; for example,
SampleCompany.SampleApplication.SampleUdf, C:\UDFs\SampleUdf.dll, or
\\MyNetworkServer\UDFs\SampleUdf.dll.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssemblyLocation
Specifies the location where the assembly is stored.
The type must be one of the following: GAC or LocalFile.

Type: AssemblyLocation
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Description
Specifies a display description for the user-defined function. The name cannot be more than 4096 alphanumeric
characters long.
The type must be a string of alphanumeric characters; for example, this is the user-defined function for
consolidation reports.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Activates the user-defined function for use with Excel Services Application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcelServiceApplication
Specifies the Excel Services Application Web service application that contains the SPExcelUserDefinedFunction list
object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an Excel
Services Application Web service application in the farm (for example, MyExcelService1); or an instance of a valid
SPExcelServiceApplication object.

Type: SPExcelServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the SPExcelUserDefinedFunction object to update.
The type must be a valid name of the code assembly; for example,
SampleCompany.SampleApplication.SampleUdf; or an instance of a valid SPExcelUDF object.

Type: SPExcelUDFPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPFarmConfig
In ths Article

Sets a global property or a collection of global properties for the local farm.

Syntax
Set-SPFarmConfig [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DataFormWebPartAutoRefreshEnabled <Boolean>] [-Force] [-InstalledProductsRefresh]
[-ServiceConnectionPointBindingInformation <String>] [-ServiceConnectionPointDelete] [-WhatIf]
[-WorkflowBatchSize <Int32>] [-WorkflowEventDeliveryTimeout <Int32>] [-WorkflowPostponeThreshold <Int32>]
[-ASPScriptOptimizationEnabled <Boolean>] [-UserAccountDirectoryPathIsImmutable]
[-DefaultActivateOnSiteMasterValue <Boolean>] [-MaxSiteSubscriptionSettingsValueLength <UInt32>]
[-MaxTenantStoreValueLength <UInt32>] [-SiteMasterMode <SPSiteMasterMode>]
[-SiteMasterValidationIntervalInHours <UInt32>] [<CommonParameters>]

Description
The Set-SPFarmConfig cmdlet updates a collection of global settings for the local farm that are not members of the
SPFarm object. Use the Get-SPFarmConfig cmdlet to read global settings for the local farm and to create a new
PSCustomObject object from the collection of properties returned from the local farm and then add this object to
the pipeline. Modify the PSCustomObject object and pass it to the Set-SPFarmConfig cmdlet to change the
parameter values.
The properties collected in the PSCustomObject object must be farm-wide settings and must be configurable only
once for the entire farm. The parameter name added to the PSCustomObject object must match exactly the input
parameter name for the Set-SPFarmConfig cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE--------------------------

Set-SPFarmConfig -WorkflowBatchSize 50

This example sets the WorkflowBatdhSize to 50.

Parameters
-ASPScriptOptimizationEnabled
Specifies if ASP Script optimization is enabled. The default value is false (off).
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataFormWebPartAutoRefreshEnabled
Specifies whether any DataFormWebPart on any page in this farm is allowed to periodically refresh its contents
asynchronously (after the page has finished rendering).
When set to false, all DataFormWebParts will ignore the automatic refresh interval provided in Web Part
properties.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultActivateOnSiteMasterValue
Specifies whether to activate site master as default.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the deletion or updating of the service connection point.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstalledProductsRefresh
Updates the current machine license state with the list of products that are installed in the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxSiteSubscriptionSettingsValueLength
Sets the maximum size of a SiteSubscription property value.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxTenantStoreValueLength
Sets the maximum size of a Tenant Store property value.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceConnectionPointBindingInformation
Adds or updates the service connection point for the current farm in Active Directory Domain Service (AD DS ).
The type must be an array of strings that are key value pairs that will be added to the service connection point.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceConnectionPointDelete
Delete the service connection point for the current farm in AD DS.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteMasterMode
Specifies if site master mode is turned on or off. The default value is off.

Type: SPSiteMasterMode
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteMasterValidationIntervalInHours
Determines the length of time, in hours, to validate the Site Master.
The default value is 24.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAccountDirectoryPathIsImmutable
Specifies if the UserAccountDirectoryPath property on an SPSite object is immutable.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkflowBatchSize
Specifies the paging size for events delivered to a single workflow instance.
For each request, the events are streamed out 100 at a time.
Batch size is the number of events processed for a single workflow instance, which can have many events queued
at the same time. Throttle will override batch size; if the workflow instance cannot be started or restarted because
there are too many instances running across all front-end Web servers, none of the events will be fetched,
regardless of the batch size.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WorkflowEventDeliveryTimeout
Specifies the time as an integer in which a workflow job must run without the job timing out.
If the workflow job does time out, it gets put back in the queue to be run again.
For example, if the value is set to 5, the workflow job must run within 5 minutes are the workflow job will time out.
Any workflow job that does time out is placed back in the queue to run again.The default value is 5.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WorkflowPostponeThreshold
Specifies the number of workflows that can be running in IIS against a content database at a time before new
workflow instances get postponed into a queue.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPInfoPathFormsService
In ths Article

Sets parameters for InfoPath Forms Services in SharePoint Server.

Syntax
Set-SPInfoPathFormsService [-ActiveSessionTimeout <Int32>] [-AllowEmbeddedSqlForDataConnections <String>]
[-AllowUdcAuthenticationForDataConnections <String>] [-AllowUserFormBrowserEnabling <String>]
[-AllowUserFormBrowserRendering <String>] [-AllowUserFormCrossDomainDataConnections <String>]
[-AllowViewState <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DefaultDataConnectionTimeout <Int32>] [-Identity <SPFormsServicePipeBind>]
[-MaxDataConnectionResponseSize <Int32>] [-MaxDataConnectionRoundTrip <Int32>]
[-MaxDataConnectionTimeout <Int32>] [-MaxFormLoadTime <Int32>] [-MaxPostbacksPerSession <Int32>]
[-MaxUserActionsPerPostback <Int32>] [-MemoryCacheSize <Int32>] [-RequireSslForDataConnections <String>]
[-ViewStateThreshold <Int32>] [-WhatIf] [-MaxSizeOfUserFormState <Int32>] [<CommonParameters>]

Description
The Set-SPInfoPathFormsService cmdlet modifies the settings for InfoPath Forms Services in SharePoint Server.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1-----------------

Set-SPInfoPathFormsService -AllowUserFormBrowserEnabling $true -AllowUserFormBrowserRendering $false

This example modifies the AllowUserFormBrowserEnabling and AllowUserFormBrowserRendering parameter


values.
--------------EXAMPLE 2-----------------

Set-SPInfoPathFormsService -AllowViewState $true -ViewStateThreshold 40961

This example modifies the AllowViewState and ViewStateThreshold parameter values.

Parameters
-ActiveSessionTimeout
Specifies the duration, in minutes, that a form's session state can remain active. The default value is 1440.
The type must be a non-negative integer value in the range from 0 through 999,999.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowEmbeddedSqlForDataConnections
Specifies a value that indicates whether embedded SQL authentication can be used by browser-enabled InfoPath
form templates.
The type must be one of the following values: True, False (default)

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowUdcAuthenticationForDataConnections
Specifies that authentication information in a universal data connection (.udcx file) can be used.
The type must be one of the following values: True (default), False

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowUserFormBrowserEnabling
Specifies that users can browser enable form templates that do not contain form code, require full trust, enable
rendering on a mobile device, or use a data connection managed by a server administrator.
The type must be one of the following values: True (default), False

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowUserFormBrowserRendering
Specifies that browser-enabled form templates will be rendered by InfoPath Forms Services.
The type must be one of the following values: True (default), False
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowUserFormCrossDomainDataConnections
Specifies that data connections to data sources located in a different domain can be queried.
The type must be one of the following values: True, False (default)

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowViewState
Defines the location to store form session state: View state when True, or Session State Service when False.
The type must be one of the following values: True, False (default)

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultDataConnectionTimeout
Specifies the default data connection timeout in milliseconds. The default value is 10000 (10 seconds).
The type must be a non-negative integer and less than or equal to the value set for MaxDataConnectionTimeout.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the InfoPath Forms Services service to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
InfoPath Forms Services service (for example, FormsService1); or an instance of a valid SPFormsService object.

Type: SPFormsServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxDataConnectionResponseSize
Specifies the maximum size allowed for a data connection response. The default value is 15000 kilobytes (KB ).
The type must be a non-negative integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxDataConnectionRoundTrip
Sets a threshold, in milliseconds, for the maximum time it takes from the start of a data request to the return of the
data request on the server (the data connection round trip). If the data connection round trip time exceeds this
threshold, an event is logged in the Operational log.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxDataConnectionTimeout
Specifies the maximum data connection timeout in milliseconds. The default value is 20000 (20 seconds).
The type must be a non-negative integer and less than or equal to 999999.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxFormLoadTime
Sets a threshold, in milliseconds, for maximum form load time. If form load time exceeds this threshold, an event is
logged in the Operational log.
The MaxFormLoadTime parameter measures the time it takes for a form to open, starting from when the request
is accepted by the server until it leaves the server.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxPostbacksPerSession
Specifies the value of the maximum postbacks that an instance of a browser-enabled InfoPath form template can
make to the InfoPath Forms Services service. The default value is 20.
The type must be a non-negative integer and less than or equal to 999999.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxSizeOfUserFormState
Specifies the value of the maximum size in kilobytes of session state an instance of a browser-enabled InfoPath
form template can use. The default value is 4096.
The type must be a non-negative integer and less than or equal to 999999.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxUserActionsPerPostback
Specifies the maximum user actions per postback. The default value is 200.
The type must be a non-negative integer and less than or equal to 999999.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MemoryCacheSize
Sets the size, in megabytes (MB ), of the cache for solutions in memory.
The default value is 250 MB.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequireSslForDataConnections
Specifies the Secure Sockets Layer (SSL ) requirement value. If data connections in browser-enabled form
templates require basic authentication or digest authentication, a password is sent over the network. Set this value
to True to require an SSL -encrypted connection for these authentication types.
The type must be one of the following values: True (default), False.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ViewStateThreshold
Specifies the maximum size in kilobytes of the session state when stored in the form view. The default value is 40.
The type must be a non-negative integer and less than or equal to 99,999,999.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPInfoPathFormTemplate
In ths Article

Sets properties of a InfoPath form template.

Syntax
Set-SPInfoPathFormTemplate [-Identity] <SPFormTemplatePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Category <String>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPInfoPathFormsTemplate cmdlet modifies the category of an InfoPath form template or to specify the
browser streams for the form template.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Set-InfoPathFormTemplate -Identity "Sample.xsn" -Category "WorkFlowCategory"

This example modifies the category property of a form template for a specified name.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Category
Specifies the category of the form template. The category name can have a maximum of 255 characters.
The type must be a valid name of a form template category; for example, FormTemplateCategory1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the InfoPath form template to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form
template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example,
FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

Type: SPFormTemplatePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPInfoPathWebServiceProxy
In ths Article

Sets parameters for an existing SharePoint Web service application.

Syntax
Set-SPInfoPathWebServiceProxy [-Identity] <SPWebServiceProxyPipeBind> [-AllowForUserForms <String>]
[-AllowWebServiceProxy <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPInfoPathWebServiceProxy cmdlet configures exposed parameters for an existing SharePoint Web
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Set-SPInfoPathWebServiceProxy -Identity "https://server_name" -AllowWebServiceProxy $true

This example sets the Web service proxy for a Web application.

Parameters
-AllowForUserForms
Specifies that a form opened in the InfoPath client can use the InfoPath Forms Services Web service proxy to
connect to a Web service. This parameter can be set only when AllowWebServiceProxy is set to True.
The type must be one of the following: True, False The default value is False.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AllowWebServiceProxy
Specifies that browser-enabled form templates can use the InfoPath Forms Services Web service proxy to connect
to a Web service.
The type must be one of the following: True, False The default value is False.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SharePoint Web service application proxy to update.
The type must be a valid URL, in the form https://server_name; a valid name of a Web application (for example,
WebApp1); a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid
SPWebServiceProxy object.

Type: SPWebServiceProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPInternalAppStateUpdateInterval
In ths Article

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

Syntax
Set-SPInternalAppStateUpdateInterval -AppStateSyncHours <Int32>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPInternalAppStateUpdateInterval cmdlet to set the interval in hours between updates of the internal
app state update job. The internal app state update job gets app upgrades from the internal app directory and sets
them on app instances.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE------------

Set-SPInternalAppStateUpdateInterval -AppStateSyncHours 24

This example sets a 24-hour interval between updates of the internal app state update job.

Parameters
-AppStateSyncHours
Specifies the hour for which the internal app states are updated.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPInternalAppStateUpdateInterval
minutes to read • Edit Online

Set-SPIRMSettings
In ths Article

Sets the Information Rights Management (IRM ) settings.

Syntax
Set-SPIRMSettings -CertificateServerUrl <Uri> [-IrmEnabled] [-AssignmentCollection <SPAssignmentCollection>]
[-CertificatePassword <SecureString>] [-Confirm] [-ServiceAuthenticationCertificate <X509Certificate2>]
[-SubscriptionScopeSettingsEnabled] [-WhatIf] [-UseOauth] [<CommonParameters>]

Set-SPIRMSettings [-IrmEnabled] [-AssignmentCollection <SPAssignmentCollection>]


[-CertificatePassword <SecureString>] [-Confirm] [-ServiceAuthenticationCertificate <X509Certificate2>]
[-SubscriptionScopeSettingsEnabled] [-UseActiveDirectoryDiscovery] [-WhatIf] [-UseOauth] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Set-SPIRMSettings cmdlet to set the Information Rights Management (IRM ) settings for the tenant.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1------------

Set-SPIRMSettings -RmsEnabled -UseActiveDirectoryDiscovery

This example enables IRM for the farm and configures it to use the default RMS server configured in Active
Directory.
--------------EXAMPLE 2------------

Set-SPIRMSettings -RmsEnabled -CertificateServerUrl https://myrmsserver

This example enables IRM for the farm and specifies the URL of the RMS server to use.
--------------EXAMPLE 3------------
site = Get-SPSite http://myspserver
$subscription = $site.SiteSubscription
Set-SPIRMSettings -SiteSubscription $subscription -RmsEnabled -CertificateServerUrl https://myrmsserver

This example enables IRM for the specified tenant and specifies the URL of the RMS server to use.
--------------EXAMPLE 4------------

Set-SPIRMSettings -RmsEnabled:$false

This example disables IRM for the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificatePassword
Specifies the password to access the Service Authentication Certificate. This password is required in order to install
the certificate in the machine certificate store.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CertificateServerUrl
Specifies the address of the RMS certificate server to use for the tenant.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IrmEnabled
Specifies whether or not IRM is enabled in the tenant.
The default value is false.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceAuthenticationCertificate
Specifies the service authentication certificate.
If the parameter is specified and not null, the authentication certificate is used when connecting from this farm to
the RMS server. If the parameter is not specified, the local farm connects to RMS server using integrated windows
authentication.

Type: X509Certificate2
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriptionScopeSettingsEnabled
Specifies whether or not IRM can be configured at the site subscription scope.
Site subscriptions can only configure custom IRM settings if IRM is enabled at the Farm scope.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseActiveDirectoryDiscovery
Specifies whether or not the RMS service should be used for discovery that will determine the address of the RMS
server in the domain.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseOauth
Specifies whether OAuth should be used.
The valid values are True and False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPIRMSettings
minutes to read • Edit Online

Set-SPLogLevel
In ths Article

Sets the trace and event level for a set of categories.

Syntax
Set-SPLogLevel [-AssignmentCollection <SPAssignmentCollection>] [-EventSeverity <String>]
[-Identity <String[]>] [-InputObject <PSObject>] [-TraceSeverity <String>] [<CommonParameters>]

Description
The Set-SPLogLevel cmdlet sets the Windows event logging and trace logging levels for one or more diagnostic
logging categories registered in the farm. If an event or trace associated with a category occurs, but is less severe
than that category's logging level, the event or trace is not written to the event log or the trace log. If an event or
trace associated with a category occurs and is equally severe or more severe than that category's logging level, the
event or trace is written to the event log or the trace log.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

set-sploglevel -TraceSeverity Monitorable

This example sets the TraceSeverity values for all categories to Monitorable.
------------------EXAMPLE 2-----------------------

Set-SPLogLevel -TraceSeverity High -EventSeverity Warning -Identity "Cat1"

This example sets the EventSeverity and TraceSeverity values for a single category.
------------------EXAMPLE 3-----------------------

C:\PS>"Cat1", "Cat2", "Cat3" | Set-SPLogLevel -EventSeverity Error

This example sets the EventSeverity values for multiple categories.


------------------EXAMPLE 4-----------------------

Set-SPLogLevel -EventSeverity Warning -Identity "AreaName:*"


This example sets the EventSeverity values for all categories in the same area.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-EventSeverity
Specifies the category level to be set. The category level is any one of the following values:
None
ErrorCritical
Error
Warning
Information
Verbose

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name(s) of the category or set of categories to set the throttle for; for example, "Unified Logging
Service". If the Identity parameter is not specified, the event-throttling setting is applied to all categories in the
farm.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InputObject
The InputObject is pipelined to the cmdlet and can be a string in a format identical to the Identity parameter, or can
be an SPDiagnosticsCategory object. The user can retrieve one or more categories from the Get-SPLogLevel
cmdlet, modify the category values and then pipeline them into the Set-SPLogLevel cmdlet.

Type: PSObject
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TraceSeverity
Specifies trace throttle to set the specified categor(ies) to. The trace log files are text files that are written to the
trace log path that is defined on the Diagnostic Logging Settings page on the SharePoint Central Administration
site. The type must be any one of the following values:
None (no traces are written to the trace log)
Unexpected
Monitorable
High
Medium
Verbose
VerboseEx

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPManagedAccount
In ths Article

Configures the managed account.

Syntax
Set-SPManagedAccount [-Identity] <SPManagedAccountPipeBind> -ConfirmPassword <SecureString>
-NewPassword <SecureString> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-EmailNotification <Int32>] [-PreExpireDays <Int32>] [-Schedule <String>] [-SetNewPassword] [-WhatIf]
[<CommonParameters>]

Set-SPManagedAccount [-Identity] <SPManagedAccountPipeBind> -ExistingPassword <SecureString>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-EmailNotification <Int32>]
[-PreExpireDays <Int32>] [-Schedule <String>] [-UseExistingPassword] [-WhatIf] [<CommonParameters>]

Set-SPManagedAccount [-Identity] <SPManagedAccountPipeBind> -Password <SecureString>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-EmailNotification <Int32>]
[-PreExpireDays <Int32>] [-Schedule <String>] [-WhatIf] [<CommonParameters>]

Set-SPManagedAccount [-Identity] <SPManagedAccountPipeBind> [-AssignmentCollection <SPAssignmentCollection>]


[-AutoGeneratePassword] [-Confirm] [-EmailNotification <Int32>] [-PreExpireDays <Int32>] [-Schedule <String>]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPManagedAccount cmdlet sets the properties on the given managed account.
You can use this cmdlet to change the password expiration and notification settings for the managed account: Use
the default parameter set. Additionally, you can use this cmdlet to change the password for the managed account
to automatically generated passwords on a set schedule: Use the parameter set that includes the
AutoGeneratePassword parameter. You can also use this cmdlet to change the password for the managed account
to a new value, known to the administrator: Use the parameter set that includes the SetNewPassword parameter.
Finally, you can use this cmdlet to change the password for the managed account to an existing value that has been
already been changed in Active Directory Domain Services (AD DS ): Use the parameter set that includes the
UseExistingPassword parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.
Examples
------------------EXAMPLE-----------------------

$m = Get-SPManagedAccount -Identity "DOMAINx\UserY"


Set-SPManagedAccount -Identity $m -AutoGeneratePassword true

This example displays an explicit managed account if it exists and then attempts to update it to use automatically
generated passwords.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AutoGeneratePassword
Automatically generates a new password.
The type must be either of the following values:
True
False
The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConfirmPassword
Confirms the new password for this managed account.

Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailNotification
Specifies the number of days before password change to begin e-mail notifications.
The default value is 5.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExistingPassword
Sets the password for this managed account to an existing value that has already been changed in Active Directory
Domain Services (AD DS ).

Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the full name or partial name of the managed accounts to retrieve.
The type must be a valid account name, in the form Domain\User, or a GUID, in the form 1234-3456-09876.

Type: SPManagedAccountPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NewPassword
Sets a new password for the managed account

Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Sets a password for the managed account.

Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PreExpireDays
Specifies the number of days before expiration to schedule password change.
The default value is 2.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Schedule
Specifies the new schedule on which the password change job is to run.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SetNewPassword
Sets the password to the new value that is passed in, and changes the value in AD DS.
The type must be either of the following values:
True
False
The default value is False.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseExistingPassword
Sets the password to a new value passed in where the value is already changed in AD DS.
The type must be either of the following values:
True
False
The default value is False.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPMetadataServiceApplication
In ths Article

Sets the properties of a managed metadata service application.

Syntax
Set-SPMetadataServiceApplication [-Identity] <SPMetadataServiceCmdletPipeBind> [-AdministratorAccount <String>]
[-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-CacheTimeCheckInterval <Int32>] [-Confirm] [-DatabaseCredentials <PSCredential>] [-DatabaseName <String>]
[-DatabaseServer <String>] [-DoNotUnpublishAllPackages] [-FailoverDatabaseServer <String>]
[-FullAccessAccount <String>] [-Name <String>] [-RestrictedAccount <String>] [-SyndicationErrorReportEnabled]
[-HubUri <String>] [-MaxChannelCache <Int32>] [-ReadAccessAccount <String>] [-WhatIf] [-DisablePartitionQuota]
[<CommonParameters>]

Set-SPMetadataServiceApplication [-Identity] <SPMetadataServiceCmdletPipeBind> [-AdministratorAccount <String>]


[-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-CacheTimeCheckInterval <Int32>] [-Confirm] [-DatabaseCredentials <PSCredential>] [-DatabaseName <String>]
[-DatabaseServer <String>] [-DoNotUnpublishAllPackages] [-FailoverDatabaseServer <String>]
[-FullAccessAccount <String>] [-Name <String>] [-RestrictedAccount <String>] [-SyndicationErrorReportEnabled]
[-HubUri <String>] [-MaxChannelCache <Int32>] [-ReadAccessAccount <String>] [-WhatIf]
-GroupsPerPartition <Int32> -LabelsPerPartition <Int32> -PropertiesPerPartition <Int32>
-TermSetsPerPartition <Int32> -TermsPerPartition <Int32> [<CommonParameters>]

Description
Use the Set-SPMetadataServiceApplication cmdlet to set the properties of a managed metadata service application.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

$sa = Get-SPMetadataServiceApplication -Identity 'Managed Metadata Service Application'


Set-SPMetadataServiceApplication -Identity $sa -HubUri 'https://sitename' -SyndicationErrorReportEnabled

This example adds a content type hub to an existing managed metadata service application. It also enables error
reporting when content types are imported.
--------------------EXAMPLE 2---------------------
$sa = Get-SPMetadataServiceApplication -Identity 'Managed Metadata Service Application'
Set-SPMetadataServiceApplication -Identity $sa -AdministratorAccount 'contoso\username1' -FullAccessAccount
'contoso\AppPoolAccount1,contoso\AppPoolAccount2' -RestrictedAccount
'contoso\AppPoolAccount3,contoso\AppPoolAccount4,contoso\AppPoolAccount5' -ReadAccessAccount
'contoso\AppPoolAccount6'

This example sets permissions on an existing managed metadata service application.


If you use Windows PowerShell to set any of the account values, you should set all of them. The
Set-SPMetadataServiceApplication cmdlet first erases all accounts, then adds the accounts that you specified.

Parameters
-AdministratorAccount
A comma-separated list of user accounts or service accounts in the format <domain>\<account> that may create
and run the service application. The accounts must already exist.
If a value is set by using this parameter, any existing values for the FullAccessAccount, ReadAccessAccount and
RestrictedAccount parameters are removed. Consider setting all four parameters at the same time.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies an existing IIS application pool in which to run the Web service for the managed metadata service
application.
The value must be a GUID that is the identity of an SPServiceApplicationPool object; the name of an existing
application pool; or an instance of a valid SPServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CacheTimeCheckInterval
Specifies the interval, in seconds, that a front-end Web server should wait before asking the application server for
changes. This value is set per timer job, client application, or Web application.
The mininum value is 1, and there is no maximum value. The default value is 10.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL
authentication.
If SQL authentication is to be used, either the DatabaseCredentials parameter must be specified or both the
DatabaseUserName and DatabasePassword parameters must be set.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database that contains the term store for the managed metadata service application.
The type must be a valid name of a SQL Server database; for example MeatadataDB1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.
The type must be a valid name of a SQL Server database; for example SqlServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisablePartitionQuota
When in partitioned mode, disables the partition quota.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DoNotUnpublishAllPackages
If this flag is set, the packages will not be unpublished. If the HubUri parameter is changed, all content type
packages will be unpublished by default.
If the HubUri parameter is not changed, this flag has no effect.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host server for the failover database server.
The type must be a valid SQL Server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-FullAccessAccount
Specifies a comma-separated set of application pool accounts in the format <domain>\<account> that will be
given read/write permission to the managed metadata service's term store and content type gallery. The accounts
must already exist.
If a value is set by using this parameter, any existing values for the AdministratorAccount, ReadAccessAccount and
RestrictedAccount parameters are removed. Consider setting all four parameters at the same time.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GroupsPerPartition
When in partitioned mode, sets the maximum number of groups per partition.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HubUri
Specifies the fully qualified URL of the site collection that contains the content type gallery that the service will
provide access to.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the managed metadata service application to update.
The type must be a valid GUID or the name of a valid managed metadata service application.

Type: SPMetadataServiceCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LabelsPerPartition
When in partitioned mode, sets the maximum number of labels per partition.
Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxChannelCache
Specifies the maximum number of Windows Communication Foundation (WCF ) channels that a front-end Web
server holds open to the application server. This value is set per timer job, client application, or Web application.
The minimum value is 0, and there is no maximum value. The default value is 4.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the new name of the service application. The name can contain a maximum of 128 characters.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PropertiesPerPartition
When in partitioned mode, sets the maximum number of properties per partition.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReadAccessAccount
Specifies a comma-separated set of application pool accounts in the format <domain>\<account> that will be
given read-only permission to the managed metadata service's term store and content type gallery. The accounts
must already exist.
If a value is set by using this parameter, any previous values for the FullAccessAccount, RestrictedAccount and
AdministratorAccount parameters are removed. Consider setting all four parameters at the same time.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RestrictedAccount
Specifies a comma-separated set of application pool accounts in the format <domain>\<account> that will be
given permission to read the managed metadata service's term store and content type gallery and permission to
write to open term sets and local term sets and to create new enterprise keywords. The accounts must already exist.
If a value is set by using this parameter, any previous values for the FullAccessAccount, ReadAccessAccount and
AdministratorAccount parameters are removed. Consider setting all four parameters at the same time.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SyndicationErrorReportEnabled
Enables reporting of errors when content types are imported.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TermSetsPerPartition
When in partitioned mode, sets the maximum number of term sets per partition.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TermsPerPartition
When in partitioned mode, sets the maximum number of terms per partition.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPMetadataServiceApplicationProxy
In ths Article

Sets the properties of a connection to a managed metadata service application.

Syntax
Set-SPMetadataServiceApplicationProxy [-Identity] <SPMetadataServiceProxyCmdletPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-ContentTypePushdownEnabled]
[-ContentTypeSyndicationEnabled] [-DefaultKeywordTaxonomy] [-DefaultSiteCollectionTaxonomy] [-Name <String>]
[-DefaultProxyGroup] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPMetadataServiceApplicationProxy cmdlet to set the properties of a connection to a managed
metadata service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE 1---------------------

Set-SPMetadataServiceApplicationProxy -Identity "MetadataServiceProxy1" -ContentTypeSyndicationEnabled -


ContentTypePushdownEnabled

This example enables content type syndication and enables content type pushdown on an existing connection to a
managed metadata service application.
-----------------EXAMPLE 2---------------------

Set-SPMetadataServiceApplicationProxy -Identity "MetadataServiceProxy1" -ContentTypeSyndicationEnabled:$false -


ContentTypePushdownEnabled:$false

This example disables content type syndication and disables content type pushdown on an existing connection to a
managed metadata service application.
-----------------EXAMPLE 3---------------------

Set-SPMetadataServiceApplicationProxy -Identity "MetadataServiceProxy1" -DefaultKeywordTaxonomy -


DefaultSiteCollectionTaxonomy:$false

This example configures an existing connection to a managed metadata service application to be the default
location for storing enterprise keywords and prevents it from being the default location for storing column-specific
term sets.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentTypePushdownEnabled
Specifies that existing instances of changed content types in subsites and libraries will be updated.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentTypeSyndicationEnabled
Specifies that this connection will provide access to the content types that are associated with the managed
metadata service application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultKeywordTaxonomy
Specifies that new enterprise keywords will be stored in the term store associated with the managed metadata
service application.
Do not make more than one connection the default keyword location.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the connection be added to the default proxy group of the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultSiteCollectionTaxonomy
Specifies that the term set that is created when you create a new managed metadata column will be stored in the
term store associated with the managed metadata service application.
Do not make more than one connection the default location for site collection term sets.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the connection to update.
The type must be a GUID that represents the identity of the connection to modify, the name of a valid connection
to a managed metadata service, or an instance of a valid SPMetadataServiceProxy object.

Type: SPMetadataServiceProxyCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the new display name of the connection. The name can contain a maximum of 128 characters.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPMicrofeedOptions
In ths Article

Sets the feed cache settings.

Syntax
Set-SPMicrofeedOptions [-AssignmentCollection <SPAssignmentCollection>] [-AsyncRefs <Boolean>]
[-MaxCacheMs <Int32>] [-MaxMentions <Int32>] [-MaxPostLength <Int32>] [-MaxTags <Int32>]
-ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [<CommonParameters>]

Description
Use the Set-SPMicrofeedOptions cmdlet to set the feed cache settings for the current user profile application.

Examples
--------------------EXAMPLE---------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Set-SPMicrofeedOptions -ProfileServiceApplicationProxy $proxy -MaxTags 4

This example sets the maximum tags per post and reply to 4 for the specified User Profile Service Application
Proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-AsyncRefs
Performs reference-posts via async threads. If the value is set to True, each @mention in a thread is handled in its
own .NET threadpool async thread.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxCacheMs
Specifies the permissible range of cache loop up time.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxMentions
Specifies the maximum number @mentions per post and reply.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxPostLength
Sets the maximum number of characters in a Microfeed post.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxTags
Specifies the maximum number #tags per post and reply.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the unique identifier for the proxy.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run. This parameter is mandatory in a hosted-environment
and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationProxyPipeBind
Microsoft.SharePoint.PowerShell.SPSiteSubscriptionPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPMobileMessagingAccount
In ths Article

Configures the specified mobile messaging account.

Syntax
Set-SPMobileMessagingAccount [-Identity] <SPMobileMessagingAccountPipeBind>
-WebApplication <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Password <String>] [-ServiceName <String>] [-ServiceUrl <String>] [-UserId <String>] [<CommonParameters>]

Description
The Set-SPMobileMessagingAccount cmdlet configures the specified mobile messaging account.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Set-SPMobileMessagingAccount -WebApplication https://sitename -Identity SMS -ServiceName SMSLink -ServiceUrl


https://www.adatum.com/Service/MessagingService.asmx-UserId someone@example.com -Password password1

This example changes the SMS mobile account settings of the Web application, https://sitename, to the following
values:service name: SMSLink; service URL: https://www.adatum.com/Service/MessagingService.asmx; user ID:
someone@example.com; and password: password1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies whether to return either Short Message Service (SMS ) or Multimedia Messaging Service (MMS ) account
information. Valid values are SMS and MMS. If you do not specify this parameter account, information is returned
for both SMS and MMS.

Type: SPMobileMessagingAccountPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password
Specifies the password, if credentials are required for the account.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceName
Specifies the name of the SMS service.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceUrl
Specifies the URL of the SMS service.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserId
Specifies the user name, if credentials are required for the account.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the identity of the Web application that hosts the managed path to delete. The type must be a valid GUID,
in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid Web application name (for example,
WebApplication1212); or a valid name (for example, WebApp2423).
You either must specify WebApplication or must use the HostHeader switch and specify the full URL in the Identity
parameter.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPO365LinkSettings
In ths Article

Set SharePoint O365 Link Settings for Hybrid Configuration.

Syntax
Set-SPO365LinkSettings -MySiteHostUrl <String> [-Audiences <String[]>] [-RedirectSites <Boolean>]
[-HybridAppLauncherEnabled <Boolean>] [-OnedriveDefaultToCloudEnabled <Boolean>]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Set-SPO365LinkSettings cmdlet to configure some of Hybrid features (Hybrid site redirection, OneDrive
redirection, ODB default to Cloud) without running Hybrid Configuration Wizard.
To run this cmdlet requires farm administrator permission and that the user account has full control access to the
User Profile Application service.

Examples
EXAMPLE 1

Set-SPO365LinkSettings -MySiteHostUrl https://contoso-my.sharepoint.com/ -RedirectSites $true

This example sets the mysite host URL to contoso-my.sharepoint.com

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Audiences
Sets the user(s) for whom redirection is active.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HybridAppLauncherEnabled
Sets a flag that indicates whether app launcher get data from SharePoint Online (SPO ) is allowed

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MySiteHostUrl
Sets the root URL for the redirected pages.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-OnedriveDefaultToCloudEnabled
Sets a flag that indicates whether Local Onedrive is redirected to SPO OneDrive.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Related Links
Get-SPO365LinkSettings
Test-SPO365LinkSettings
minutes to read • Edit Online

Set-SPOfficeStoreAppsDefaultActivation
In ths Article

Sets the properties of apps for Office.

Syntax
Set-SPOfficeStoreAppsDefaultActivation -Enable <Boolean> -SiteSubscription <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Set-SPOfficeStoreAppsDefaultActivation -Enable <Boolean> -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Set-SPOfficeStoreAppsDefaultActivation cmdlet to set app settings for Office that are on the Office Store
and would be started when the document that contains those apps in their browser is opened.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831 (https://go.microsoft.com/fwlink/p/?
LinkId=251831).

Examples
--------------------EXAMPLE---------------------

Set-SPOfficeStoreAppsDefaultActivation -SiteSubscription efca5b88-b3a3-448d-afbc-ef620f4744f1 -Enable $true

This example enables the apps for Office from the Office Store Office client that uses the subscription id, efca5b88-
b3a3-448d-afbc-ef620f4744f1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Specifies whether the apps for Office from the Office Store should be started.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the Site Group to which the settings apply.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the URL, GUID, or name of the web application to which the setting applies.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPOfficeStoreAppsDefaultActivation
minutes to read • Edit Online

Set-SPPassPhrase
In ths Article

Sets the pass phrase to a new value.

Syntax
Set-SPPassPhrase [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-LocalServerOnly] [-WhatIf]
-PassPhrase <SecureString> [<CommonParameters>]

Set-SPPassPhrase [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]


-ConfirmPassPhrase <SecureString> -PassPhrase <SecureString> [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPPassPhrase cmdlet sets the Passphrase to a new Passphrase value. If the LocalServerOnly parameter is
not used, the farm encryption key is re-encrypted with the new value and attempts to propagate this value to all
other servers in the farm. If the LocalServerOnly parameter is used, this is updated on the local machine only and
the farm encryption key is not changed. The Passphrase value must be the same on all servers in the farm if the
farm is to function correctly. So if the Passphrase fails to propagate to all servers, the LocalServerOnly parameter
can be used to set the remaining servers to the new Passphrase value manually.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

$passphrase = ConvertTo-SecureString -asPlainText -Force


Set-SPPassPhrase -PassPhrase $passphrase -Confirm

This example queries for a string to use as a passphrase and sets the farm passphrase to a new value.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConfirmPassPhrase
Passphrase is typed a second time to confirm that it matches the first entry.

Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LocalServerOnly
Scopes the Passphrase change to the local server only. If this parameter is not used, the Passphrase change is
performed farm-wide.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassPhrase
Specifies the new Passphrase value.
Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPPerformancePointSecureDataValues
In ths Article

Sets global settings for the unattended service account.

Syntax
Set-SPPerformancePointSecureDataValues
[-ServiceApplication] <SPPerformancePointMonitoringServiceApplicationPipeBind>
-DataSourceUnattendedServiceAccount <PSCredential> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
The Set-SPPerformancePointSecureDataValues cmdlet sets global settings and properties for the unattended service
account.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1--------------------

Set-SPPerformancePointSecureDataValues -ServiceApplication "PerformancePoint Service Application" -


DataSourceUnattendedServiceAccount (get-credential)

This example shows how to set the unattended service account by prompting the user for the user name and
password.
--------------------EXAMPLE 2--------------------

Set-SPPerformancePointSecureDataValues -ServiceApplication "PerformancePoint Service Application" -


DataSourceUnattendedServiceAccount (New-Object System.Management.Automation.PSCredential "domain\user",
(ConvertTo-SecureString "password" -AsPlainText -Force))

This example shows how to pass the user name and password as parameters to the cmdlet.
The DataSourceUnattendedServiceAccount parameter accepts a PSCredential object. Therefore, to pass in this
value as a parameter, a new PSCredential object must be created using the desired username and password values.
The PSCredential object requires that the password be given as a SecureString type.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataSourceUnattendedServiceAccount
Specifies the user credentials (user name and password) for the data source of the unattended service account.

Type: PSCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the PerformancePoint Service application that is to be configured.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
PerformancePoint Service application (for example, PerfPointApp1); or an instance of a valid
SPPerformancePointServiceApplication object.

Type: SPPerformancePointMonitoringServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPPerformancePointServiceApplication
In ths Article

Sets global runtime properties for a PerformancePoint Services application.

Syntax
Set-SPPerformancePointServiceApplication [-Identity] <SPPerformancePointMonitoringServiceApplicationPipeBind>
[-AnalyticQueryCellMax <Int32>] [-AnalyticQueryLoggingEnabled <Boolean>] [-ApplicationCacheEnabled <Boolean>]
[-ApplicationCacheMinimumHitCount <Int32>] [-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>]
[-ApplicationProxyCacheEnabled <Boolean>] [-AssignmentCollection <SPAssignmentCollection>]
[-CommentsDisabled <Boolean>] [-CommentsScorecardMax <Int32>] [-Confirm] [-DatabaseFailoverServer <String>]
[-DatabaseName <String>] [-DatabaseServer <String>] [-DatabaseSQLAuthenticationCredential <PSCredential>]
[-DataSourceQueryTimeoutSeconds <Int32>] [-DecompositionTreeMaximum <Int32>] [-ElementCacheSeconds <Int32>]
[-FilterRememberUserSelectionsDays <Int32>] [-FilterTreeMembersMax <Int32>]
[-IndicatorImageCacheSeconds <Int32>] [-MSMQEnabled <Boolean>] [-MSMQName <String>]
[-SelectMeasureMaximum <Int32>] [-SessionHistoryHours <Int32>] [-SettingsDatabase <String>]
[-ShowDetailsInitialRows <Int32>] [-ShowDetailsMaxRows <Int32>] [-ShowDetailsMaxRowsDisabled <Boolean>]
[-TrustedContentLocationsRestricted <Boolean>] [-TrustedDataSourceLocationsRestricted <Boolean>] [-WhatIf]
[-AnalyticResultCacheMinimumHitCount <Int32>] [-DatabaseUseWindowsAuthentication <Boolean>]
[-DataSourceUnattendedServiceAccountTargetApplication <String>] [-FilterSearchResultsMax <Int32>]
[-UseEffectiveUserName <Boolean>] [<CommonParameters>]

Description
The Set-SPPerformancePointServiceApplication cmdlet updates global runtime properties for a PerformancePoint
Service application. The changes made to properties by using this cmdlet affect all servers in the farm that run the
instance of the specified PerformancePoint Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE----------------------

$sa = Get-SPPerformancePointServiceApplication
Set-SPPerformancePointServiceApplication -Identity $sa -DataSourceQueryTimeoutSeconds 5000

This example sets the Data Source Query Timeout setting to a value of 5000. This cmdlet is equivalent to the
PerformancePoint Service Settings page on the SharePoint Central Administration Web site.

Parameters
-AnalyticQueryCellMax
Specifies the maximum number of returned cells in an analytic grid.
A valid integer between 1-1,000,000,000. The default value is 100,000.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AnalyticQueryLoggingEnabled
Turns on verbose logging of query events.
The type must be one of the following: True, False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AnalyticResultCacheMinimumHitCount
The minimum number of times an analytic report needs to be accessed before caching starts happening. The
default value is 0.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationCacheEnabled
Specifies whether rendered output cache on the application server is on (True) or off (False). The default value is
True.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationCacheMinimumHitCount
Specifies the minimum number of times rendered output must be requested before it is added to cache. The
default value is 2.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies the existing IIS application pool to run the Web service in for the service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-ApplicationProxyCacheEnabled
Specifies rendered output cache on the web front end. The default value is True.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CommentsDisabled
Specifies that users can add comments to scorecard cells.
The type must be one of the following: $True, $False. The default value is $False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CommentsScorecardMax
Specifies the maximum number of comments that can be added to a scorecard. The default value is 1000.
The type must be an integer value in the range of 1 to 1,000,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseFailoverServer
Specifies the name of the database server that contains the PerformancePoint Services database that must be
mirrored.
This parameter was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation 2010
with Service Pack 1 (SP1).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the PerformancePoint Services database that will be created when the service application is
provisioned.
This parameter was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation 2010
with Service Pack 1 (SP1).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the database server where the PerformancePoint Services database will be created. This
should be the same server name that is used for the SharePoint content and configuration databases.
The value may be written as SQL instance\server if it is not referring to the default instance.
This parameter was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseSQLAuthenticationCredential
Determines whether to use Windows authentication or SQL Server authentication when connecting to a
PerformancePoint Services database.
This parameter was introduced in SharePoint Server with Service Pack 1 (SP1) and SharePoint Foundation with
Service Pack 1 (SP1).

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUseWindowsAuthentication
When this value is set to true, Performance Point Services disables from using SQL authentication against all data
sources.
The type must be one of the following: $True, $False. The default value is $False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataSourceQueryTimeoutSeconds
Specifies the time, in seconds, before a data source query times out. The default value is 300.
The type must be an integer value in the range of 1 to 36,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataSourceUnattendedServiceAccountTargetApplication
The name of the Secure Store Application that will be used by default to access data sources.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DecompositionTreeMaximum
Specifies the maximum number of items (per level) returned to the decomposition tree visualization.
A valid integer value between 1-1,000,000. The default value is 25.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ElementCacheSeconds
Specifies the first class object cache expiration time. The default value is 15.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilterRememberUserSelectionsDays
Specifies the number of days that user filter selections are remembered. The default value is 90.
The type must be an integer value in the range of 1 to 10,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilterSearchResultsMax
The maximum number of items to return on a Dashboard when viewing a filter.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FilterTreeMembersMax
The maximum number of records to show in filter treeview control. The default value is 500.
An integer value in the range of 1 to 100,000

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the PerformancePoint Service application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
PerformancePoint Service application (for example, PerfPointApp1); or an instance of a valid
SPPerformancePointMonitoringServiceApplication object.

Type: SPPerformancePointMonitoringServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-IndicatorImageCacheSeconds
Specifies the time, in seconds, that key performance indicator (KPI) icons are cached. The default value is 10.
The type must be an integer value in the range of 1 to 3600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MSMQEnabled
Specifies that notifications are sent to Microsoft Message Queuing (MSMQ ) on content change.
The type must be one of the following: True, False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MSMQName
Specifies the name of the queue. The queue name can contain a maximum of 380 characters and cannot contain
the following characters: CR (ASCII 13), LF (ASCII 10), backslash (\), plus sign (+), comma (,), or quotation marks
("").

The type must be a valid MSMQ name; for example, MessageQueue1.


Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SelectMeasureMaximum
Specifies the maximum number of measures to show in a dashboard Select Measure control. The default value is
1000.
The type must be an integer value in the range of 1 to 1,000,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionHistoryHours
Specifies the number of hours between clearing of expired user navigation history. The default value is 2.
The type must be an integer value in the range of 1 to 48.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SettingsDatabase
Specifies the name of the PerformancePoint Service database used for that service application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowDetailsInitialRows
Specifies the initial number of rows to retrieve for show details. The default value is 1000.
The type must be an integer value in the range of 1 to 100,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ShowDetailsMaxRows
Specifies the maximum number of rows to retrieve for show details.
The type must be an integer value in the range of 1 to 1,000,000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowDetailsMaxRowsDisabled
Turns off the ShowDetailsInitialRows setting. If set to true, Analysis Services controls limit.
The type must be one of the following: True, False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustedContentLocationsRestricted
Specifies that only specified locations are trusted. The default setting is false (trust all content locations).
The type must be one of the following: True, False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TrustedDataSourceLocationsRestricted
Specify to trust only specified data source locations. The default is to trust all data source locations.
The type must be one of the following: True, False. The default value is False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseEffectiveUserName
Enables the use of the Analysis Services Effective User Name feature.
The type must be one of the following: True, False. The default value is False.
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPPowerPointConversionServiceApplication
In ths Article

Configures settings for a PowerPoint Conversion Service application.

Syntax
Set-SPPowerPointConversionServiceApplication [-Identity] <SPPowerPointConversionServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-CacheExpirationPeriodInSeconds <UInt32>]
[-MaximumConversionsPerWorker <UInt32>] [-WorkerKeepAliveTimeoutInSeconds <UInt32>]
[-WorkerProcessCount <UInt32>] [-WorkerTimeoutInSeconds <UInt32>] [<CommonParameters>]

Description
Use the Set-SPPowerPointConversionServiceApplication cmdlet to set properties and settings for an instance of a
PowerPoint Conversion Service application that is in a farm.

Examples
--------------------EXAMPLE 1---------------------

Set-SPPowerPointConversionServiceApplication -Identity "MyWorkgroupPPTApp" -CacheExpirationPeriodInSeconds 1200

This example establishes new operational defaults for the conversion cache expiration.
--------------------EXAMPLE 2---------------------

Set-SPPowerPointConversionServiceApplication -Identity "MyWorkgroupPPTApp" -DisableBinaryScan:$false

This example disables binary scanning of documents.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CacheExpirationPeriodInSeconds
Specifies the maximum time, in seconds, that items remain in the back-end server cache. The default value is 600
seconds (10 minutes).

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the unique name of this PowerPoint Conversion Service application.

Type: SPPowerPointConversionServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MaximumConversionsPerWorker
Specifies the maximum number of presentations that a conversion worker process can convert before recycling.
The default value is 5.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkerKeepAliveTimeoutInSeconds
Specifies the maximum time, in seconds, that a conversion worker process can be unresponsive before being
terminated. The default value is 120 seconds.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkerProcessCount
Specifies the number of active instances of the conversion worker process on each back-end. This value must be
less than the Windows Communication Foundation (WCF ) connection limit for this computer. The default value is
3.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WorkerTimeoutInSeconds
Specifies the maximum time, in seconds, that a conversion worker process is given for any single conversion. The
default is 300 seconds (5 minutes).

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPPowerPointConversionServiceApplication
New -SPPowerPointConversionServiceApplicationProxy
minutes to read • Edit Online

Set-SPProfileServiceApplication
In ths Article

Sets properties of a User Profile Service application.

Syntax
Set-SPProfileServiceApplication [-Identity] <SPServiceApplicationPipeBind>
[-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-GetNonImportedObjects <Boolean>] [-MySiteHostLocation <SPSitePipeBind>]
[-ProfileDBCredentials <PSCredential>] [-ProfileSyncDBCredentials <PSCredential>]
[-ProfileSyncDBFailoverServer <String>] [-PurgeNonImportedObjects <Boolean>]
[-SocialDBCredentials <PSCredential>] [-SocialDBFailoverServer <String>] [-Name <String>]
[-UseOnlyPreferredDomainControllers <Boolean>] [-WhatIf] [-ProfileDBFailoverServer <String>]
[<CommonParameters>]

Set-SPProfileServiceApplication [-Identity] <SPServiceApplicationPipeBind>


[-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-GetNonImportedObjects <Boolean>] -MySiteHostLocation <SPSitePipeBind>
[-MySiteManagedPath <SPPrefixPipeBind>] [-ProfileDBCredentials <PSCredential>]
[-ProfileSyncDBCredentials <PSCredential>] [-ProfileSyncDBFailoverServer <String>]
[-PurgeNonImportedObjects <Boolean>] [-SiteNamingConflictResolution <String>]
[-SocialDBCredentials <PSCredential>] [-SocialDBFailoverServer <String>] [-Name <String>]
[-UseOnlyPreferredDomainControllers <Boolean>] [-WhatIf] [-ProfileDBFailoverServer <String>]
[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPProfileServiceApplication cmdlet sets properties of a User Profile Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE---------------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'User Profile Service Application'}


Set-SPProfileServiceApplication -Identity $sa -PurgeNonImportedObjects:$true

This example purges objects from the Profile database which are not in scope of the User Profile import.

Parameters
-ApplicationPool
Specifies the existing IIS application pool in which to run the Web service for the service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GetNonImportedObjects
Specifies whether to inform the users that did not come from the import pipeline and will be marked for deletion.
The list of users marked for deletion is displayed to the console window.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the User Profile Service application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription settings service application (for example, SubscriptionSettingsApp1); or an instance of a valid
SPServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteHostLocation
Specifies the site collection where the My Site will be provisioned.
The type must be a valid URL, in the form https://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid
SiteSubscription object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteManagedPath
Specifies the managed path location of personal sites.
The type must be a valid URL, in the form https://server_name.

Type: SPPrefixPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the display name for the new User Profile Service application. The name that you use must be a unique
name of a User Profile Service application in this farm. The name can be a maximum of 128 characters.
The type must be a valid name of a User Profile Service application; for example, UserProfileSvcApp1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileDBCredentials
Specifies the set of security credentials, such as a user name and a password, that is used to connect to the User
Profile database that this cmdlet creates.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileDBFailoverServer
Specifies the name of the failover SQL server for Profile database. It is used to build the connection string for the
Profile database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileSyncDBCredentials
Specifies the set of security credentials, such as a user name and a password, that will be used to connect to the
Profile Sync database that is specified in the ProfileSyncDBName parameter.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileSyncDBFailoverServer
Specifies the name of the failover SQL server for Profile database. It is used to build the connection string for the
Profile database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PurgeNonImportedObjects
Specifies whether to mark the non-imported users in the profile store for deletion and then inform the users that
did not come from the import pipeline which will be marked for deletion. The list of users marked for deletion is
displayed on the console window
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteNamingConflictResolution
Specifies the format to use to name personal sites.
Use one of the following integer values:
1--Personal site collections are to be based on user names without any conflict resolution. For example,
https://portal_site/location/username/
2-- Personal site collections are to be based on user names with conflict resolution by using domain names. For
example, .../username/ or .../domain_username/
3 Personal site collections are to be named by using domain and user name always, to avoid any conflicts. For
example, https://portal_site/location/domain_username/
The default value is 1 (do not resolve conflicts).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SocialDBCredentials
The set of security credentials, including a user name and a password, that is used to connect to the Social database
that this cmdlet creates.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SocialDBFailoverServer
Specifies the name of the failover SQL server for Social database. It is used to build the connection string for the
Social database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseOnlyPreferredDomainControllers
Restricts profile synchronization communication to a specific domain controller.
The valid values are $true or $false.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPProfileServiceApplicationProxy
In ths Article

Sets properties of a proxy for a User Profile Service application.

Syntax
Set-SPProfileServiceApplicationProxy [-Identity] <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup]
[-MySiteHostLocation <SPSitePipeBind>] [-MySiteManagedPath <SPPrefixPipeBind>] [-Name <String>]
[-SiteNamingConflictResolution <String>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPProfileServiceApplicationProxy cmdlet sets properties of a proxy for a User Profile Service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE---------------------

$proxy = Get-SPServiceApplicationProxy | ? {$_.TypeName -eq 'User Profile Service Application Proxy'}


Set-SPProfileServiceApplicationProxy -Identity $proxy -SiteNamingConflictResolution 2

This example sets the User Profile Service Application Proxy to use a site naming conflict resolution to use domain
names prefixed to usernames.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the User Profile Service application proxy is added to the default proxy group for the local farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the User Profile Service application proxy to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
application proxy (for example, UserProfileSvcProxy1); or an instance of a valid SPServiceApplicationProxy object.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteHostLocation
Specifies the site collection where the My Site will be created.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid URL, in the
form https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-MySiteManagedPath
Specifies the managed path location of personal sites.
The type must be a valid URL, in the form https://server_name.

Type: SPPrefixPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the display name for the User Profile Service application. The name that you use must be a unique name
of a User Profile Service application in this farm. The name can be a maximum of 128 characters.
The type must be a name of a valid service application proxy; for example, UserProfileSvcProxy1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteNamingConflictResolution
Specifies the format to use to name personal sites.
Use one of the following integer values:
1 Personal site collections are to be based on user names without any conflict resolution. For example,
https://portal_site/location/username/
2 Personal site collections are to be based on user names with conflict resolution by using domain names. For
example, .../username/ or .../domain_username/
3 Personal site collections are to be named by using domain and user name always, to avoid any conflicts. For
example, https://portal_site/location/domain_username/
The default value is 1 (do not resolve conflicts).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPProfileServiceApplicationSecurity
In ths Article

Sets permission and identity information.

Syntax
Set-SPProfileServiceApplicationSecurity -Identity <SPObjectSecurity>
-ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-SiteSubscription <SPSiteSubscriptionPipeBind>]
[-Type <String>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPProfileServiceApplictionSecurity cmdlet to set permission and identity information for the
following User Profile objects:
Read individual My Sites
Use Personal Features
Use Social Features
Create Personal Site
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


$security = Get-SPProfileServiceApplicationSecurity -ProfileServiceApplicationProxy $proxy
$everyone = New-SPClaimsPrincipal -Identity 'c:0(.s|true' -IdentityType EncodedClaim
Revoke-SPObjectSecurity -Identity $security -Principal $everyone -Rights 'Create Personal Site'
Set-SPProfileServiceApplicationSecurity -Identity $security -ProfileServiceApplicationProxy $proxy

This example revokes the right 'Create Personal Site' from All Authenticated Users.
--------------------EXAMPLE 2---------------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


$security = Get-SPProfileServiceApplicationSecurity -ProfileServiceApplicationProxy $proxy
$everyone = New-SPClaimsPrincipal -Identity 'c:0(.s|true' -IdentityType EncodedClaim
Grant-SPObjectSecurity -Identity $security -Principal $everyone -Rights 'All'
Set-SPProfileServiceApplicationSecurity -Identity $security -ProfileServiceApplicationProxy $proxy

This example grants the right 'All' to All Authenticated Users.


Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the User Profile Service Application security object.

Type: SPObjectSecurity
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the unique identifier for the proxy.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run. This parameter is mandatory in a hosted-environment
and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Type
Specifies the type of object to display.
The type is any one of the following values:
MySiteReaderACL
UserACL

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPProjectDatabaseQuota
In ths Article

Microsoft internal use only.

Syntax
Set-SPProjectDatabaseQuota [-Settings] <ProjectDatabaseQuotaSettings> -Url <Uri>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Set-SPProjectDatabaseQuota [-Enabled] -MaxDbSize <Int32> -ReadOnlyLimit <Int32>


-ReadOnlyWarningThreshold <Int32> -Url <Uri> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Microsoft internal use only.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------------EXAMPLE---------------------

{{ Add example code here }}

{{ Add example description here }}

Parameters
-AssignmentCollection
Microsoft internal use only.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Enabled
Microsoft internal use only.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxDbSize
Microsoft internal use only.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReadOnlyLimit
Microsoft internal use only.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReadOnlyWarningThreshold
Microsoft internal use only.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Settings
Microsoft internal use only.

Type: ProjectDatabaseQuotaSettings
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Microsoft internal use only.
Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPProjectEventServiceSettings
In ths Article

Allows you to change the Microsoft Project Server Events Service 2016 TCP port settings. If you change the TCP
port, the Microsoft Project Server Events Service 2016 needs to be restarted for the changes to take effect.

Syntax
Set-SPProjectEventServiceSettings [-AssignmentCollection <SPAssignmentCollection>] [-NetTcpPort <Int32>]
[<CommonParameters>]

Description
Allows you to change the Microsoft Project Server Events Service 2016 TCP port settings. If you change the TCP
port, the Microsoft Project Server Events Service 2016 needs to be restarted for the changes to take effect.

Examples
--------------------EXAMPLE---------------------

Set-SPProjectEventServiceSettings -NetTcpPort 16100

This example tells the service to listen on port 16100.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NetTcpPort
TCP port to listen on.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPProjectOdataConfiguration
In ths Article

Sets the properties for how the OData service is configured for an instance of Project Web App.

Syntax
Set-SPProjectOdataConfiguration [-AcceptCountRequests <Boolean>] [-AcceptProjectionRequests <Boolean>]
[-AssignmentCollection <SPAssignmentCollection>] [-ClearEntityPageSizeOverrides] [-DefaultMaxPageSize <Int32>]
[-EntitySetName <String>] [-MaxResultsPerCollection <Int32>] [-PageSizeOverride <Int32>]
[-UseVerboseErrors <Boolean>] [<CommonParameters>]

Description
The Set-SPProjectOdataConfiguration cmdlet sets the settings for how the OData service is configured for an
instance of Project Web App. It allows the user to configure the settings for a list of parameters that specify paging,
the enabling of various querying functionality, whether MaxResultsPerCollection has been enabled and whether
verbose errors are enabled. Paging can be specified per entity. If no paging overrides exist for a given entity, the
DefaultMaxPageSize parameter is used. MaxResultsPerCollection cannot be used in conjunction with paging.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE 1-----------------------

Set-SPProjectOdataConfiguration -ClearEntityPageSizeOverrides

This example clears any page size overrides that have been set for any specific entities.
----------------------EXAMPLE 2-----------------------

Set-SPProjectOdataConfiguration -AcceptProjectionRequests $true

This example sets AcceptProjectionRequests to true.


----------------------EXAMPLE 3-----------------------

Set-SPProjectOdataConfiguration -DefaultMaxPageSize 50

This example sets the default maximum page size to 50 rows.


----------------------EXAMPLE 4-----------------------
Set-SPProjectOdataConfiguration -EntitySetName Assignments -PageSizeOverride 100

This example sets the page size override for the Assignments entity.

Parameters
-AcceptCountRequests
Sets whether requests with the $count path segment or the $inlinecount query options are accepted.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AcceptProjectionRequests
Sets whether projection requests should be accepted. Projection requests are made by using the $select query
option.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClearEntityPageSizeOverrides
Clears all page-size overrides that had been set for any entities.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultMaxPageSize
Sets the default page size. This is used for any entities that do not have an override set using the PageSizeOverride
parameter.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EntitySetName
Specifies the entity name that is used to set a page size override with PageSizeOverride.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxResultsPerCollection
Sets the integer value that indicates the maximum number of results per entity. This parameter cannot be used in
conjunction with paging.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PageSizeOverride
Overrides the page size that is used for a specific entity.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseVerboseErrors
Sets the service to use more verbose error messages (for example, stack trace).
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPProjectPCSSettings
In ths Article

Sets the settings for the Project Calculation Engine on Project Server.

Syntax
Set-SPProjectPCSSettings [-ServiceApplication <PsiServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-CachePersistence <Int32>] [-EditingSessionTimeout <Int32>]
[-MaximumIdleWorkersCount <Int32>] [-MaximumProjectSize <Int32>] [-MaximumSessionsPerUser <Int32>]
[-MaximumWorkersCount <Int32>] [-MinimumMemoryRequired <Int32>] [-RequestTimeLimits <Int32>]
[-NetTcpPort <Int32>] [<CommonParameters>]

Description
The Set-SPProjectPCSSettings cmdlet lets you configure the different settings that govern the operations of the
Project Calculation Engine on Project Server. The settings are per service application, which is identified by the
Service Application parameter provided to this cmdlet. The settings have maximum and minimum values that are
enforced by Project Server.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE-----------------------

Set-SPProjectPCSSettings -sa "Project Service Application" -MaximumSessionsPerUser 500

This example sets 500 as the maximum allowed Project Calculation Engine sessions that a user can open on the
"Project Service Application" service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CachePersistence
The maximum length of time before the Project Calculation Engine can begin to remove temporary cache files of
projects opened on the Project Server service application.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EditingSessionTimeout
The maximum length of time that a user can be idle in a Project Calculation Engine session before a timeout
occurs.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumIdleWorkersCount
The maximum number of idle Project Calculation Engine sessions available at a given time.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumProjectSize
The maximum size of a project that can be opened by the Project Calculation Engine.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumSessionsPerUser
The maximum number of sessions that a user is allowed to open.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumWorkersCount
The maximum number of Project Calculation Engine sessions that can be created.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinimumMemoryRequired
The minimum memory required before launching a new Project Calculation Engine session.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NetTcpPort
The TCP port to use with the PCS service.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RequestTimeLimits
The maximum allowable time for a request to the Project Calculation Engine to complete before the Project
Calculation Engine session is terminated.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
The Project Server service application for which the settings are to be read.
Type: PsiServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPProjectPermissionMode
In ths Article

Changes the permission mode for a Project Web App instance. Running this cmdlet deletes all security settings and
reverts to the default settings for the specified mode.

Syntax
Set-SPProjectPermissionMode [-Url] <Uri> [-Mode] <PermissionMode>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Set-SPProjectPermissionMode cmdlet changes the permission mode for the specified Project Web App instance.
Switching security modes deletes all permissions configuration information for the specified Project Web App
instance and reverts to the default settings for the specified mode.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------EXAMPLE 1-------------------

Set-SPPRojectPermissionMode -Url https://AppServer/pwa -Mode ProjectServer

This example shows the syntax for transitioning a server into Project Server permission mode.
--------------EXAMPLE 2-------------------

Set-SPPRojectPermissionMode -Url https://AppServer/pwa -Mode SharePoint

This example shows the syntax for transitioning a server into SharePoint permission mode.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Mode
Specifies the mode into which the instance should be changed.
The type must be a valid permission mode, in the form SharePoint or ProjectServer.

Type: PermissionMode
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the Project Web App instance for which the permission mode is to be changed.
The type must be a valid URL, in the form https://<ServerName>/<PWAName>.

Type: Uri
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPProjectPermissionMode
Invoke-SPProjectActiveDirectoryGroupSync
minutes to read • Edit Online

Set-SPProjectQueueSettings
In ths Article

Sets the value of one or multiple Project Server Queue settings for a specific Project Server service application.

Syntax
Set-SPProjectQueueSettings [-ServiceApplication <PsiServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-CleanupNonSuccessAgeLimit <Int32>]
[-CleanupSuccessAgeLimit <Int32>] [-MaxConnections <Int32>] [-MaxDegreeOfConcurrency <Int32>]
[-MsgRetryInterval <Int32>] [-MsgRetryLimit <Int32>] [-PeriodicTasksInterval <Int32>] [-QueueTimeout <Int32>]
[-SqlCommandTimeout <Int32>] [-SqlRetryInterval <Int32>] [-SqlRetryLimit <Int32>] [-NetTcpPort <Int32>]
[<CommonParameters>]

Description
Sets the value of one or multiple Project Server Queue settings for a specific Project Server service application.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE-----------------------

Set-SPProjectQueueSettings -ServiceApplication "Project Service Application" -MaxDegreeOfConcurrency 6

This example sets a maximum of 6 for the number of jobs that can be processed at one time by the specified
service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CleanupNonSuccessAgeLimit
This setting determines the age threshold at which any job in a completed, non-successful state (example: Failed
But Not Blocking Correlation) can be purged when the Queue Cleanup job runs. The age of each job is determined
by the completed date and time. For example, if a job was cancelled at 2/1/2007 10:41 p.m. and the Queue Cleanup
job runs at 2/2/2007 11:55 p.m., then the job will not be purged (assuming the Cleanup Age Limit For Non-
successful Jobs was 7 days). Because the number of completed, non-successful jobs is usually not high, the
Cleanup Age Limit For Non-successful Jobs setting is usually set to a high value of 168 (7 days).
Minimum: 1;Maximum: 100000;Default: 168 (7 days)

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CleanupSuccessAgeLimit
This setting determines the age threshold at which successful jobs can be purged when the Queue Cleanup job
runs. The age of each job is determined by the completed date and time. For example, if a job succeeded at
2/1/2007 10:41 p.m. and the Queue Cleanup job runs at 2/2/2007 11:55 p.m., then the job will be purged
(assuming the Cleanup Age Limit For Successful Jobs was 1 day). Since the number of successful jobs is usually
high, the Cleanup Age Limit For Successful Jobs setting is usually set to a low value of 24 (1 day).
Minimum: 1;Maximum: 100000;Default: 24 (1 day)

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxConnections
Maximum number of Queue connections allowed to be pending dispatch on the server.
Default: 10

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxDegreeOfConcurrency
The Queue is multi-threaded, which enables multiple jobs to be processed at the same time. This setting limits the
degree of concurrency of the queue. Note that this setting is per Project Server service application.
Minimum: 1;Maximum: 10;Default: 4

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MsgRetryInterval
If job processing fails due to transient issues (like a SQL Deadlock), instead of failing the job, the Queue will wait
for the Retry Interval to elapse and retry the job.
Minimum: 0 (immediately retry);Maximum: 300000 (5 minutes);Default: 1000 (1 second)

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MsgRetryLimit
If job processing fails due to transient issues (like a SQL Deadlock), instead of failing the job, the Queue will retry
the job. The number of retries is bound by the Retry Limit.
Minimum: 0 (no retries);Maximum: 100;Default: 5

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NetTcpPort
Sets the TCP port the Project Queue service uses.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PeriodicTasksInterval
There are a number of bookkeeping tasks executed by the Queue System. Some examples are awakening jobs in
'Sleeping' state, updating the heartbeat timestamp, checking whether Queue Cleanup needs to be executed and so
on. This setting controls the time interval at which these tasks run.
Minimum: 500 (1/2 second);Maximum: 300000 (5 minutes);Default: 10000 (10 second)
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueueTimeout
The Queue System has a failover recovery feature. If the farm contains multiple servers running the Project Server
Application Service and the Queue Service fails on one server, jobs are automatically redistributed to other servers
on which the Queue Service is online. A Queue Service is considered to have timed out if it cannot be accessed
from the Queue health timer job for more than the 'Queue Timeout' interval.
Minimum: 5 minutes;Maximum: 60 minutes;Default: 15 minutes

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplication
Specifies the Project Server service application to target.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Project
Server service application (for example, ProjectServiceApp1); or an instance of a valid PsiServiceApplication object.

Type: PsiServiceApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SqlCommandTimeout
The Queue makes SQL calls for retrieving and executing jobs. This setting controls the timeout value for all such
calls. If any job fails due to a SQL Timeout error, administrators can increase this setting and retry the job.
Minimum: 30 seconds;Maximum: 86400 (1 day);Default: 1800 (30 minutes)

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlRetryInterval
If the Queue fails to connect to a Project Web App database due to a transient SQL problem (like a SQL Deadlock),
the Queue will wait for the SQL Retry Interval to elapse and retry the query.
Minimum: 0 (immediately retry);Maximum: 60000 (1 minute);Default: 1000 (1 second)
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SqlRetryLimit
If the Queue fails to connect to a Project Web App database due to a transient SQL problem (like a SQL Deadlock),
the Queue will retry the query after the SQL Retry Interval has elapsed. The number of retries is bound by the SQL
Retry Limit.
Minimum: 0 (no retries)Maximum: 100Default: 5

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPProjectServiceApplication
In ths Article

Sets the properties of a Project Server Service application.

Syntax
Set-SPProjectServiceApplication [-Identity] <PsiServiceApplicationPipeBind>
[-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Set-SPProjectServiceApplication cmdlet sets the properties of a Project Server Service application.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------------EXAMPLE---------------------

Set- SPProjectServiceApplication -Identity PSIServiceApp -ApplicationPool newapppool RegisterTimerJob

This example updates the application pool and re-registers the timer job for a Project Server Service application.

Parameters
-ApplicationPool
Specifies the existing IIS application pool to run the web service in for the service application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the Project Server Service application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Project
Server service application (for example, ProjectWebApp1); or an instance of a valid PsiServiceApplication object.

Type: PsiServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPProjectUserSync
In ths Article

Controls the behavior of WSS user sync.

Syntax
Set-SPProjectUserSync [-Url] <Uri> [-Value] <UserSyncParameterValues[]>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
WSS User sync synchronizes Project Server permissions with SharePoint Server permissions. When users are
granted permissions to Project Server entities, permissions are granted to the Project Web App site and the
connected SharePoint sites. By using this cmdlet, administrators can control the behavior of WSS User sync. They
can choose to disable WSS User sync, enable it only for the Project Web App site, enable it only for connected
SharePoint sites, or enable for both.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE-----------------------

Set-SPProjectUserSync https://localhost/pwa EnablePWA

In this example, WSS User sync is enabled for the Project Web App site at https://localhost/pwa.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the URL of the Project Web App instance to set the Project User Sync settings.

Type: Uri
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Value
Disabled completely disables WSS User Sync; EnablePWA enables WSS User sync for the Project Web App site;
EnableEntProj enables WSS User sync for all SharePoint sites connected to Enterprise Projects; EnableSPProj
enables WSS User sync for all SharePoint sites connected to SharePoint Projects; EnableAll enables WSS User
sync for the Project Web App site and all connected SharePoint sites.

Type: UserSyncParameterValues[]
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPProjectUserSyncDisabledSyncThreshold
Set-SPProjectUserSyncFullSyncThreshold
Set-SPProjectUserSyncOffPeakSyncThreshold
minutes to read • Edit Online

Set-SPProjectUserSyncDisabledSyncThreshold
In ths Article

Defines the threshold over which a user sync job will not be executed but instead will be deleted. This threshold is
the product of the number of projects multiplied by the number of users.

Syntax
Set-SPProjectUserSyncDisabledSyncThreshold [-Url] <Uri> [-Threshold] <Int32>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Set-SPProjectUserSyncDisabledSyncThreshold cmdlet d the threshold over which a user sync job will not be
executed but instead will be deleted. This threshold is the product of the number of projects multiplied by the
number of users. The purpose of configuring this threshold is to prevent malicious user syncs of the whole server.
Set it to a negative value to reset to default value (not set).
This cmdlet only works in Project Server Permission mode.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------------EXAMPLE---------------------

Set-SPProjectUserSyncDisabledSyncThreshold -URL http//contoso-AppSrv/PWA -Threshold 400

This example sets the sync disable threshold for the Project Web App instance at http//contoso-AppSrv/PWA to
400.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Threshold
A whole number consisting of the number of projects multiplied by the number of users.

Type: Int32
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
The URL of the Project Web App instance where you want to set the threshold.

Type: Uri
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPProjectUserSync
Set-SPProjectUserSyncFullSyncThreshold
Set-SPProjectUserSyncOffPeakSyncThreshold
minutes to read • Edit Online

Set-SPProjectUserSyncFullSyncThreshold
In ths Article

Defines the threshold over which a delta user sync job will be executed as a complete user sync. This threshold is
the product of the number of projects multiplied by the number of users.

Syntax
Set-SPProjectUserSyncFullSyncThreshold [-Url] <Uri> [-Threshold] <Int32>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Set-SPProjectUserSyncFullSyncThreshold cmdlet defines the threshold over which a delta user sync job will be
executed as a complete user sync. This threshold is the product of the number of projects multiplied by the number
of users. The purpose of this threshold is to use the full sync method instead of the delta sync method when the
amount of changes is large enough. Set it to a negative value to reset to the default (not set).
This cmdlet only works in Project Server Permission mode.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------------EXAMPLE---------------------

Set-SPProjectUserSyncFullSyncThreshold -URL https://contoso-AppSrv/ -Threshold 800

This example sets the full user sync threshold for the Project Web App instance at https://contoso-AppSrv/PWA to
800.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Threshold
A whole number consisting of the number of projects multiplied by the number of users.

Type: Int32
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
The URL of the Project Web App instance where you want to set the threshold.

Type: Uri
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPProjectUserSync
Set-SPProjectUserSyncDisabledSyncThreshold
Set-SPProjectUserSyncOffPeakSyncThreshold
minutes to read • Edit Online

Set-SPProjectUserSyncOffPeakSyncThreshold
In ths Article

Defines the threshold over which a full user sync job will be executed during off peak hours instead of immediately.
This threshold is the product of the number of projects multiplied by the number of users.

Syntax
Set-SPProjectUserSyncOffPeakSyncThreshold [-Url] <Uri> [-Threshold] <Int32>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Set-SPProjectUserSyncOffPeakSyncThreshold cmdlet defines the threshold over which a full user sync job will be
executed during off-peak hours instead of immediately. This threshold is the product of the number of projects
multiplied by the number of users. This threshold is used to preserve server performance. Set it to a negative value
to reset to the default of no threshold configured.
This cmdlet only works in Project Server Permission mode.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------------EXAMPLE---------------------

Set-SPProjectUserSyncOffPeakSyncThreshold -URL https://contoso/PWA -Threshold 900000

This example sets the sync off-peak threshold for the Project Web App instance at https://contoso-AppSrv/PWA to
900000.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Threshold
A whole number consisting of the number of projects multiplied by the number of users.

Type: Int32
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
The URL of the Project Web App instance where you want to set the threshold.

Type: Uri
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPProjectUserSync
Set-SPProjectUserSyncDisabledSyncThreshold
Set-SPProjectUserSyncFullSyncThreshold
minutes to read • Edit Online

Set-SPRequestManagementSettings
In ths Article

Sets Request Manager properties.

Syntax
Set-SPRequestManagementSettings [-Identity] <SPRequestManagementSettingsPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-RoutingEnabled] [-RoutingScheme <SPRoutingScheme>]
[-ThrottlingEnabled] [<CommonParameters>]

Description
Use the Set-SPRequestManagementSettings cmdlet to set properties for the Request Manager.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$wa = Get-SPWebApplication https://webAppUrl


$req = $wa | Get-SPRequestManagementSettings
Set-SPRequestManagementSettings -Identity $req -ThrottlingEnabled:$false

This example disables throttling on the specified Web Application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the Request Manager object for which settings will be applied.

Type: SPRequestManagementSettingsPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RoutingEnabled
Specifies whether routing is enabled or disabled for the Request Manager object.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RoutingScheme
Specifies the routing scheme.
The value is one of the following:
--Default- Performs random selection. --StaticMachineWeight- Uses Static weight of target. --HealthBased-
Considers health score of machine.

Type: SPRoutingScheme
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ThrottlingEnabled
Specifies whether throttling is enabled or disabled for the Request Manager object.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Related Links
Get-SPRequestManagementSettings
New -SPRequestManagementRuleCriteria
minutes to read • Edit Online

Set-SPRoutingMachineInfo
In ths Article

Sets routing target properties.

Syntax
Set-SPRoutingMachineInfo [-Identity] <SPRoutingMachineInfoPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Availability <SPRoutingMachineAvailability>]
[-ClearOutgoingPort] [-OutgoingPort <Int32>] [-OutgoingScheme <SPRoutingOutgoingScheme>]
[-StaticWeight <Double>] [<CommonParameters>]

Description
Use the Set-SPRoutingMachineInfo cmdlet to set routing target properties by using the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$wa = Get-SPWebApplication -Identity https://webAppUrl


$rm = Get-SPRequestManagementSettings -Identity $wa
$m = Get-SPRoutingMachineInfo -RequestManagementSettings $rm -Name SP01
Set-SPRoutingMachineInfo -Identity $m -Availability Unavailable

This example sets the "Availability" routing target property to Unavailable for a specified identity.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Availability
Specifies whether or not the specified computer will be available for routing.
The valid values are:
--Available --Unavailable

Type: SPRoutingMachineAvailability
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClearOutgoingPort
Clears the outgoing port if it is set.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the request management settings object to set.

Type: SPRoutingMachineInfoPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-OutgoingPort
Specifies the port used by Request Manager to make an outgoing connection.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutgoingScheme
Determines the schema of outgoing connections.
The valid values are:
--SameAsIncoming --Http --Https

Type: SPRoutingOutgoingScheme
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StaticWeight
Specifies whether the static weight of a computer routing is used by Request Manager. If the static weight is higher,
more requests will be routed to the computer.

Type: Double
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPRoutingMachineInfo
Get-SPRoutingMachineInfo
Remove-SPRoutingMachineInfo
minutes to read • Edit Online

Set-SPRoutingMachinePool
In ths Article

Sets properties of a machine pool.

Syntax
Set-SPRoutingMachinePool [-Identity] <SPRoutingMachinePoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-MachineTargets <SPRoutingRuleTargetPipeBind[]>]
[<CommonParameters>]

Description
Use the Set-SPRoutingMachinePool cmdlet to set properties of a machine pool by using the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$wa = Get-SPWebApplication -Identity https://webAppUrl


$rm = Get-SPRequestManagementSettings -Identity $wa
$pool = Get-SPRoutingMachinePool -RequestManagementSettings $rm -Name 'MachinePool'
$newMachine = Get-SPRoutingMachineInfo -RequestManagementSettings $rm -Name SP01
Set-SPRoutingMachinePool -Identity $pool -MachineTargets ($pool.MachineTargets + $newMachine)

This example sets the routing machine pool on the specified Web Application. Using the Request Management
settings of the Web Application, it retrieves the existing routing machine pool named 'MachinePool'. It then gets
the routing machine info for a new machine to add to the pool. Lastly, it sets the pool with the existing machine
targets plus the new machine target.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the name of the request management settings object to set.

Type: SPRoutingMachinePoolPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MachineTargets
Specifies the routing targets collection that the machine pool will contain.

Type: SPRoutingRuleTargetPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPRoutingMachinePool
Get-SPRoutingMachinePool
Remove-SPRoutingMachinePool
minutes to read • Edit Online

Set-SPRoutingRule
In ths Article

Changes properties of an existing routing rule.

Syntax
Set-SPRoutingRule [-Identity] <SPRoutingRulePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Criteria <SPRequestManagementRuleCriteriaPipeBind[]>] [-ExecutionGroup <Int32>] [-Expiration <DateTime>]
[-MachinePool <SPRoutingMachinePoolPipeBind>] [<CommonParameters>]

Description
Use the Set-SPRoutingRule cmdlet to change properties of an existing routing rule.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$wa = Get-SPWebApplication https://webAppUrl


$rm = Get-SPRequestManagementSettings -Identity $wa
Get-SPRoutingRule -RequestManagementSettings $rm
$machines = Get-SPRoutingMachineInfo -RequestManagementSettings $rm
$pool = Add-SPRoutingMachinePool -RequestManagementSettings $rm -Name -MachineTargets $machines
$criteria = New-SPRequestManagementRuleCriteria -Value http -Property url -MatchType startswith -CaseSensitive
$false
$rule = Add-SPRoutingRule -RequestManagementSettings $rm -Name -Criteria $c -MachinePool $pool
$criteriaNew = New-SPRequestManagementRuleCriteria -Property UserAgent -MatchType Equals -Value "Mozilla/4.0
(compatible; MSIE 4.01; Windows NT; MS Search 6.0 Robot)"
Set-SPRoutingRule -Identity $rule -Criteria $criteriaNew

This example sets a routing rule for the specified identity by using the $rule variable.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Criteria
Specifies the criteria for the rule to match.

Type: SPRequestManagementRuleCriteriaPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExecutionGroup
Specifies the group in which the rule will be placed.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expiration
Specifies the expiration date and time of the rule.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the request management settings object to set.

Type: SPRoutingRulePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MachinePool
Specifies the pool of machines to which a request will be routed if the changed rule is matched.
Type: SPRoutingMachinePoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPRoutingRule
Get-SPRoutingRule
Remove-SPRoutingRule
minutes to read • Edit Online

Set-SPScaleOutDatabaseDataRange
In ths Article

Extends the range of a specified scale-out database.

Syntax
Set-SPScaleOutDatabaseDataRange -Database <SPDatabasePipeBind> -IsUpperSubRange <Boolean>
-Range <SPScaleOutDataRange> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-NewRangePoint <Byte[]>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPScaleOutDatabaseDataRange cmdlet to extend the range of a specified scale-out database towards a
specified direction.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

C:\PS>$databases = Get-SPScaleOutDatabase -ServiceApplication $serviceApplication

C:\PS>$database = $databases[0]

C:\PS>$state = Get-SPScaleOutDatabaseDataState -Database $database

Set-SPScaleOutDatabaseDataRange -Database $database -Range $state.Range -NewRangePoint $null -IsUpperSubRange


$true

This example extends the data range end point of the first database in the specified service application up to the
maximum range point.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database to which to extend the data range.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsUpperSubRange
Specifies whether to set the start or the end point of the data range with the specified value in the NewRangePoint
parameter.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewRangePoint
Specifies the new start or end point of the database.
The maximum value is NULL.

Type: Byte[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Range
Specifies the expected data range of the scale-out database.

Type: SPScaleOutDataRange
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Set-SPScaleOutDatabaseDataSubRange
Get-SPScaleOutDatabase
Get-SPScaleOutDatabaseDataState
minutes to read • Edit Online

Set-SPScaleOutDatabaseDataSubRange
In ths Article

Creates a subrange for a specified scale-out database.

Syntax
Set-SPScaleOutDatabaseDataSubRange -ConnectionString <String> -IsUpperSubRange <Boolean>
-Range <SPScaleOutDataRange> -SubRangeMode <SPScaleOutDatabaseSubRangeMode>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-IgnoreSubRangePointOnBoundary]
[-IsAzureDatabase] [-SubRangePoint <Byte[]>] [-WhatIf] [<CommonParameters>]

Set-SPScaleOutDatabaseDataSubRange -Database <SPDatabasePipeBind> -IsUpperSubRange <Boolean>


-Range <SPScaleOutDataRange> -SubRangeMode <SPScaleOutDatabaseSubRangeMode>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-IgnoreSubRangePointOnBoundary]
[-SubRangePoint <Byte[]>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPScaleOutDatabaseDataSubRange cmdlet to create a subrange with the specified parameters for a
specified scale-out database or a database which will be connected with a specified connection string. A subrange is
a subset of a range of data.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

C:\PS>$databases = Get-SPScaleOutDatabase -ServiceApplication $serviceApplication

C:\PS>$database = $databases[0]

C:\PS>$state = Get-SPScaleOutDatabaseDataState -Database $database

Set-SPScaleOutDatabaseDataSubRange -Database $database -Range $state.Range -SubRangePoint $state.Range.RangeEnd


-SubRangeMode ReadOnly -IsUpperSubRange $false

This example creates a read-only subrange that starts from the data range start point and ends at the data range
end point on the first scale-out database of the specified service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionString
Specifies the connection string for the scale-out database to create the new data sub-range.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database to create the data subrange.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IgnoreSubRangePointOnBoundary
Specifies whether to complete without any errors if the new subrange's start and end points are the same. If this
parameter is specified, no errors are displayed.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsAzureDatabase
Specifies whether the database is hosted on SQL Azure.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsUpperSubRange
Specifies whether to create the data subrange on the upper or lower side of the data range.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Range
Specifies the expected current range of the scale-out database prior to this operation.

Type: SPScaleOutDataRange
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubRangeMode
Specifies the mode of the data subrange to be created. The data subrange mode values are the following:
--NULL - The data subrange on the specified side (lower or upper) of the data range will be removed. --ReadOnly -
The partitions which are inside the new data subrange can be read, but cannot be modified. --Changing -The
partitions which are inside the new data subrange cannot be read or modified --Deleted- The partitions which are
inside the new data subrange cannot be read or modified

Type: SPScaleOutDatabaseSubRangeMode
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubRangePoint
Specifies the start or end point of the data subrange to be created as defined by the following criteria:
--The start point if the data sub-range is created on the upper side of the data range. --The end point if the data
sub-range is created on the lower side of the data range.
The maximum value is NULL.

Type: Byte[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Clear-SPScaleOutDatabaseDeletedDataSubRange
minutes to read • Edit Online

Set-SPSecureStoreApplication
In ths Article

Sets properties of a Secure Store application.

Syntax
Set-SPSecureStoreApplication -Identity <SPSecureStoreApplication> [-Administrator <SPClaim[]>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-CredentialsOwnerGroup <SPClaim[]>]
[-Fields <TargetApplicationField[]>] [-TargetApplication <TargetApplication>] [-TicketRedeemer <SPClaim[]>]
[-WhatIf] [<CommonParameters>]

Description
The Set-SPSecureStoreApplication cmdlet sets properties of a Secure Store application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$targetApp.FriendlyName = "Updated Contoso Target App"

Set-SPSecureStoreApplication -Identity $application -TargetApplication $targetApp

This example sets a new display name Updated Contoso Target App for the target application.

Parameters
-Administrator
Specifies the administrator of the Secure Store application.

Type: SPClaim[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CredentialsOwnerGroup
Specifies the claims object for the groups that own the group credentials.

Type: SPClaim[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Fields
Specifies the field information for the application. The default fields are username and password.

Type: TargetApplicationField[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Secure Store application to update.

Type: SPSecureStoreApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-TargetApplication
Specifies the target application.

Type: TargetApplication
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TicketRedeemer
Specifies the ticket redeemer claim value.

Type: SPClaim[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSecureStoreDefaultProvider
In ths Article

Updates the secure store provider.

Syntax
Set-SPSecureStoreDefaultProvider -Type <Type> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Set-SPSecureStoreDefaultProvider cmdlet sets or replaces the secure store provider. To register a third-party
secure store, implement the ISecureStoreProvider interface. With the interface defined, place the DLL file in the
global assembly cache, and then load the DLL and load the type, as shown in the example. You can then set the
secure store provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>[Reflection.Assembly]::LoadFrom("C:\ContosoFolder\contosoSecureStore.dll")

C:\PS>$type = [Contoso.SecureStore.ContosoSecureStoreProvider]

Set-SPSecureStoreDefaultProvider -Type $type

This example sets the custom implemented secure store provider.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Type
The type must be a secure store provider type enclosed in square brackets; for example, [Reflection.Assembly].

Type: Type
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSecureStoreServiceApplication
In ths Article

Sets properties of a Secure Store Service application in the farm.

Syntax
Set-SPSecureStoreServiceApplication -Identity <SPServiceApplicationPipeBind>
[-ApplicationPool <SPIisWebServiceApplicationPool>] [-AssignmentCollection <SPAssignmentCollection>]
[-AuditingEnabled] [-AuditlogMaxSize <Int32>] [-Confirm] [-DatabaseCredentials <PSCredential>]
[-DatabaseName <String>] [-DatabasePassword <SecureString>] [-DatabaseServer <String>]
[-DatabaseUsername <String>] [-FailoverDatabaseServer <String>] [-Sharing] [-WhatIf] [<CommonParameters>]

Description
The Set-SPSecureStoreServiceApplication cmdlet sets properties of a Secure Store Service application in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Set-SPSecureStoreServiceApplication -Identity $contosoServApp -AuditlogMaxSize 40

This example sets the maximum size of the audit log to 40 days for the given service application.

Parameters
-ApplicationPool
Specifies the existing IIS application pool to run the Web service in for the new service application.

Type: SPIisWebServiceApplicationPool
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuditingEnabled
Turns on auditing for the Secure Store Service.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuditlogMaxSize
Specifies the number of days to retain the audit log.
The type must be a valid integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL
authentication.
Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the Secure Store service database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password for the user specified in DatabaseUserName. Use this parameter only if SQL authentication
is used to access the metadata service application database.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the user name to use for connecting to the database for the Secure Store service application. Use this
parameter only if SQL authentication is used to access the service application database.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host server for the failover database server.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the service application to update.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Sharing
Specifies that the Secure Store Service application is published and shared across the farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSecurityTokenServiceConfig
In ths Article

Updates the settings of the SharePoint security token service (STS ) identity provider.

Syntax
Set-SPSecurityTokenServiceConfig -QueueSigningCertificateThumbprint <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-FormsTokenLifetime <Int32>]
[-MaxLogonTokenCacheItems <Int32>] [-MaxServiceTokenCacheItems <Int32>]
[-QueueSigningCertificateStoreName <String>] [-ServiceTokenCacheExpirationWindow <Int32>]
[-ServiceTokenLifetime <Int32>] [-WhatIf] [-WindowsTokenLifetime <Int32>] [<CommonParameters>]

Set-SPSecurityTokenServiceConfig -RevokeSigningCertificateThumbprint <String>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-FormsTokenLifetime <Int32>]
[-MaxLogonTokenCacheItems <Int32>] [-MaxServiceTokenCacheItems <Int32>]
[-RevokeSigningCertificateStoreName <String>] [-ServiceTokenCacheExpirationWindow <Int32>]
[-ServiceTokenLifetime <Int32>] [-WhatIf] [-WindowsTokenLifetime <Int32>] [<CommonParameters>]

Set-SPSecurityTokenServiceConfig -SigningCertificateThumbprint <String>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-FormsTokenLifetime <Int32>]
[-MaxLogonTokenCacheItems <Int32>] [-MaxServiceTokenCacheItems <Int32>]
[-ServiceTokenCacheExpirationWindow <Int32>] [-ServiceTokenLifetime <Int32>]
[-SigningCertificateStoreName <String>] [-WhatIf] [-WindowsTokenLifetime <Int32>]
[-QueueSigningCertificateThumbprint <String>] [-QueueSigningCertificateStoreName <String>]
[<CommonParameters>]

Set-SPSecurityTokenServiceConfig [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-FormsTokenLifetime <Int32>] [-ImportSigningCertificate <X509Certificate2>]
[-MaxLogonTokenCacheItems <Int32>] [-MaxServiceTokenCacheItems <Int32>]
[-ServiceTokenCacheExpirationWindow <Int32>] [-ServiceTokenLifetime <Int32>] [-WhatIf]
[-WindowsTokenLifetime <Int32>] [<CommonParameters>]

Set-SPSecurityTokenServiceConfig [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-FormsTokenLifetime <Int32>] [-MaxLogonTokenCacheItems <Int32>] [-MaxServiceTokenCacheItems <Int32>]
[-QueueSigningCertificate <X509Certificate2>] [-ServiceTokenCacheExpirationWindow <Int32>]
[-ServiceTokenLifetime <Int32>] [-WhatIf] [-WindowsTokenLifetime <Int32>] [<CommonParameters>]

Set-SPSecurityTokenServiceConfig [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-FormsTokenLifetime <Int32>] [-MaxLogonTokenCacheItems <Int32>] [-MaxServiceTokenCacheItems <Int32>]
[-RevokeSigningCertificate <X509Certificate2>] [-ServiceTokenCacheExpirationWindow <Int32>]
[-ServiceTokenLifetime <Int32>] [-WhatIf] [-WindowsTokenLifetime <Int32>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPSecurityTokenServiceConfig cmdlet updates the settings of the SharePoint security token service (STS )
identity provider. If a certificate file is used, the certificate must be an X509 certificate with private keys, otherwise
an exception is raised.
This cmdlet operates only with certificates that can be exported. To create a certificate which can be used in this
cmdlet specify the X509KeyStorageFlags.Exportable bit in the keyStorageFlags parameter of the x509Certificate2
object constructor.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

Set-SPSecurityTokenServiceConfig -SigningCertificateThumbprint "2796BAE63F1801E277261BA0D77770028F20EEE4"

This example updates the signing certificate of the SharePoint security token service (STS ) identity provider with a
certificate that has been deployed in the certificate store.
--------------------EXAMPLE 2---------------------

$stsCert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 "c:\sts.pfx","a",20


Set-SPSecurityTokenServiceConfig -ImportSigningCertificate $stsCert

This example imports the signing certificate for the SharePoint STS identity provider.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FormsTokenLifetime
Specifies the expiration time, in minutes, for tokens issued to ASP.NET Membership Provider and Role providers.
The default value is 1380.
The type must be a valid integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ImportSigningCertificate
Specifies the X.509 certificate object from trusted authentication provider farm.
The type must be a name of a valid X.509 certificate; for example, Certificate1.

Type: X509Certificate2
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxLogonTokenCacheItems
Specifies the maximum number of entries for the in-memory logon token cache. The default value is 250 entries.
The type must be a valid integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxServiceTokenCacheItems
Specifies the maximum number of entries for the in-memory service token cache. The default value is 250 entries.
The type must be a valid integer.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueueSigningCertificate
Sets the provided certificate as the queued signing certificate.

Type: X509Certificate2
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueueSigningCertificateStoreName
The store to search in when looking up a certificate to be set as the queued signing certificate by its thumbprint.
Required if QueueSigningCertificateThumbprint was specified.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueueSigningCertificateThumbprint
Sets the certificate with the provided thumbprint as the queued signing certificate.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RevokeSigningCertificate
Revokes the signing certificate that matches the provided certificate.

Type: X509Certificate2
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RevokeSigningCertificateStoreName
The store to search when looking up a certificate to be revoked by its thumbprint. Required if the
QueueSigningCertificateThumbprint was specified.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RevokeSigningCertificateThumbprint
Revoke the signing certificate with the provided thumbprint.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTokenCacheExpirationWindow
Specifies the interval, in minutes, for automatically renewing the token in the cache. The default value is 2 minutes.
The type must be a valid integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceTokenLifetime
Specifies the expiration time, in minutes, for the security token service cache. The default value is 15 minutes.
The type must be a valid integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SigningCertificateStoreName
Specifies the certificate store where the signing certificate resides. The identity store for an identity provider can be
a SQL database table, an Active Directory Domain Services (AD DS ), or Active Directory Lightweight Directory
Service (AD LDS ).
The type must be a valid identity of a signing certificate store; for example IdentityStore1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SigningCertificateThumbprint
Specifies the thumbrpint of the signing certificate.
The type must be a valid identity of a signing certificate; for example
2796BAE63F1801E277261BA0D77770028F20EEE4.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WindowsTokenLifetime
Specifies the expiration time, in minutes, for tokens issued to Windows users. The default value is 1380 minutes.
The type must be a valid integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPServer
In ths Article

Changes the role of the server.

Syntax
Set-SPServer [-Identity] <SPServerPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Role <SPServerRole>] [-Status <SPObjectStatus>] [<CommonParameters>]

Description
The Set-SPServer cmdlet changes the role of the server in the farm by using the Role parameter. A new cmdlet in
SharePoint Server 2016, SharePoint Server 2019 that is used in MinRole.

Examples
--------------------EXAMPLE---------------------

Set-SPServer -Role SingleServerFarm

This example changes the server to SingleServerFarm role.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the name of the server in the farm.

Type: SPServerPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Role
Specifies the name of the server role you want to change.
The valid values are:
WebFrontEnd
Application
SingleServerFarm
Distributed Cache
Search
Custom
ApplicationWithSearch
WebFrontEndWithDistributedCache

Type: SPServerRole
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Status
Sets the status of the server in the farm.

Type: SPObjectStatus
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServerPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPServerScaleOutDatabaseDataRange
In ths Article

Extends the range of a specified scale-out database.

Syntax
Set-SPServerScaleOutDatabaseDataRange -Database <SPDatabasePipeBind> -IsUpperSubRange <Boolean>
-Range <SPScaleOutDataRange> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-NewRangePoint <Byte[]>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPServerScaleOutDatabaseDataRange cmdlet to extend the range of a specified scale-out database in
a specified direction.

Examples
--------------------EXAMPLE---------------------

$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication


$database = $databases[0]
$state = Get-SPServerScaleOutDatabaseDataState -Database $database
Set-SPServerScaleOutDatabaseDataRange -Database $database -Range $state.Range -NewRangePoint $null -
IsUpperSubRange $true

This example extends the data range end point of the first database in the specified service application up to the
maximum range point.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
Note: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database to which to extend the data range.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsUpperSubRange
Specifies whether to set the start point or the end point of the data range with the specified value in the
NewRangePoint parameter.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Range
Specifies the expected data range of the scale-out database.

Type: SPScaleOutDataRange
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object

Related Links
Set-SPServerScaleOutDatabaseDataSubRange
Clear-SPServerScaleOutDatabaseDeletedDataSubRange
minutes to read • Edit Online

Set-SPServerScaleOutDatabaseDataSubRange
In ths Article

Creates a subrange for a specified scale-out database.

Syntax
Set-SPServerScaleOutDatabaseDataSubRange -ConnectionString <String> -IsUpperSubRange <Boolean>
-Range <SPScaleOutDataRange> -SubRangeMode <SPScaleOutDatabaseSubRangeMode>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-IgnoreSubRangePointOnBoundary]
[-IsAzureDatabase] [-SubRangePoint <Byte[]>] [-WhatIf] [<CommonParameters>]

Set-SPServerScaleOutDatabaseDataSubRange -Database <SPDatabasePipeBind> -IsUpperSubRange <Boolean>


-Range <SPScaleOutDataRange> -SubRangeMode <SPScaleOutDatabaseSubRangeMode>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-IgnoreSubRangePointOnBoundary]
[-SubRangePoint <Byte[]>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see [Cmdlet Parameter Sets] (https://msdn.microsoft.com/library/dd878348(VS.85).aspx).

Examples
--------------------EXAMPLE---------------------

$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication


$database = $databases[0]
$state = Get-SPServerScaleOutDatabaseDataState -Database $database
Set-SPServerScaleOutDatabaseDataSubRange -Database $database -Range $state.Range -SubRangePoint
$state.Range.RangeEnd -SubRangeMode ReadOnly -IsUpperSubRange $false

This example creates a read-only subrange that starts from the data range start point and ends at the data range
end point on the first scale-out database of the specified service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
Note: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConnectionString
Specifies the connection string for the scale-out database to create the new data sub-range.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Database
Specifies the scale-out database to create the data subrange.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IgnoreSubRangePointOnBoundary
Specifies whether to complete without any errors if the new subrange's start and end points are the same. If this
parameter is specified, no errors are displayed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsAzureDatabase
Specifies whether the database is hosted on SQL Azure.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsUpperSubRange
Specifies whether to create the data subrange on the upper or lower side of the data range.

Type: Boolean
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Range
Specifies the expected current range of the scale-out database prior to this operation.

Type: SPScaleOutDataRange
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubRangeMode

Type: SPScaleOutDatabaseSubRangeMode
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubRangePoint
Specifies the start or end point of the data subrange to be created as defined by the following criteria:
--The start point if the data sub-range is created on the upper side of the data range. --The end point if the data
sub-range is created on the lower side of the data range.
The maximum value is NULL.

Type: Byte[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPDatabasePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Clear-SPServerScaleOutDatabaseDeletedDataSubRange
minutes to read • Edit Online

Set-SPServiceApplication
In ths Article

Sets properties of a service application.

Syntax
Set-SPServiceApplication [-Identity] <SPServiceApplicationPipeBind>
[-DefaultEndpoint <SPServiceEndpointPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-IisWebServiceApplicationPool <SPIisWebServiceApplicationPoolPipeBind>]
[-ServiceApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
Use the Set-SPServiceApplication cmdlet to set various properties of a service application such as the default
endpoint and the application pool used by the service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE----------------

C:\PS>$serviceapp = Get-SPServiceApplication "My Service App"

Set-SPServiceApplication $serviceapp -DefaultEndpoint https

This example sets the default endpoint of the service application to be https.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultEndpoint
Specifies the address of the default endpoint of the service application.

Type: SPServiceEndpointPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the service application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription settings service application (for example, SubSettingsApp1); or an instance of a valid
SPServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IisWebServiceApplicationPool
Specifies the name or identity of the application pool used by the service application.
The IisWebServiceApplicationPool parameter only applies to Web Service applications.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ServiceApplicationProxyGroup
Specifies a custom service application proxy group for the Web application to use. The Web application will use the
proxies in this proxy group to connect to service applications. If the ServiceApplicationProxyGroup parameter is
not specified, the farm's default proxy group is used.

Type: SPServiceApplicationProxyGroupPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPServiceApplicationEndpoint
In ths Article

Sets the host of an endpoint for a service application.

Syntax
Set-SPServiceApplicationEndpoint [-Identity] <SPServiceEndpointPipeBind> -HostName <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Set-SPServiceApplicationEndpoint [-Identity] <SPServiceEndpointPipeBind> [-ResetHostName]


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set- SPServiceApplicationEndpoint cmdlet sets the host of a service endpoint. Use the second parameter set to
reset the host of the service endpoint to use the default endpoint.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-------------------

Set-SPServiceApplicationEndpoint -Identity "ServiceApp1" -HostName http://sitename -ResetHostName $true

This example associates the SPServiceEndpoint object with the specified identity and resets the hostname.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostName
Specifies the default host of the service endpoint.
The type must be a valid full load balanced URL, in the form http://server_name.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the service endpoint to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URI of an endpoint
address, in the form http://sitename:8003/servicemodelsamples/service; or an instance of a valid
SPServiceEndpoint object.

Type: SPServiceEndpointPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ResetHostName
Removes the current host of the service endpoint and uses the default host.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPServiceApplicationPool
In ths Article

Changes the account used for the Identity of the specified application pool.

Syntax
Set-SPServiceApplicationPool [-Identity] <SPIisWebServiceApplicationPoolPipeBind>
[[-Account] <SPProcessAccountPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPServiceApplicationPool cmdlet changes the account used for the Identity of the specified application
pool.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Set-SPServiceApplicationPool TestServiceWebApplicationPool -Account testdomain\testuser1

This example changes the identity of the selected service application pool.
For the Account parameter, the name of a managed account in the farm can be given. Use the
Get-SPManagedAccount cmdlet to view the existing managed account in the farm. Also, a process account from the
output of the Get-SPProcessAccount cmdlet can be used.

Parameters
-Account
Specifies the credentials that will be the new Identity of the application pool.

Type: SPProcessAccountPipeBind
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity of the Web service application pool to configure.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPServiceApplicationSecurity
In ths Article

Updates the SPObjectSecurity object for a service application.

Syntax
Set-SPServiceApplicationSecurity [-Identity] <SPServiceApplicationPipeBind>
[-ObjectSecurity] <SPObjectSecurity> [-Admin] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Set-SPServiceApplicationSecurity cmdlet updates a security object for the specified service application. Use
this cmdlet with the Grant-SPObjectSecurity and Get-SPServiceApplicationSecurity cmdlets to manage security for
a service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$sa = Get-SPServiceApplication -Identity


$security = Get-SPServiceApplicationSecurity $sa -Admin
$principal = New-SPClaimsPrincipal contoso\johndoe -IdentityType WindowsSamAccountName
Grant-SPObjectSecurity $security $principal "Full Control"
Set-SPServiceApplicationSecurity $sa -Admin $security

This example retrieves the SPObjectSecurity object corresponding to the administrator ACL on a service
application and adds a new user principal to that ACL. The new user is an administrator for the service application
$serviceApp.

Parameters
-Admin
Updates the access control list (ACL ) that contains the administrators list of the service application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the service application that contains the SPObjectSecurity object to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service
application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ObjectSecurity
Specifies the SPObjectSecurity object to update.

Type: SPObjectSecurity
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPServiceHostConfig
In ths Article

Configures one or more common settings for all Web services.

Syntax
Set-SPServiceHostConfig [-Identity] <SPIisWebServiceSettings> -SslCertificateThumbprint <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-HttpPort <Int32>] [-HttpsPort <Int32>]
[-NetTcpPort <Int32>] [-NoWait] [-SslCertificateStoreName <String>] [-WhatIf] [<CommonParameters>]

Set-SPServiceHostConfig [-Identity] <SPIisWebServiceSettings> [-AssignmentCollection <SPAssignmentCollection>]


[-Confirm] [-HttpPort <Int32>] [-HttpsPort <Int32>] [-ImportSslCertificate <X509Certificate2>]
[-NetTcpPort <Int32>] [-NoWait] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set- SPServiceHostConfig cmdlet configures one or more common settings for all Web services.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Set-SPServiceHostConfig -Port 12345

This example sets the HTTP port for the Web services.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpPort
Specifies the new port for the Web service.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HttpsPort
Specifies the new secure port for the Web service.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity of the Web service application to configure.

Type: SPIisWebServiceSettings
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ImportSslCertificate
Specifies the SSL Certificate to use for secure protocols.
Type: X509Certificate2
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NetTcpPort
Sets the TCP port for the Web service.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoWait
For more information, see TechNet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslCertificateStoreName
Specifies the thumbprint of the SSL certificate to retrieve for secure protocols.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SslCertificateThumbprint
Specifies the thumbprint of the SSL certificate to retrieve for secure protocols.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSessionStateService
In ths Article

Updates the credentials that are used to communicate with the state service database.

Syntax
Set-SPSessionStateService [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-DatabaseCredentials <PSCredential>] [-SessionTimeout <Int32>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPSessionStateService cmdlet updates the credentials that are used to communicate with the state service
database.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPSessionStateService -SessionTimeout 120

This example changes the ASP.NET session state time-out to 2 hours.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the database credentials for SQL Authentication that are used to access the state service database. If this
parameter is not specified, Windows authentication is used.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SessionTimeout
Specifies the time, in minutes that an ASP.NET session will remain active with no user activity.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSite
In ths Article

Configures the specified sites.

Syntax
Set-SPSite [-Identity] <SPSitePipeBind> [-AdministrationSiteType <SPAdministrationSiteType>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Force]
[-SiteSubscription <SPSiteSubscriptionPipeBind>] [-WhatIf] [<CommonParameters>]

Set-SPSite [-Identity] <SPSitePipeBind> [-AdministrationSiteType <SPAdministrationSiteType>]


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-LockState <String>] [-MaxSize <Int64>]
[-OwnerAlias <SPUserPipeBind>] [-QuotaTemplate <SPQuotaTemplatePipeBind>]
[-SecondaryOwnerAlias <SPUserPipeBind>] [-SharingType <String>] [-Template <SPWebTemplatePipeBind>]
[-Url <String>] [-UserAccountDirectoryPath <String>] [-WarningSize <Int64>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPSite cmdlet configures the site collection that is specified by the Identity parameter. If a parameter is
not used, the value is not changed.
The QuotaTemplate parameter is mutually exclusive to the MaxSize parameter and WarningSize parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

Get-SPSite https://sitename/sites/teams/* | Set-SPSite -SecondaryOwner "DOMAIN\Jdoe"

This example sets the secondary owner on a set of site collections to DOMAIN\Jdoe.
--------------------EXAMPLE 2---------------------

Set-SPSite -identity "https://sitename" -MaxSize 4000000 -WarningSize 2000000

This example configures the Quota settings for the site collection https://sitename.
Parameters
-AdministrationSiteType
Specifies the site type.
Valid values are None or TentantAdministration.

Type: SPAdministrationSiteType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Suppresses confirmation messages involved in setting the site subscription. This parameter is used in conjunction
with the SiteSubscription parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
Specifies the URL or GUID of the site collection to configure, or refers to an SPSite object that contains sites to
configure.
The type must be a valid URL, in the form https://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; or an SPSite object.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LockState
Sets the lock state of this site collection. The valid lock states are
Unlock Unlocks the site collection and makes it available to users
NoAdditions Prevents users from adding new content to the site collection. Updates and deletions are still allowed
ReadOnly Prevents users from adding, updating, or deleting content.
NoAccess Prevents access to content completely. Users who attempt to access the site receive an access-denied
message.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxSize
Sets the maximum storage size for the site collection in bytes.
The integer value must be larger than the WarningSize value. You cannot use this parameter if the site collection is
using a quota template.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OwnerAlias
Specifies the alias name of the site collection administrator.
The type must be a valid e-mail alias, in the form domain\username.
Type: SPUserPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QuotaTemplate
Specifies the new quota template for this site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890abcdef or a string

Type: SPQuotaTemplatePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryOwnerAlias
Sets the alias of the secondary site collection administrator.
The type must be a valid e-mail alias, in the form domain\username.

Type: SPUserPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SharingType
Specifies whether external access a site collection should be disabled, limited to external users only, or enabled for
external users and anonymous guests.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the Site Group to get site collections.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the template for this site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890abcdef.

Type: SPWebTemplatePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the new site.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAccountDirectoryPath
Sets an organization unit to which to scope user accounts.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WarningSize
Sets the storage warning level for the site collection in bytes.
The integer value must be between 0 and the MaxSize value. You cannot use this parameter if the site collection is
using a quota template.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSiteAdministration
In ths Article

Allows farm administrators to configure any site collection.

Syntax
Set-SPSiteAdministration [-Identity] <SPSiteAdministrationPipeBind>
[-AdministrationSiteType <SPAdministrationSiteType>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Force] [-SiteSubscription <SPSiteSubscriptionPipeBind>] [-WhatIf] [<CommonParameters>]

Set-SPSiteAdministration [-Identity] <SPSiteAdministrationPipeBind>


[-AdministrationSiteType <SPAdministrationSiteType>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-LockState <String>] [-MaxSize <Int64>] [-OwnerAlias <SPUserPipeBind>]
[-SecondaryOwnerAlias <SPUserPipeBind>] [-Template <SPWebTemplatePipeBind>] [-WarningSize <Int64>] [-WhatIf]
[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPSiteAdministration cmdlet allows a farm administrator to configure particular settings on a site
collection even if the farm administrator is not granted explicit permissions. Any parameter that is not provided is
not changed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPSiteAdministration https://sitename -OwnerAlias "DOMAIN\NewOwner"

This example allows farm administrators to change the ownership of a site collection to which they do not have
access.

Parameters
-AdministrationSiteType
Specifies the site type.
Valid values are None or TentantAdministration.
Type: SPAdministrationSiteType
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Suppresses confirmation messages involved in setting the site subscription. This parameter is used in conjunction
with the SiteSubscription parameter.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL (full or partial) or GUID of the site collection.
The type must be a valid URL, in the form https://server_name, or a GUID, in the form 1234-456-987fg.
Type: SPSiteAdministrationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LockState
Specifies the lock state for the given site collection.
The type must be any of the following values:
Unlock: Sets the site collection to unlock.
Content: No new content can be added. Updates and deletions are allowed.
Readonly: Sets the site collection to read-only.
Noaccess: Sets the site collection to unavailable to all users.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxSize
Sets the maximum storage size of the site collection.
The type must be a valid number greater than or equal to 0.
Set to 0 for unlimited.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OwnerAlias
Sets the owner of this site collection.
The type must be a valid user alias.

Type: SPUserPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecondaryOwnerAlias
Sets the secondary owner of this site collection.
The type must be a valid user alias.
Type: SPUserPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the Site Group to get site collections.

Type: SPSiteSubscriptionPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the Web template for the top-level Web site of this site collection. This can only be given if the template
has not already been configured.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890abcdef, or an SPWebTemplate
object.

Type: SPWebTemplatePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WarningSize
Specifies the site collection warning size limit.
The type must be a valid number greater than or equal to 0. Set to 0 for unlimited.

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSiteSubscriptionConfig
In ths Article

Sets the configuration properties of a site subscription.

Syntax
Set-SPSiteSubscriptionConfig [-Identity] <SPSiteSubscriptionPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-PassThru] [-UserAccountDirectoryPath <String>]
[-WhatIf] [-FeaturePack <SPSiteSubscriptionFeaturePackPipeBind>] [<CommonParameters>]

Description
The Set-SPSiteSubscriptionConfig cmdlet sets the configuration properties of a site subscription.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPSiteSubscriptionConfig https://contoso.com -FeaturePack 12345678-90ab-cdef-1234-567890abcdef

This example sets the Feature set of the entire site subscription that contains https://contoso.com with a Feature
pack GUID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FeaturePack
{{Fill FeaturePack Description}}

Type: SPSiteSubscriptionFeaturePackPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Identity
Specifies the site subscription configuration to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; an SPSite (object or URL )
of a site collection that is a member of the site subscription; or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru
Specifies the output object can be passed through the pipeline.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserAccountDirectoryPath
Sets the site user account directory path to a specific organizational unit (OU ) that is in the same domain as the site
subscription.
The type must be a name of a distinguished OU; for example, OU=Contoso1, DC=OSGCorp,DC=local.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSiteSubscriptionEdiscoveryHub
In ths Article

Sets properties for the eDiscovery hub of a site subscription.

Syntax
Set-SPSiteSubscriptionEdiscoveryHub -Site <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-SearchScope <String>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPSiteSubscriptionEdiscoveryHub cmdlet sets global properties and settings for the Ediscovery hub.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE--------------------

Set-SPSiteSubscriptionEdiscoverySearchScope -Site https://contoso.com/sites/sitecollection1 -SearchScope 1

This example enables the search scope for the entire site subscription. A value of zero (0) disables the search scope
across the entire site subscription.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SearchScope
Specifies the name for the search scope. The default value is All Sites.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Site
Specifies the site collection for the Ediscovery hub.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSiteSubscriptionIRMConfig
In ths Article

Sets the Information Rights Management (IRM ) settings.

Syntax
Set-SPSiteSubscriptionIRMConfig [-Identity] <SPSiteSubscriptionPipeBind> [-IrmEnabled]
[-AssignmentCollection <SPAssignmentCollection>] [-CertificateServerUrl <Uri>] [-Confirm] [-PassThru]
[-WhatIf] [<CommonParameters>]

Description
Use the Identity parameter of the Set-SPSiteSubscriptionIRMConfig cmdlet to set the IRM setting for a specified
tenant.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

site = Get-SPSite HYPERLINK "https://" https://

C:\PS>$subscription = $site.SiteSubscription

Set-SPSiteSubscriptionIRMConfig -Identity $subscription -IrmEnabled -CertificateServerUrl https://

This example enables IRM for the tenant and configures it to use the specified RMS server.
--------------------EXAMPLE 2---------------------

site = Get-SPSite HYPERLINK "https://myspserver" https://

C:\PS>$subscription = $site.SiteSubscription

Set- SPSiteSubscriptionIRMConfig -Identity $subscription -IrmEnabled:$false

This example disables IRM for the tenant.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CertificateServerUrl
Specifies the address of the RMS certificate server to use for the tenant.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies a site subscription for a particular tenant.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IrmEnabled
Specifies whether IRM is enabled in the tenant.
The default value is false.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-PassThru
Specifies that the output object can be passed through the pipeline.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPSiteSubscriptionIRMConfig
minutes to read • Edit Online

Set-SPSiteSubscriptionMetadataConfig
In ths Article

Sets the site subscription configuration settings for a specified Metadata Service application.

Syntax
Set-SPSiteSubscriptionMetadataConfig [-Identity] <SPSiteSubscriptionPipeBind>
[-ServiceProxy] <SPMetadataServiceProxyCmdletPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DoNotUnpublishAllPackages] [-HubUri <String>] [-SyndicationErrorReportEnabled] [-WhatIf]
[<CommonParameters>]

Description
Use the Set-SPSiteSubscriptionMetadataConfig cmdlet to set the site subscription-specific settings for a specified
shared service application for the Metadata Service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPSiteSubscriptionMetadataConfig -Identity $siteSubscriptionPipeBind1 -ServiceProxy "MetadataServiceProxy2"


-HubUri "https://sitename" -SyndicationErrorReportEnabled:$false

This example sets the content type syndication hub and disables syndication error reporting for a specific site
subscription on an existing partitioned Metadata Service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DoNotUnpublishAllPackages
{{ Fill DoNotUnpublishAllPackages description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HubUri
Specifies the URI of the syndication hub.
The type must be a valid URI, in the form file:\\server_name\sitedocs.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Identity
Specifies the site subscription for which to set the Metadata Service application settings.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site
subscription (for example, SiteSubscriptionConfig1); or an instance of a valid SiteSubscription object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-ServiceProxy
Specifies the local metadata service proxy for the service application that contains the site subscription-specific
settings.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of the
service application proxy (for example, ServiceAppProxy1); or an instance of a valid SPMetadataServiceProxy
object.

Type: SPMetadataServiceProxyCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SyndicationErrorReportEnabled
Enables error reporting for content type syndication.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSiteSubscriptionProfileConfig
In ths Article

Sets the parameters of a site subscription.

Syntax
Set-SPSiteSubscriptionProfileConfig [-Identity] <SPSiteSubscriptionPipeBind>
[-MySiteHostLocation <SPSitePipeBind>] -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-SynchronizationOU <String>] [-WhatIf]
[<CommonParameters>]

Set-SPSiteSubscriptionProfileConfig [-Identity] <SPSiteSubscriptionPipeBind>


-MySiteHostLocation <SPSitePipeBind> -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-MySiteManagedPath <SPPrefixPipeBind>]
[-SiteNamingConflictResolution <String>] [-SynchronizationOU <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPSiteSubscriptionProfileConfig cmdlet sets the parameters of a site subscription.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

$sub = Get-SPSiteSubscription http://contoso/my


Set-SPSiteSubscriptionProfileConfig -Identity $sub -SiteNamingConflictResolution 3 -SynchronizationOU OrgUnit1

This example sets the parameter of the site subscription SiteNamingConflictResolution to always avoid any
conflicts and parameter SynchronizationOU to OrgUnit1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the proxy of the User Profile Service application that contains the site subscription to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a User
Profile Service application proxy (for example, UserProfileSvcProxy1); or an instance of a valid
SPServiceApplicationProxy object.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteHostLocation
Specifies the site collection where the My Site host for the site subscription is provisioned.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid URL, in the
form https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteManagedPath
Specifies the managed path where personal sites will be created.
The type must be a valid URL, in the form https://server_name.
Type: SPPrefixPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the name of the proxy for the User Profile Service application.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteNamingConflictResolution
Specifies the format to use to name personal sites.
Use one of the following integer values:
1-- Personal site collections to be named after user names without any conflict resolution. For example,
https://portal_site/location/username/
2-- Personal site collections to be named after user names with conflict resolution by using domain names. For
example, .../username/ or .../domain_username/
3-- Personal site collections to be named using domain and username always to avoid any conflicts. For example,
https://portal_site/location/domain_username/
The default value is 1 (do not resolve conflicts).

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SynchronizationOU
Specifies the organizational unit that serves the site subscription.
The type must be a valid name of an organizational unit; for example, OrgUnit1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSiteURL
In ths Article

Adds or changes an URL mapping for the site.

Syntax
Set-SPSiteURL [-Identity] <SPSitePipeBind> -Url <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [-Zone <SPUrlZone>] [<CommonParameters>]

Description
The Set-SPSiteUrl cmdlet adds or changes an URL mapping for the site.
The Set-SPSiteUrl cmdlet only applies to the root site collection for a host name that is, http://www.contoso.com.
This cmdlet cannot be directly run against a managed path site collection underneath the root that is,
http://www.contoso.com/sites/test.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

C:\PS>$site = Get-SPSite 'http://www.contoso.com'

Set-SPSiteURL -Identity $site -Url http://contoso.sharepoint.com -Zone 0

This example adds an additional URL, http://contoso.sharepoint.com, to the site collection. The newly added URL is
in the default zone.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the site collection to set. Must be the root site collection for a host-name.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Url
Specifies the URL. This must be unique. This must be an absolute URL including scheme (that is,
https://www.contoso.com). If URL exists, the current entry is updated. Otherwise, the URL entry is added and
cannot be in use by another site collection.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies one of the five zones with which the alternate URL is associated. If the Zone parameter is not specified
and is a new entry, the default value is set. If an entry exists and is not specified, do not change.

Type: SPUrlZone
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPSiteUrl
Remove-SPSiteUrl
minutes to read • Edit Online

Set-SPStateServiceApplication
In ths Article

Updates the name of a state service application.

Syntax
Set-SPStateServiceApplication [-Identity] <SPStateServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Name <String>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPStateServiceApplication cmdlet updates the name of a state service application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPStateServiceApplication -Identity "State Service Application 1" -Name "New name for State Service
Application 1"

This example changes the display name of a state service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service application to update.
The type must be a valid name of a state service application (for example, StateServiceApp1); a valid GUID, in the
form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPStateServiceApplication object.

Type: SPStateServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the display name of the state service application.
The type must be a valid name of a state service application; for example, StateSvc1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPStateServiceApplicationProxy
In ths Article

Updates the name of a state service application proxy.

Syntax
Set-SPStateServiceApplicationProxy [-Identity] <SPStateServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Name <String>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPStateServiceApplicationProxy cmdlet updates the name of a state service application proxy.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

Set-SPServiceApplicationProxy -Identity 9703f7e2-9521-47c3-bd92-80e3eeba391b -Name "New Service Application


Proxy Name"

This example changes the display name of a state service application proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
{{ Fill Confirm Description }}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service application proxy to update.
The type must be a valid name of a state service application proxy (for example, StateServiceProxy); a valid GUID,
in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPStateServiceApplicationProxy
object.

Type: SPStateServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Name
Specifies the display name of the state service application proxy.
The type must be a valid name of a state service application; for example, StateSvcProxy1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
{{ Fill WhatIf Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPStateServiceDatabase
In ths Article

Updates properties of a state service database.

Syntax
Set-SPStateServiceDatabase [-Identity] <SPStateDatabasePipeBind>
[[-ServiceApplication] <SPStateServiceApplicationPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DatabaseCredentials <PSCredential>] [-Weight <Int32>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPStateServiceDatabase cmdlet manages the credentials that are used to communicate with the database,
sets the weight of the database, or changes the state service application with which it is associated.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE 1---------------------

Set-SPStateServiceDatabase -Identity 9703f7e2-9521-47c3-bd92-80e3eeba391b -Weight 10

This example updates the database weight to the maximum (10).


--------------------EXAMPLE 2---------------------

Set-SPStateServiceDatabase -Identity 9703f7e2-9521-47c3-bd92-80e3eeba391b -ServiceApplication "StateSvcApp1"

This example updates the associated service application for a state service database.
--------------------EXAMPLE 3---------------------

C:\PS>$cred = Get-Credential

Set-SPStateServiceDatabase -Identity "StateSvcDB1" -DatabaseCredentials $cred

This example updates the SQL Authentication credentials that are used for a given database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the database credentials for SQL Authentication used to access the state service database. If this
parameter is not specified, Windows authentication is used.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state service database to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a state
database (for example, StateSvcDB1); or an instance of a valid SPStateServiceDatabase object.

Type: SPStateDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplication
Specifies the state service application to which to add the state database.
The type must be a valid name of a state service application (for example, StateServiceApp1); a valid GUID, in the
form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid SPStateServiceApplication object.

Type: SPStateServiceApplicationPipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Weight
Specifies the weight for the state database. The default value is 1.
The type must be a valid integer in the range of 1 to 10.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPSubscriptionSettingsServiceApplication
In ths Article

Sets properties of a subscription settings service application.

Syntax
Set-SPSubscriptionSettingsServiceApplication [-Identity] <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseCredentials <PSCredential>]
[-DatabaseName <String>] [-DatabaseServer <String>] [-FailoverDatabaseServer <String>] [-WhatIf]
[<CommonParameters>]

Description
Use the Set-SPSubscriptionSettingsServiceApplication cmdlet to set properties on a subscription settings service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------------EXAMPLE--------------------------

C:\PS>$applicationPool = GetServiceApplicationPool SettingsApplicationPool

Get-SPServiceApplication -Name SettingsServiceApp | Set-SPSubscriptionSettingsServiceApplication -


ApplicationPool $applicationPool

This example changes the application pool of the subscription settings service application. This command assumes
that a subscription settings service application named SettingsServiceApp exists and that an application pool
named SettingsApplicationPool exists

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL Server
Authentication.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the subscription settings database.
The type must be a valid name of a SQL Server database; for example, SubscriptionSettingsAppDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host SQL Server instance for the database specified in DatabaseName parameter.
The type must be a valid SQL Server instance name; for example, SQLServerHost1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the name of the host SQL Server instance for the failover database server.
The type must be a valid SQL Server instance name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the settings service application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription settings service application (for example, SubscriptionSettingsApp1); or an instance of a valid
SPSubscriptionSettingsServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPThrottlingRule
In ths Article

Changes properties of an existing throttling rule.

Syntax
Set-SPThrottlingRule [-Identity] <SPThrottlingRulePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Criteria <SPRequestManagementRuleCriteriaPipeBind[]>] [-Expiration <DateTime>] [-Threshold <Int32>]
[<CommonParameters>]

Description
Use the Set-SPThrottlingRule cmdlet to change the properties of an existing throttling rule by using the Identity
parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE---------------------

C:\PS>$web=Get-SPWebApplication -Identity

C:\PS>$rm=Get-SPRequestManagementSettings -Identity $web

C:\PS>$c=New-SPRequestManagementRuleCriteria -Value http -Property url -MatchType startswith -CaseSensitive


$false

C:\PS>$throttlingrule=Add-SPThrottlingRule -RequestManagementSettings $rm -Name -Criteria $c -Threshold 4

C:\PS>$criteriaNew = New-SPRequestManagementRuleCriteria -Property UserAgent -MatchType Equals -Value


"Mozilla/4.0 (compatible; MSIE 4.01; Windows NT; MS Search 6.0 Robot)"

Set-SPThrottlingRule -Identity $ throttlingrule -Criteria $criteriaNew -Threshold 8

This example sets throttling rule property

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Criteria
Specifies the criteria for the rule to match.

Type: SPRequestManagementRuleCriteriaPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Expiration
Specifies the expiration date and time of the rule.

Type: DateTime
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the throttling rule object to set.

Type: SPThrottlingRulePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Threshold
Specifies a value between 0 and 10 which defines the maximum threshold for throttling. The Request Manager will
remove routing targets if the Health-Score becomes greater than this value.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPThrottlingRule
Get-SPThrottlingRule
Remove-SPThrottlingRule
minutes to read • Edit Online

Set-SPTimerJob
In ths Article

Sets the schedule for running a timer job.

Syntax
Set-SPTimerJob [-Identity] <SPTimerJobPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Schedule <String>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPTimerJob cmdlet sets the schedule for running a specified timer job.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE------------------------

Get-SPTimerJob job-recycle-bin-cleanup | Set-SPTimerJob -Schedule "weekly at sat 5:00"

This example sets the schedule to run the job-recylce-bin-cleanup timer job to weekly at sat 5:00.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the timer job to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a timer
job (for example, TimerJob1); or an instance of a valid SPTimerJob object.

Type: SPTimerJobPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Schedule
Specifies the schedule for running the timer job.
The type must be a valid SharePoint Timer service (SPTimer) schedule in the form of any one of the following
schedules:
Every 5 minutes between 0 and 59
Hourly between 0 and 59
Daily at 15:00:00
Weekly between Fri 22:00:00 and Sun 06:00:00
Monthly at 15 15:00:00
Yearly at Jan 1 15:00:00

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPTopologyServiceApplication
In ths Article

Sets the properties on the topology service application of the local farm.

Syntax
Set-SPTopologyServiceApplication [-Identity] <SPTopologyWebServiceApplicationPipeBind>
-LoadBalancerUrl <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPTopologyServiceApplication cmdlet sets the advanced properties of an application when the Identity
parameter is used.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Set-SPTopologyServiceApplication 67877d63-bff4-4521-867a-ef4979ba07ce -LoadBalancedURL "https://testurl"

This example sets the load-balanced URL for the topology service application.
The topology service application GUID is unique to every farm. You can run the Get-SPTopologyServiceApplication
cmdlet to retrieve the GUID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID of the application to be set.
The type must be a valid GUID, in the form 1234-456-854gh.

Type: SPTopologyWebServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LoadBalancerUrl
Specifies an external physical load balancer.
The type must be a valid URL, in the form http://search.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPTopologyServiceApplicationProxy
In ths Article

Sets the proxy properties of the topology service application.

Syntax
Set-SPTopologyServiceApplicationProxy [-Identity] <SPTopologyWebServiceProxyPipeBind> -BadListPeriod <String>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Set-SPTopologyServiceApplicationProxy cmdlet sets the properties of the local topology service application
proxy and the default load balancer.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Set-SPTopologyServiceApplicationProxy 67877d63-bff4-4521-867a-ef4979ba07ce -BadListPeriod 1234

This example sets the bad list period for the given topology service application proxy.
The topology service application GUID is unique to every farm. You can run the Get-SPTopologyServiceApplication
cmdlet to retrieve the GUID.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-BadListPeriod
Specifies the time period that a node is kept in a bad list.
The type must be a valid value between 1 and 480 (in minutes).
The default value is 10.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID of the application proxy.
The type must be a valid GUID, in the form 1234-4567-098jhj.

Type: SPTopologyWebServiceProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPTranslationServiceApplication
In ths Article

Sets property settings on a Machine Translation service application.

Syntax
Set-SPTranslationServiceApplication [-Identity] <TranslationServiceApplicationPipeBind>
[-AddEnabledFileExtensions <String[]>] [-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-ClearEnabledFileExtensions] [-Confirm]
[-DatabaseCredential <PSCredential>] [-DatabaseName <String>] [-DatabaseServer <String>]
[-DisableBinaryFileScan <Boolean>] [-EnableAllFileExtensions] [-FailoverDatabaseServer <String>]
[-JobExpirationDays <Int32>] [-KeepAliveTimeout <Int32>] [-MachineTranslationAddress <String>]
[-MachineTranslationCategory <String>] [-MachineTranslationClientId <String>] [-MaximumBinaryFileSize <Int32>]
[-MaximumItemsPerDay <Int32>] [-MaximumItemsPerPartitionPerDay <Int32>]
[-MaximumSyncTranslationRequests <Int32>] [-MaximumTextFileSize <Int32>] [-MaximumTranslationAttempts <Int32>]
[-MaximumTranslationTime <Int32>] [-MaximumWordCharacterCount <Int32>] [-RecycleProcessThreshold <Int32>]
[-RemoveEnabledFileExtensions <String[]>] [-TimerJobFrequency <Int32>] [-TotalActiveProcesses <Int32>]
[-TranslationsPerInstance <Int32>] [-UseDefaultInternetSettings] [-WebProxyAddress <String>] [-WhatIf]
[<CommonParameters>]

Description
Use the Set-SPTranslationServiceApplication cmdlet to set properties on a Machine Translation service application
in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE---------------

Set-SPTranslationServiceApplication TranslationService -JobExpirationDays 14 -TotalActiveProcesses 3

This example sets the job expiration to 14 days and the number of worker processes per server to 3 for the
Machine Translation Service application named TranslationService.

Parameters
-AddEnabledFileExtensions
Comma delimited list of file extensions that you want to add to the set of enabled file extensions for the Machine
Translation Service application
To return a list of supported file extensions, type
[Microsoft.Office.TranslationServices.TranslationService]::EnumerateFileExtensions().
Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies the managed application pool that the instance of Translation Service will run in.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClearEnabledFileExtensions
Disables all file extensions for the Machine Translation Service application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredential
Specifies the SQL Server credentials used for this Translation Service instance. This parameter to be used only
used for SQL authentication; if not present, Windows authentication is used instead.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the database name which is to be used for this Translation Service instance.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the database server which is to be used for this Translation Service instance.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableBinaryFileScan
Determines whether Gatekeeper is run on binary files.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableAllFileExtensions
Enables all file extensions for the Machine Translation Service application.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer
Specifies the SQL server instance that will be used as a backup to the primary SQL Server instance.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the instance of the Machine Translation service to set.
The type must be a valid URL in the form, https://server_name or a valid GUID (for example, 12345678-90ab-
cdef-1234-567890bcdefgh).

Type: TranslationServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-JobExpirationDays
Specifies the amount of days after which completed jobs can be automatically removed from the Machine
Translation Service queue database.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-KeepAliveTimeout
Specifies the length of time (in seconds) that the worker can be inactive before it is automatically stopped.
The valid values are 60 to 600. The default value is 60.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MachineTranslationAddress
Specifies the service URL the service application will use to call the translation provider. For example,
https://api.microsofttranslator.com/v2/soap.svc

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MachineTranslationCategory
Specifies the category which will be used by the service when calling the translation provider.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MachineTranslationClientId
Specifies the AppId which will be used by the service when calling the translation provider.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumBinaryFileSize
Specifies the maximum file size in kilobytes (KB ) which can be translated for file types which contain binary data.
The valid values are 100 to 524288. The default value is 51200.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumItemsPerDay
Specifies the maximum number of items which can be added to the job queue in a 24-hour period. A value of zero
indicates no limit.
The valid values are 1000 to 1000000. A value of zero indicates no limit. The default value is zero.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumItemsPerPartitionPerDay
Specifies the maximum number of items which can be added to the job queue in a 24-hour period per partition. A
value of zero indicates no limit.
The valid values are 1000 to 1000000. A value of zero indicates no limit. The default value is zero.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumSyncTranslationRequests
Specifies the maximum number of items which can be added to the sync queue. A valid of zero indicates no limit.
The valid values are 0 to 300. The default value is 10.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumTextFileSize
Specifies the maximum file size in kilobytes (KB ) which can be translated for file types which contain mostly text
data. The valid values are 100 to 15360. The default value is 5120.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumTranslationAttempts
Specifies the maximum number of attempts an unsuccessful job is tried before it is marked as Failed.
The valid values are 1 to 10. The default value is 2.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumTranslationTime
Specifies the maximum length of time (in minutes) that a translation can take.
The valid values are 60 to 3600. The default value is 600.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumWordCharacterCount
Specifies the maximum character count for a Microsoft Word document which can be translated.
The valid Int values are 10000 to 10000000. The default value is 500000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecycleProcessThreshold
Specifies the number of documents which are translated before a Translation Worker process is recycled.
The valid values are 1 to 1,000. The default value is 100.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveEnabledFileExtensions
Comma delimited list of file extensions that you want to remove from the set of enabled file extensions for the
Machine Translation Service application.
To return a list of supported file extensions, type
[Microsoft.Office.TranslationServices.TranslationService]::EnumerateFileExtensions().
Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimerJobFrequency
Specifies the frequency (in minutes) with which the timer job for this service application runs. The valid values are
1 to 59. The default value is 15 minutes.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TotalActiveProcesses
Specifies the number of Translation Workers which are simultaneously running on a single machine.
The valid values are 1 to 5. The default value is 1.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TranslationsPerInstance
Specifies the number of translations dispatched to each service instance every time the timer job is run.
Valid values are 1 to 1,000. The default value is 200.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseDefaultInternetSettings
Determines whether the service application will use default Internet settings for the user service account to connect
to the translation provider.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WebProxyAddress
Specifies the web proxy address and port that the service application will use to connect to the translation provider.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPTranslationServiceApplication
New -SPTranslationServiceApplicationProxy
Set-SPTranslationServiceApplicationProxy
minutes to read • Edit Online

Set-SPTranslationServiceApplicationProxy
In ths Article

Sets properties to the Machine Translation service application proxy.

Syntax
Set-SPTranslationServiceApplicationProxy [-Identity] <TranslationServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup] [-MaximumGroupSize <Int32>]
[-MaximumItemCount <Int32>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPTranslationServiceApplicationProxy cmdlet to set properties on a Machine Translation service
application proxy in the farm.

Examples
-------------EXAMPLE---------

Set-SPTranslationServiceApplicationProxy TranslationServiceProxy -DefaultProxyGroup

This example adds the Machine Translation Service application proxy named TranslationServiceProxy to the default
proxy group.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies that the Machine Translation Service application proxy be added to the default proxy group for the local
farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID of the service application proxy.
The type must be a valid GUID in the form, 12345678-90ab-cdef-1234-567890bcdefgh.

Type: TranslationServiceApplicationProxyPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-MaximumGroupSize
Maximum number of bytes the proxy will send to the service in a single request. The valid values are 131072 to
10485760. The default value is 2097152.
We do not recommend use of this parameter.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumItemCount
Maximum number of documents to be translated that the proxy will send to the service in a single request. The
valid values are 1 to 40960. The default value is 9000.
We do not recommend use of this parameter.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPTranslationServiceApplication
New -SPTranslationServiceApplicationProxy
Set-SPTranslationServiceApplication
minutes to read • Edit Online

Set-SPTranslationThrottlingSetting
In ths Article

Sets the timer job duration.

Syntax
Set-SPTranslationThrottlingSetting [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-SiteQuota <Int32>] [-TenantQuota <Int32>] [-WhatIf] [<CommonParameters>]

Description
Use the Set-SPTranslationThrottlingSetting cmdlet to set the timer job duration for each site collection.

Examples
-----------------EXAMPLE--------------------

Set-SPTranslationThrottlingSetting -SiteQuota 300 -TenantQuota 600

This limits the Translation Timer job to spend no more than 300 seconds (5 minutes) per site collection, and no
more than 600 seconds (10 minutes) per tenant.
Note: TenantQuota must be greater than or equal to SiteQuota.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteQuota
The duration (in seconds) of timer job processing time that an individual SPSite is limited to

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TenantQuota
The duration (in seconds) of timer job processing time that an individual tenant is limited to.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Set-SPTrustedIdentityTokenIssuer
In ths Article

Sets the identity providers of a Web application.

Syntax
Set-SPTrustedIdentityTokenIssuer [-Identity] <SPTrustedIdentityTokenIssuerPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-ClaimProvider <SPClaimProviderPipeBind>]
[-ClaimsMappings <SPClaimMappingPipeBind[]>] [-Description <String>]
-ImportTrustCertificate <X509Certificate2> [-Realm <String>] [-SignInUrl <String>] [-UseWReply] [-Confirm]
[-RegisteredIssuerName <String>] [-WhatIf] [<CommonParameters>]

Set-SPTrustedIdentityTokenIssuer [-Identity] <SPTrustedIdentityTokenIssuerPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-ClaimProvider <SPClaimProviderPipeBind>]
[-ClaimsMappings <SPClaimMappingPipeBind[]>] [-Description <String>] -MetadataEndPoint <Uri> [-Realm <String>]
[-SignInUrl <String>] [-UseWReply] [-Confirm] [-RegisteredIssuerName <String>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPTrustedIdentityTokenIssuer cmdlet sets the identity providers of a Web application or extended Web
application. For the ASP.NET Membership provider and Role provider, this cmdlet changes the identity provider
only if the result is piped to a variable and passed to a Web application. For security token service (STS ) identity
providers, this cmdlet changes the persisted identity provider object in the SPFarm object.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------------EXAMPLE 1----------------------

Set-SPTrustedIdentityTokenIssuer "LiveIDSTS" -Certificate (Get-ChildItem"cert:Certificates


(LocalComputer)\Personal\Certificates -Name "LiveID Cert")

This example sets the identity provider to LiveIDSTS.


-------------------------EXAMPLE 2----------------------

C:\PS>$ip = @( (Get-SPTrustedIdentityTokenIssuer "LiveID STS"), (New-SPTrustedIdentityTokenIssuer -


ASPNetMembershipProvider "myMembershipProvider" -ASPNetRoleProvider "myRoleProvider"), (Get-
SPTrustedIdentityTokenIssuer "NTLM")) )
New-SPWebApplication https://contoso.com -IdentityProvider $ip

This example sets the identity provider using the .ASPNetMembership and Role parameters. When these
parameters are used, a variable must be set; otherwise, the values do not take effect.
Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClaimProvider
Specifies the IP STS that can resolve and search claims for claims people picker.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a claim
provider (for example, MyIDprovider1); or an instance of a valid SPClaimProvider object.

Type: SPClaimProviderPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ClaimsMappings
Specifies the mapping of the claims from the original token to the SharePoint token.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a claim
mapping rule (for example, Email); or an instance of a valid SPClaimMapping object.

Type: SPClaimMappingPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the new identity provider.
The type must be a valid string; for example, LiveID STS.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the identity provider to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of identity
provider (for example, LiveID STS ); or an instance of a valid SPIdentityProvider object.

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ImportTrustCertificate
Specifies the X.509 certificate object from trusted authentication provider farm.
The type must be a name of a valid X.509 certificate; for example, Certificate1.

Type: X509Certificate2
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MetadataEndPoint

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Realm
Specifies the realm, or resource partition, associated with this trust.
The type must be a name of a valid realm; for example, MD_REALM.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegisteredIssuerName
{{Fill RegisteredIssuerName Description}}

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignInUrl
Specifies the sign-in URLs for this trusted identity provider STS.
The type must be a valid URL, in the form https://int.live.com/.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseWReply
Includes a WReply with the token request. Wreply is a URL at the relying party to which the requestor is redirected
once sign-out processing is complete.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPTrustedRootAuthority
In ths Article

Creates a new trusted root authority.

Syntax
Set-SPTrustedRootAuthority [-Identity] <SPTrustedRootAuthorityPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Certificate <X509Certificate2>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Set-SPTrustedRootAuthority [-Identity] <SPTrustedRootAuthorityPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-MetadataEndPoint <Uri>] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPTrustedRootAuthority cmdlet creates a new trusted root authority. If a certificate file is used, the
certificate must be an X509 certificate without private keys, otherwise an exception is raised.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

C:\PS>$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2


$cert.Import('C:\LiveIDSigningCert.pfx')
Get-SPTrustedRootAuthority -Name "WFEFarm1" | Set-SPTrustedRootAuthority -Certificate $cert

This example updates the certificate of the trusted root authority WFEFarm1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Certificate
Specifies the X.509 certificate of the trusted root authority.
The type must be a name of a valid X.509 certificate; for example, Certificate1.

Type: X509Certificate2
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the trusted root authority to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a trusted
root authority (for example, WFEFarm1); or an instance of a valid SPTrustedRootAuthority object.

Type: SPTrustedRootAuthorityPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MetadataEndPoint
{{Fill MetadataEndPoint Description}}

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPTrustedSecurityTokenIssuer
In ths Article

Sets the trusted token issuer.

Syntax
Set-SPTrustedSecurityTokenIssuer [-Identity] <SPTrustedSecurityTokenServicePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Certificate <X509Certificate2>] [-Confirm]
[-Description <String>] [-IsTrustBroker] [-RegisteredIssuerName <String>] [-WhatIf] [<CommonParameters>]

Set-SPTrustedSecurityTokenIssuer [-Identity] <SPTrustedSecurityTokenServicePipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Description <String>] [-IsTrustBroker]
[-MetadataEndPoint <Uri>] [-RegisteredIssuerName <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Set-SPTrustedSecurityTokenIssuer cmdlet to set the trusted token issuer.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE--------------------

C:\PS>$a=Get-SPTrustedSecurityTokenIssuer

Set-SPTrustedSecurityTokenIssuer -Identity $a -MetadataEndpoint https:///_layouts/15/metadata/json/1/

This example sets the metadata endpoint of the url for the self-issue.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Certificate
Specifies the X509Certificate object that represents the public key of the signing certificate of the security token
issuer.

Type: X509Certificate2
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the issuer.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the id of the SPTrustedSecurityTokenIssuer object to be set.

Type: SPTrustedSecurityTokenServicePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsTrustBroker
Specifies whether the trust is established with a self-issuer partner app (that is, Exchange Server or Lync).

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MetadataEndPoint
Specifies the URI for the metadata endpoint of the issuer.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RegisteredIssuerName

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPTrustedSecurityTokenIssuer
New -SPTrustedSecurityTokenIssuer
Remove-SPTrustedSecurityTokenIssuer
minutes to read • Edit Online

Set-SPTrustedServiceTokenIssuer
In ths Article

Updates a trust with the farm.

Syntax
Set-SPTrustedServiceTokenIssuer [-Identity] <SPTrustedServiceTokenIssuerPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Certificate <X509Certificate2>] [-Description <String>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Set-SPTrustedServiceTokenIssuer [-Identity] <SPTrustedServiceTokenIssuerPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Description <String>] [-Confirm] [-MetadataEndPoint <Uri>]
[-WhatIf] [<CommonParameters>]

Description
The Set-SPTrustedServiceTokenIssuer cmdlet updates a trust with a SharePoint farm. If a certificate file is used, it
must have only one X509 certificate without private keys, otherwise an exception is raised.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

C:\PS>$cert = Get-PfxCertificate C:\LiveIDSigningCert.pfx


Set-SPTrustedServiceTokenIssuer "WFEFarm1" - Description "WFE Farm 1" - ImportTrustCertificate $cert

This example updates a SharePoint Farm trust using the trust certificate from a file.
------------------EXAMPLE 2------------------

Set-SPTrustedServiceTokenIssuer "WFEFarm1" - Description "WFE Farm 1" -FederationMetadataUrl


"https://liveid.com/STS/2007/03/fedmetadata.xml"

This example updates a SharePoint farm trust using the trust certificate from the federation metadata endpoint
URL.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Certificate
Specifies the X.509 certificate object from trusted authentication provider farm.
The type must be a name of a valid X.509 certificate; for example, Certificate1.

Type: X509Certificate2
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies a description for the trust.
The type must be a valid string; for example, WFE Farm Trust1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the trusted service token issuer to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a trusted
service token issuer (for example, WFEFarm1); or an instance of a valid SPTrustedRootAuthority object.
Type: SPTrustedServiceTokenIssuerPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MetadataEndPoint
{{Fill MetadataEndPoint Description}}

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPUsageApplication
In ths Article

Sets properties of a usage application.

Syntax
Set-SPUsageApplication [-Identity] <SPUsageApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseName <String>]
[-DatabasePassword <SecureString>] [-DatabaseServer <String>] [-DatabaseUsername <String>] [-EnableLogging]
[-FailoverDatabaseServer <String>] [-UsageService <SPUsageServicePipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPUsageApplication cmdlet sets properties of a usage application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE----------------------

Set-SPUsageApplication -Identity "Usage and Health data collection" -DatabaseServer "Server Name" -DatabaseName
"New Logging DB"

This example changes the database server and database name used by the usage logging service to store logging
data.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the logging database.
The type must be a valid name of a SQL Server database; for example, UsageLogDB1.
If the logging database does not exist, a logging database will be automatically created.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabasePassword
Specifies the password for the user specified in DatabaseUserName. Use this parameter only if SQL Server
Authentication is used to access the logging database.
The type must be a valid password.

Type: SecureString
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the database specified in DatabaseName.
The type must be a valid SQL Server host name; for example, SQLServerHost1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseUsername
Specifies the user name to use for connecting to the logging database. Use this parameter only if SQL Server
Authentication is used to access the logging database.
The type must be a valid user name; for example, UserName1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EnableLogging
Specifies that this usage application collects usage data.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FailoverDatabaseServer

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the usage application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh, a valid name of a usage
application (for example; UsageApp1); or an instance of a valid SPServiceApplication object.

Type: SPUsageApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UsageService
Specifies the SPUsageService object that is the parent of the usage application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage
service (for example, UsageService1); or an instance of a valid SPUsageService object.

Type: SPUsageServicePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPUsageDefinition
In ths Article

Sets the retention period for a usage provider.

Syntax
Set-SPUsageDefinition [-Identity] <SPUsageDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-DaysRetained <Int32>] [-DaysToKeepUsageFiles <Int32>] [-Enable] [-MaxTotalSizeInBytes <Int64>]
[-WhatIf] [-UsageDatabaseEnabled] [<CommonParameters>]

Description
The Set-SPUsageDefinition cmdlet sets the retention period for a specified usage provider. A usage definition
object defines a specific type of usage provider.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE--------------------

Set-SPUsageDefinition -Identity "Page Requests" -DaysRetained 31

This example sets the number of days that stores page requests usage data to 31.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DaysRetained
Specifies the number of days that usage data for the usage provider is retained in the usage service database. The
default value is 14.
The type must be an integer between 0 and 31.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DaysToKeepUsageFiles
Specifies the number of days to keep usage file retention. The value must be less than or equal to value of the
DaysRetained parameter.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Enable
Turns on the specified usage provider.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the usage definition object to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage
definition (for example, SiteSubscriptionConfig1); or an instance of a valid SPUsageDefinition object.
Type: SPUsageDefinitionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MaxTotalSizeInBytes

Type: Int64
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UsageDatabaseEnabled
{{Fill UsageDatabaseEnabled Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPUsageService
In ths Article

Updates the properties of a usage service.

Syntax
Set-SPUsageService [[-Identity] <SPUsageServicePipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-LoggingEnabled <Boolean>] [-UsageLogCutTime <UInt32>] [-UsageLogLocation <String>]
[-UsageLogMaxFileSizeKB <UInt32>] [-UsageLogMaxSpaceGB <UInt32>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPUsageService cmdlet updates the properties of a usage service. If the Identity parameter is not specified,
the cmdlet applies the changes to the local usage service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-----------------

Set-SPUsageService -LoggingEnabled $false

Set-SPUsageService -UsageLogLocation "D:\\testusagelogdir"

Set-SPUsageService -UsageLogCutTime 5

The examples disables usage logging, changes the directory where usage files are stored and creates a new usage
log file every 5 minutes.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the usage service to update.
The type must be in one of the following forms:
--A valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh --A valid name of a usage service (for
example, UsageService1) --An instance of a valid SPUsageService object.

Type: SPUsageServicePipeBind
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LoggingEnabled
Specifies that usage data is logged to usage files.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UsageLogCutTime
Specifies the time, in minutes, of usage data that is collected per usage log file. The default time is 5 minutes.
The value must be an integer in the range of 1 to 1440.
Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UsageLogLocation
Specifies the path on every computer in the farm where usage log files are created.
The value must be a valid local path in the following form:
C:\folder_name

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UsageLogMaxFileSizeKB
Specifies the maximum size of a single usage file that is applied to all the usage providers.
The minimum value is 512 kilobytes (KB ) and the maximum value is 65536 KB.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UsageLogMaxSpaceGB
The parameter is not used in SharePoint Server.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPUser
In ths Article

Configures properties of an existing user.

Syntax
Set-SPUser [-Identity] <SPUserPipeBind> [-AddPermissionLevel <String[]>]
[-AssignmentCollection <SPAssignmentCollection>] [-ClearPermissions] [-Confirm] [-DisplayName <String>]
[-Email <String>] [-Group <SPGroupPipeBind>] [-IsSiteCollectionAdmin] [-PassThru]
[-RemovePermissionLevel <String[]>] [-SyncFromAD] [-Web <SPWebPipeBind>] [-WhatIf] [<CommonParameters>]

Description
The Set-SPUser cmdlet configures properties of an existing user.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Set-SPUser -Identity 'Contoso\jdoe' -Web https://intranet.contoso.com -AddPermissionLevel "Contributor"

This example sets a user (Contoso\jdoe) to be a contributor on https://intranet.contoso.com.


------------------EXAMPLE 2-----------------------

Set-SPUser -Identity 'Contoso\jdoe' -Web https://intranet.contoso.com -SyncFromAD

This updates the User Information List for the user 'contoso\jdoe' with the current displayName and mail attribute
values from the user's Active Directory account.

Parameters
-AddPermissionLevel
Specifies the permission level to add to the user.
The value must be one of the following options:
--Contribute
Can view, add, update and delete list items and documents.
--Design
Can view, add, update, delete, approve and customize documents.
--Full Control
Has full control for all documents.
--Limited Access
Can view specific lists, document libraries, list items, folders, or documents when permissions are granted.
--Read
Can view pages and list items and download documents.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClearPermissions
Deletes all assigned permissions from the user. If Clear and Add values exist, permissions are first cleared and then
new permissions are added.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisplayName
Specifies the new display name of the user.
The type must be a valid name.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email
Specifies the new email address of the user.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Group
Adds the user to an existing group in the given site.

Type: SPGroupPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID, login name, or SPUser object of the user to be returned.
The type must be a GUID of an existing user in the form, 1234-5678-9876-0987.

Type: SPUserPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IsSiteCollectionAdmin
Specifies whether to set the user as a site collection administrator.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru
If not provided, indicates that this cmdlet has no output. If provided, this parameter indicates that the SPUser
object for this user is to be returned.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemovePermissionLevel
Removes the permission level from the user.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SyncFromAD
If provided, specifies that user information will be synchronized from the user directory store. This switch only
retrieves the displayName and mail value from the directory store. It supports Active Directory (Classic or
Windows authentication), Forms-based Authentication, and SAML. FBA and SAML providers must support
resolving from their directory store for this switch to work. The switch only supports SharePoint User objects.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Web
Specifies the name of the URL or GUID to be used as a scope. This parameter is not needed if the SPUser object is
provided as the identity.
The value must be an authentic URL, in the form https://server_name, or GUID, in the form 1234-5678-9807.
Type: SPWebPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPVisioExternalData
In ths Article

Configures settings related to external data connections for a Visio Services application.

Syntax
Set-SPVisioExternalData -UnattendedServiceAccountApplicationID <String>
-VisioServiceApplication <SPVisioServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Set-SPVisioExternalData cmdlet sets and configures settings for external data connections for the Visio
Services application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------------EXAMPLE-----------------------

Set-SPVisioExternalData -VisioServiceApplication "VGS1" -UnattendedServiceAccountApplicationID "SSSApp1"

This example sets the unattended service account application ID to SSSApp1 for the Visio Services application
named VGS1.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-UnattendedServiceAccountApplicationID
Specifies the target application ID in the registered secure store service that is used to reference unattended
service account credentials. The unattended service account is a single account that all documents can use to
refresh data. It is required when connecting to external data sources.
The type must be a valid value less than or equal to 256 characters. The application ID must be registered in the
secure store service application or an error message will be displayed.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VisioServiceApplication
Specifies the Visio Services application that contains the SPVisioExternalData object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.

Type: SPVisioServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPVisioPerformance
In ths Article

Sets performance properties for a Visio Services application.

Syntax
Set-SPVisioPerformance -MaxDiagramCacheAge <Int32> -MaxDiagramSize <Int64> -MaxRecalcDuration <Int32>
-MinDiagramCacheAge <Int32> -VisioServiceApplication <SPVisioServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] -MaxCacheSize <Int64> [<CommonParameters>]

Description
The Set-SPVisioPerformance cmdlet sets properties related to performance for a Visio Services application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE 1----------------------

Set-SPVisioPerformance -VisioServiceApplication "VGS2" -MaxDiagramSize 10 -MaxRecalcDuration 120 -


MinDiagramCacheAge 1 -MaxDiagramCacheAge 4

This example changes settings that are related to performance for a Visio Services application.
-------------------EXAMPLE 2----------------------

Set-SPVisioPerformance -VisioServiceApplication "VGS2" -MaxDiagramSize 10

This example changes settings that are related to performance for a Visio Services application. Note that only one
setting value is specified. The cmdlet prompts you for the other parameter values.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MaxCacheSize
{{Fill MaxCacheSize Description}}

Type: Int64
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxDiagramCacheAge
Specifies the time, in minutes, after which cached items are purged. This value affects memory use on the server. A
large cache age slows the rate at which diagrams can be refreshed by users and reduces CPU and memory use of
the server. The default value is 60 minutes.
The type must be an integer in the range of 0 to 34560 (24 days).

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxDiagramSize
Specifies the maximum size, in megabytes, of a diagram that can be opened by the Visio Services application. The
default value is 5.
The type must be an integer in the range of 1 to 50.

Type: Int64
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxRecalcDuration
Specifies the maximum time, in seconds, that a diagram can only be recalculated by the Visio Services application.
Diagram recalculation operations that take longer than this number of seconds are canceled by the service. A low
value increases performance by allowing only simple diagrams to be processed by the server, which minimizes
CPU and memory use. A larger value allows the recalculation of more complex diagrams while using more CPU
cycles and memory.
The type must be a valid integer value in the range of 1 to 120 seconds (2 minutes). The default value is 60
seconds.
Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinDiagramCacheAge
Specifies the minimum time, in minutes, a diagram is cached in memory. This value affects memory use on the
server. A small value allows users to refresh their diagrams more often, but will increase memory and CPU load of
the server. The default value is 5.
The type must be an integer in the range of 0 to 34560 (24 days).

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VisioServiceApplication
Specifies the Visio Services application that contains the SPVisioPerformance object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.

Type: SPVisioServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPVisioSafeDataProvider
In ths Article

Specifies a description of a safe data provider for a Visio Services application.

Syntax
Set-SPVisioSafeDataProvider -DataProviderId <String> -DataProviderType <Int32> -Description <String>
-VisioServiceApplication <SPVisioServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Set-SPVisioSafeDataProvider cmdlet sets the Description property of a safe data provider for a Visio Services
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------------EXAMPLE 1----------------------

Set-SPVisioSafeDataProvider -VisioServiceApplication "VGS1" -DataProviderID "SQLOLEDB" -DataProviderType 1 -


Description "SQL OLEDB Driver!"

This example sets the description property of a safe data provider for a specific Visio Services application.
-------------------EXAMPLE 2----------------------

Get-SPVisioServiceApplication -Identity "VGS1" | Set-SPVisioSafeDataProvider -DataProviderID "SQLOLEDB" -


DataProviderType 1 -Description "SQL OLEDB Driver!"

This example sets the Description property of a safe data provider for a specific Visio Services application. The
result is piped from the Set-SPVisioSafeDataProvider cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DataProviderId
Specifies the name of the data provider to update. The combination of DataProviderID and DataProviderType
uniquely identifies a data provider for a Visio Services application. The string that identifies the data provider can
be a maximum of 255 alphanumeric characters. Custom data types are supported; for example, Excel Services.
The type must be a valid string that identifies the data provider.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DataProviderType
Specifies the supported type of the data provider to get. Custom data types are supported; for example, Excel
services.
The type must be a valid identity of a data provider type.

Type: Int32
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the description of the safe data provider to set.
The type must be a string with a maximum of 4096 characters.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VisioServiceApplication
Specifies the Visio Services application that contains the SPVisioSafeDataProvider object.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.
Type: SPVisioServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPVisioServiceApplication
In ths Article

Sets the ServiceApplicationPool property for a Visio Services application.

Syntax
Set-SPVisioServiceApplication [-Identity] <SPVisioServiceApplicationPipeBind>
[-ServiceApplicationPool] <SPIisWebServiceApplicationPoolPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Set-SPVisioServiceApplication cmdlet sets the ServiceApplicationPool property for a Visio Services
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE 1----------------------

Set-SPVisioServiceApplication -identity "VGS1" -ServiceApplicationPool "SharePoint Web Services System Default"

This example changes the application pool of the VGS1 service application.
-----------------EXAMPLE 2----------------------

Get-SPServiceApplicationPool "SharePoint Web Services Default" | Set-SPVisioServiceApplication VGS1

This example changes the application pool of the VGS1 service application. The results are piped from the
Get-SPServiceApplicationPool cmdlet.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Visio Services application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Visio
Services application (for example, MyVisioService1); or an instance of a valid SPVisioServiceApplication object.

Type: SPVisioServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServiceApplicationPool
Specifies the IIS application pool to change. The Web service for the service application runs in the specified
application pool.
The type must be a valid name of a Visio Service application pool, such as MyVisioServiceAppPool1; or a valid
GUID, such as 12345678-90ab-cdef-1234-567890bcdefgh, or an instance of a valid
SPIisWebServiceApplicationPoolPipeBind object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPWeb
In ths Article

Configures the specified subsite.

Syntax
Set-SPWeb [-Identity] <SPWebPipeBind> [-Description <String>] [-RelativeUrl <String>] [-Theme <String>]
[-Template <SPWebTemplatePipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPWeb cmdlet configures the subsite specified by the Identity parameter. Settings for any parameters that
are not provided are not changed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Get-SPWeb https://sitename/subweb | Set-SPWeb -Description "My Site Description"

This example sets the description of an existing subsite.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description
Specifies the new description of the Web.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
The URL of the Web or SPWeb object that represents the Web.
The type must be a valid URL, in the form https://server_name, or an SPWeb object.

Type: SPWebPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RelativeUrl
Specifies the new relative URL for the Web. This is the URL path after the site collection URL.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Template
Specifies the new template to apply to the Web. This cannot be done if the template is already applied.

Type: SPWebTemplatePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Theme
Specifies the new theme to apply to the Web.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPWebApplication
In ths Article

Configures the specified Web application.

Syntax
Set-SPWebApplication [-Identity] <SPWebApplicationPipeBind> [-OutgoingEmailAddress <String>]
[-ReplyToEmailAddress <String>] -SMTPServer <String> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Force] [-WhatIf] [-DisableSMTPEncryption] [-NotProvisionGlobally] [-SMTPServerPort <Int32>]
[<CommonParameters>]

Set-SPWebApplication [-Identity] <SPWebApplicationPipeBind> -Zone <SPUrlZone>


[-AdditionalClaimProvider <SPClaimProviderPipeBind[]>] [-AssignmentCollection <SPAssignmentCollection>]
[-AuthenticationMethod <String>] [-AuthenticationProvider <SPAuthenticationProviderPipeBind[]>] [-Confirm]
[-Force] [-SignInRedirectProvider <SPTrustedIdentityTokenIssuerPipeBind>] [-SignInRedirectURL <String>]
[-WhatIf] [-NotProvisionGlobally] [<CommonParameters>]

Set-SPWebApplication [-Identity] <SPWebApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]


[-Confirm] [-DefaultQuotaTemplate <String>] [-DefaultTimeZone <Int32>] [-Force]
[-ServiceApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-WhatIf] [-NotProvisionGlobally]
[<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Set-SPWebApplication cmdlet configures the Web application specified by the Identity parameter. For any
settings that are zone-specific (for the Zone parameter set), the zone to configure must be provided. The provided
zone must already exist.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Get-SPWebApplication http://somesite | Set-SPWebApplication -Zone "Extranet" -HostHeader


"http://www.contoso.com" - AllowAnonymousAccess

This example sets the HostHeader URL for the Extranet zone of the given Web application as
http://www.contoso.com and enables anonymous access.
Parameters
-AdditionalClaimProvider
Adds a specific claim provider to the defined Web application.

Type: SPClaimProviderPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AuthenticationMethod
Use to set a Web application to classic Windows authentication. The valid values are NTLM or Kerberos.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthenticationProvider
Defines the authentication provider(s) that applies to the Web application.

Type: SPAuthenticationProviderPipeBind[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultQuotaTemplate
Specifies the new default site quota template for this Web application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultTimeZone
Specifies the default time zone for new site collections in this Web application.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableSMTPEncryption
{{Fill DisableSMTPEncryption Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Suppresses confirmation messages involved in settings for a Web application.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name or URL of the Web application.
The type must be a valid name, in the form WebApplication-1212, or URL, in the form
http://server_name/WebApplicaiton-1212.
Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NotProvisionGlobally
{{Fill NotProvisionGlobally Description}}

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutgoingEmailAddress
Specifies the new outgoing e-mail address for e-mail messages sent from this Web application. The type must be a
valid address; for example, someone@example.com.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReplyToEmailAddress
Configures the reply e-mail address.
The type must be a valid address; for example, someone@example.com.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplicationProxyGroup
Specifies a custom service application proxy group for the Web application to use. The Web application will use the
proxies in this proxy group to connect to service applications. If this parameter is not specified, the farm's default
proxy group is used.

Type: SPServiceApplicationProxyGroupPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignInRedirectProvider
Sets the sign-in redirect URL to point to the URL that is defined in the specified authentication provider.

Type: SPTrustedIdentityTokenIssuerPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SignInRedirectURL
Specifies the sign-in redirect URL for the Web application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SMTPServer
Specifies the new outbound SMTP server that this Web application will use.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SMTPServerPort
{{Fill SMTPServerPort Description}}

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
When configuring zone-specific settings, the zone to configure must be specified. This zone must already exist.
The type must be any one of the following values: Default, Intranet, Internet, Extranet, or Custom.

Type: SPUrlZone
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPWebApplicationHttpThrottlingMonitor
In ths Article

Sets the Health Score bucket values for an existing network throttling performance counter for a specified Web
application.

Syntax
Set-SPWebApplicationHttpThrottlingMonitor [-Identity] <SPWebApplicationPipeBind> [-Category] <String>
[-Counter] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-HealthScoreBuckets <Double[]>] [-Instance <String>] [-IsDESC] [-LowerLimit <Double>] [-UpperLimit <Double>]
[-WhatIf] [<CommonParameters>]

Description
The Set-SPWebApplicationHttpThrottlingMonitor cmdlet sets the Health Score bucket values for an existing network
throttling performance counter for a specified Web application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

C:\PS>$buckets=(2000,1000,500,300,200,100,50,30,20,10)
Set-SPWebApplicationHttpThrottlingMonitor https://sharepoint -
Category Memory -Counter 'Available Mbytes' -IsDesc -HealthScoreBuckets $buckets

This example sets the Health Score bucket values for the Memory\Available Mbytes counter to the array listed for
the https://sharepoint Web application.
------------------EXAMPLE 2------------------

Set-SPWebApplicationHttpThrottlingMonitor https://sharepoint
0 -Category Memory -Counter 'Available Mbytes' -IsDesc -UpperLimit 3000

This example sets the upper limit for the Memory\Available Mbytes counter, the highest value in the Health Score
buckets, to 3000 for the https://sharepoint Web application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Category
Specifies the name of the performance counter category.
The type must be a valid performance counter category in the throttling monitor. Use the
Get-SPWebApplicationHttpThrottlingMonitor cmdlet to return a list of performance counter categories in the
throttling monitor.

Type: String
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Counter
Specifies the name of the performance counter.
The type must be a valid performance counter in the throttling monitor. Use the
Get-SPWebApplicationHttpThrottlingMonitor cmdlet to return a list of performance counters in the throttling
monitor.

Type: String
Required: True
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HealthScoreBuckets
Specifies bucket ranges to use in determining the calculation of the server Health Score for this counter.

Type: Double[]
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Identity
Specifies the SharePoint Web application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Instance
Specifies the instance of the performance counter. The default value is empty. If the specified value is invalid, this
cmdlet will not run.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IsDESC
Specifies that this counter is interpreted in descending order.
If this parameter is set, Health Score bucket values are interpreted in descending order; for example, set this
parameter by using the Memory category and Available Mbytes counter to monitor available memory.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LowerLimit
Specifies the lower limit of the numerical threshold of the specified performance counter. The lower limit is the
lowest value in the Health Score bucket values.
Type: Double
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UpperLimit
Specifies the upper limit of the numerical threshold of the specified performance counter. The upper limit is the
highest value in the Health Score bucket values.

Type: Double
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPWOPIBinding
In ths Article

Updates the default click action for an application or file name extension binding.

Syntax
Set-SPWOPIBinding [-Identity] <SPWopiBindingPipeBind> [-DefaultAction]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Set-SPWOPIBinding cmdlet updates the default click action for an application or file name extension binding.
For example, you can set the default click action to view for a Word document in a SharePoint library. To do this,
you set the default action to true for the "view"-"Word" bindings.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPWOPIBinding -Action "view" -Application "Word"| Set-SPWOPIBinding -DefaultAction:$true

This example sets the default click action to view for a Word document in a SharePoint library. You can verify that
the default click action is set to view for Word by running the cmdlet
Get-SPWOPIBinding -Action "view" -Application "Word" . The IsDefaultAction value is set to "True."

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters .

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultAction
Specifies whether the binding should be set as the default click action for an application or file name extension in
the binding.

Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the binding.

Type: SPWopiBindingPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters .

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013

Get-SPWOPIBinding
Remove-SPWOPIBinding
New -SPWOPIBinding
minutes to read • Edit Online

Set-SPWOPIZone
In ths Article

Configures the zone that the current SharePoint farm will use to navigate the browser to the WOPI application.

Syntax
Set-SPWOPIZone [[-Zone] <String>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Set-SPWOPIZone cmdlet configures the zone that the current SharePoint farm will use to navigate the browser
to the WOPI application (such as a server that runs Office Web Apps Server). The SharePoint Server page in the
browser creates a frame that contains a page on the WOPI application. The zone for the URL of the WOPI
application page is determined by this setting.
If you do not set the zone, the default is "internal-HTTPS." If you select a zone that is not supported by the WOPI
application, Office Web Apps will not work. Only use HTTP when you are on a fully secure network that uses
IPSEC (full encryption) or in a test environment that does not contain sensitive data.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Set-SPWOPIZone -Zone "external-https"

This example configures the current SharePoint farm to use external connections through HTTPS to the WOPI
application (such as a server that runs Office Web Apps Server).

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters .

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters .

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Zone
Specifies the zone. For a list of zones that the WOPI application supports, run Get-SPWOPIBinding .

If you have a SharePoint farm that's internal and external, specify external. If you have a SharePoint farm that's
internal only, specify internal. Only use HTTP when you are on a fully secure network that uses IPSEC (full
encryption) or in a test environment that does not contain sensitive data. The options are as follows:
Internal-HTTP
Internal-HTTPS
External-HTTP
External-HTTPS

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013

Get-SPWOPIZone
minutes to read • Edit Online

Set-SPWordConversionServiceApplication
In ths Article

Sets properties of a Word Automation Services application.

Syntax
Set-SPWordConversionServiceApplication [-Identity] <WordServiceApplicationPipeBind> [-ActiveProcesses <Int32>]
[-AddSupportedFormats <String[]>] [-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-ClearSupportedFormats] [-Confirm]
[-ConversionsPerInstance <Int32>] [-ConversionTimeout <Int32>] [-DatabaseCredential <PSCredential>]
[-DatabaseName <String>] [-DatabaseServer <String>] [-DisableBinaryFileScan] [-DisableEmbeddedFonts]
[-KeepAliveTimeout <Int32>] [-MaximumConversionAttempts <Int32>] [-MaximumConversionTime <Int32>]
[-MaximumMemoryUsage <Int32>] [-RecycleProcessThreshold <Int32>] [-RemoveSupportedFormats <String[]>]
[-TimerJobFrequency <Int32>] [-WhatIf] [-MaximumGroupSize <Int32>] [-MaximumSyncConversionRequests <Int32>]
[<CommonParameters>]

Description
The Set-SPWordConversionServiceApplication cmdlet sets global properties of a Word Automation Services
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE-----------------

Get-SPServiceApplication -Name WordServices1 | Set-SPWordConversionServiceApplication -TimerJobFrequency 30

This example sets the timer job frequency of the WordServices1 application to 30 minutes.

Parameters
-ActiveProcesses
Specifies the number of conversion processes on each machine on which the service application runs. This value is
equivalent to the number of simultaneous conversions. The default value is 8.
The type must be a valid integer in the range from 1 to 1000.
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AddSupportedFormats
Specifies a set of file formats to be enabled for use by the service application.
The value must be a comma-delimited list of one or more of the following: docx, doc, mht, rtf, xml.

Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ApplicationPool
Specifies the existing IIS managed application pool in which this instance of Word Automation Services runs.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of an
application pool (for example, AppPoolName1); or an instance of a valid IISWebServiceApplicationPool object.

Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ClearSupportedFormats
Specifies that all file formats should be disabled for use by the service application.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConversionsPerInstance
Specifies the number of items sent to each conversion process (see the ActiveProcesses parameter description
earlier in this table) every time the timer job is run. The default value is 12.
The type must be a valid integer.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ConversionTimeout
Specifies the time, in minutes, after which a conversion that is marked InProgress is confirmed to be still running
each time the timer job runs and if necessary, the conversion is restarted. The default value is 5.
The type must be a valid integer in the range from 1 to 60.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseCredential
Specifies the credentials to use for connecting to the database for the Word Automation Services application. Use
this parameter only if SQL Authentication is used to access the service application database.
When the DatabaseCredential parameter is specified, the DatabaseName and DatabaseServer parameters are
required.
Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseName
Specifies the name of the database to use for this instance of the Word Automation Services application.
The type must be a valid SQL database name; for example, MetadataDB1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseServer
Specifies the name of the host server for the Word Automation Services database.
The type must be a valid SQL database server host name; for example, SQLServerHost1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableBinaryFileScan
Specifies whether additional checks are run when Word documents are processed. Turn this setting off only if all
documents processed by the service are trusted.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableEmbeddedFonts
Specifies whether embedded fonts are ignored when present in input documents.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Word Automation Services application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a Word
Automation Services application (for example, WordSvcApp1); or an instance of a valid SPServiceApplication
object.

Type: WordServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-KeepAliveTimeout
Specifies the length of time, in seconds, that a conversion can be non-responsive before it is terminated. The
default value is 30.
The type must be a valid integer in the range from 10 to 60.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumConversionAttempts
The maximum number of conversion attempts before a conversion is marked with status "Failed". The default value
is 2.
The type must be a valid integer in the range from 1 to 10.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumConversionTime
Specifies the maximum length of time, in seconds, that a conversion can run before it is terminated. The default
value is 300.
The type must be a valid integer in the range from 60 to MaxInt.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumGroupSize
{{Fill MaximumGroupSize Description}}
Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumMemoryUsage
Specifies the maximum percentage of system memory which can be used by the service application. The default
value is 100.
The type must be a valid integer in the range from 10 to 100.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaximumSyncConversionRequests
{{Fill MaximumSyncConversionRequests Description}}

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RecycleProcessThreshold
Specifies the number of documents which are converted before a conversion process is recycled. For additional
information about the conversion process, see the ActiveProcess parameter description earlier in this table.
The type must be a valid integer in the range from 1 to 1000.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RemoveSupportedFormats
Specifies a set of file formats to be disabled for use by the service application.
The value must be a comma delimited list of one or more of the following: docx, doc, mht, rtf, xml.
Type: String[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimerJobFrequency
Specifies the frequency, in minutes, with which the timer job for this service application runs. The default value is
15.
The type must be a valid integer in the range from 1 to 59.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPWorkflowConfig
In ths Article

Configures the workflow settings for the specified Web application.

Syntax
Set-SPWorkflowConfig [-SiteCollection] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-DeclarativeWorkflowsEnabled <Boolean>] [-EmailNoPermissionParticipantsEnabled <Boolean>]
[-SendDocumentToExternalParticipants <Boolean>] [-SingleWorkflowEpisodeTimeout <Int32>] [<CommonParameters>]

Set-SPWorkflowConfig [-WebApplication] <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-DeclarativeWorkflowsEnabled <Boolean>]
[-EmailNoPermissionParticipantsEnabled <Boolean>] [-SendDocumentToExternalParticipants <Boolean>]
[-SingleWorkflowEpisodeTimeout <Int32>] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Set-SPWorkflowConfig cmdlet to configure the workflow settings for the specified Web application.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Set-SPWorkflowConfig -webapplication https://sitename DeclarativeWorkflowsEnabled $true -


EmailNoPermissionParticipantsEnabled $true -SendDocumentToExternalParticipants $false

This example sets the workflow settings for the specified Web application to turn on declarative workflows, turn on
e-mail to participants who do not have permissions to the site and turn off the functionality to send e-mail
messages as attachments to external participants.
No return values. Use the Get-SPWorkflowConfig cmdlet to see values. To set farm-level workflow settings for
event-delivery time-out and to postpone threshold and batch size, use Set-SPFarmConfig .

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DeclarativeWorkflowsEnabled
Sets whether declarative workflows are allowed to run in the Web application.
The type must be either 1 for True or 0 for False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EmailNoPermissionParticipantsEnabled
Sets whether workflows send task e-mail messages to users who do not have permissions to the site in which the
workflows are running.
The type must be either 1 for True or 0 for False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SendDocumentToExternalParticipants
Sets whether workflows automatically send a copy of the document as an e-mail attachment to participants who
do not have access to the site or who are not in any linked directory other than Active Directory Domain Services
(AD DS ).

The type must be either 1 for True or 0 for False.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SingleWorkflowEpisodeTimeout
{{Fill SingleWorkflowEpisodeTimeout Description}}

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCollection
Specifies the name or URL of the site collection.
The only other parameter that is used with the SiteCollection parameter is the DeclarativeWorkflowsEnabled
parameter. No other parameters are used.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the name or URL of the Web application.
The type must be a valid name or GUID, in the form WebApplication-1212, or a URL, in the form
https://server_name/WebApplication-1212.

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Set-SPWorkManagementServiceApplication
In ths Article

Sets settings for the Work Management Service application.

Syntax
Set-SPWorkManagementServiceApplication [-Identity] <SPWorkManagementServiceCmdletPipeBind>
[-ApplicationPool <SPIisWebServiceApplicationPoolPipeBind>] [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-MinimumTimeBetweenProviderRefreshes <TimeSpan>] [-MinimumTimeBetweenSearchQueries <TimeSpan>]
[-Name <String>] [-WhatIf] [-MinimumTimeBetweenEwsSyncSubscriptionSearches <TimeSpan>]
[-NumberOfSubscriptionSyncsPerEwsSyncRun <UInt32>] [-NumberOfUsersEwsSyncWillProcessAtOnce <UInt32>]
[-NumberOfUsersPerEwsSyncBatch <UInt32>] [<CommonParameters>]

Description
Use the Set-SPWorkManagementServiceApplication cmdlet to set settings (that is, minimum time between refreshes
for aggregating tasks and load per machine for synchronization with Exchange) for the specified Work
Management Service Application by using the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE---------------

C:\PS>$wmservice = Get-SPServiceApplication -Name "Work Management Service Application"

C:\PS>$refreshTime = New-Timespan -Minutes 10

Set-SPWorkManagementServiceApplication -Identity $wmservice -MinimumTimeBetweenProviderRefreshes $refreshTime

This example sets the minimum time between provider refreshes to 10 minutes on the service application named
"Work Management Service Application".

Parameters
-ApplicationPool
Specifies the name of an application pool to use; for example, SharePoint - 1213. If no value is specified, the default
application pool is used.
Type: SPIisWebServiceApplicationPoolPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the service application to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription settings service application (for example, SubSettingsApp1); or an instance of a valid
SPWorkManagementServiceApplication object

Type: SPWorkManagementServiceCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MinimumTimeBetweenEwsSyncSubscriptionSearches
This value specifies the minimum amount of time between calls into our routine that tries to find new tenants that
want to sync EWS tasks.
Type: TimeSpan
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinimumTimeBetweenProviderRefreshes
Specifies the minimum amount of time between cache update operations per user. If this time has not passed since
the last successful refresh request for a user, the service application does not execute new refresh requests.

Type: TimeSpan
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MinimumTimeBetweenSearchQueries
Specifies the minimum amount of time between calls to the Search Service application to discover new SharePoint
task lists where a user has tasks. If this time has not passed since the last successful call to Search for a user, the
service application does not call Search during refresh operations.

Type: TimeSpan
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Work Management Service application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NumberOfSubscriptionSyncsPerEwsSyncRun
This value specifies the maximum number of tenants the service will try to sync via EWS per Timer job interval

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NumberOfUsersEwsSyncWillProcessAtOnce
This value specifies the maximum number of users a service instance machine will sync via EWS at one time across
all tenants.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NumberOfUsersPerEwsSyncBatch
This value specifies the maximum number of users a service instance will try to sync on a given tenant via EWS per
Timer job interval

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPWorkManagementServiceApplication
New -SPWorkManagementServiceApplicationProxy
Set-SPWorkManagementServiceApplicationProxy
minutes to read • Edit Online

Set-SPWorkManagementServiceApplicationProxy
In ths Article

Sets the settings for the Work Management Service application proxy.

Syntax
Set-SPWorkManagementServiceApplicationProxy [-Identity] <SPWorkManagementServiceProxyCmdletPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DefaultProxyGroup] [-Name <String>] [-WhatIf]
[<CommonParameters>]

Description
Use the Set-SPWorkManagementServiceApplicationProxy cmdlet to set the settings for the Work Management service
application proxy.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE--------

Set-SPWorkManagementServiceApplicationProxy -Identity "9187d901-e0e0-4509-b117-9eca20d3ead5" -DefaultProxyGroup

This example makes the Work Management service part of the default proxy group.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DefaultProxyGroup
Specifies whether the Work Management Service application proxy is to the default proxy group for the local farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the service application proxy to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
subscription settings service application (for example, SubSettingsApp1); or an instance of a valid
SPWorkManagementServiceApplicationProxy object

Type: SPWorkManagementServiceProxyCmdletPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the display name for the new Work Management Service application. For example, WorkManService1.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
New -SPWorkManagementServiceApplication
New -SPWorkManagementServiceApplicationProxy
Set-SPWorkManagementServiceApplication
minutes to read • Edit Online

Split-SPScaleOutDatabase
In ths Article

Moves a specified percentage of partitions from one scale-out database to another.

Syntax
Split-SPScaleOutDatabase -NewDatabaseName <String> -SourceDatabase <SPDatabasePipeBind>
-SourceServiceApplication <SPServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-MoveLowerHalf] [-NewDatabaseCredentials <PSCredential>] [-NewDatabaseFailoverServer <String>]
[-NewDatabaseServer <String>] [-SourcePercentage <Int32>] [-WhatIf] [<CommonParameters>]

Split-SPScaleOutDatabase -SourceDatabase <SPDatabasePipeBind>


-SourceServiceApplication <SPServiceApplicationPipeBind> -TargetDatabase <SPDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-MoveLowerHalf] [-SourcePercentage <Int32>]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Split-SPScaleOutDatabase cmdlet to move a specified percentage of partitions from a source database to
an existing target database or to a new database that you create with the specified parameters.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE 1---------------

$databases = Get-SPScaleOutDatabase -ServiceApplication $serviceApplication


$database = $databases[0]
Split-SPScaleOutDatabase -NewDatabaseName Database2 -NewDatabaseServer MyDatabaseServer -SourceDatabase
$database -SourceServiceApplication $serviceApplication -SourcePercentage 30

This example creates a new scale-out database named Database2 on the MyDatabaseServer database server in the
given service application.
The example also moves 30% of the data from the upper side of the data range in the first scale-out database of the
given service application.
---------------EXAMPLE 2---------------
$ssa = Get-SPEnterpriseSearchServiceApplication

$newReportingDb = "Search_AnalyticsReporting2"
$reportingDb = Get-SPScaleOutDatabase -SearchApplication $ssa
Split-SPServerScaleOutDatabase -SourceServiceApplication $ssa -SourceDatabase $reportingDb -NewDatabaseName
$newReportingDb -SourcePercentage 33

This example scales out the Search Analytics database, moving 33% of data to the new databases.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveLowerHalf
Specifies whether to move the lower or the upper side of the data range from the source scale-out database. If this
parameter is not specified, the default behavior is to move the upper side of the source scale-out database data
range.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseCredentials
Specifies the credentials to use when creating the scale-out database. These credentials will have owner rights on
the newly created scale-out database. If a value is not provided, the current user's credentials will be used by
default.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseFailoverServer
Specifies the failover server name of the new scale-out database to be created. If a value is not provided, the new
scale-out database does not have a failover server.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseName
Specifies the name of a new scale-out database that you are creating.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseServer
Specifies the name of the server of the new scale-out database to be created. If a value is not provided, the default
database server is used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceDatabase
The source scale-out database to move data from.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SourcePercentage
Specifies the percentage of data in the source scale-out database to move. If a value is not provided, the default
value of 50 percent is used.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceServiceApplication
The service application in which the data move operation will take place.

Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDatabase
The target scale-out database to move data to.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Add-SPScaleOutDatabase
Get-SPScaleOutDatabase
Remove-SPScaleOutDatabase
minutes to read • Edit Online

Split-SPServerScaleOutDatabase
In ths Article

Moves a specified percentage of partitions from one scale-out database to another.

Syntax
Split-SPServerScaleOutDatabase -NewDatabaseName <String> -SourceDatabase <SPDatabasePipeBind>
-SourceServiceApplication <SPServiceApplicationPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-MoveLowerHalf] [-NewDatabaseCredentials <PSCredential>] [-NewDatabaseFailoverServer <String>]
[-NewDatabaseServer <String>] [-SourcePercentage <Int32>] [-WhatIf] [<CommonParameters>]

Split-SPServerScaleOutDatabase -SourceDatabase <SPDatabasePipeBind>


-SourceServiceApplication <SPServiceApplicationPipeBind> -TargetDatabase <SPDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-MoveLowerHalf] [-SourcePercentage <Int32>]
[-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets.
Use the Split-SPServerScaleOutDatabase cmdlet to move a specified percentage of partitions from a source
database to an existing target database or to a new database that you create with the specified parameters.

Examples
---------------EXAMPLE---------------

$databases = Get-SPServerScaleOutDatabase -ServiceApplication $serviceApplication


$database = $databases[0]
Split-SPServerScaleOutDatabase -NewDatabaseName Database2 -NewDatabaseServer MyDatabaseServer -SourceDatabase
$database -SourceServiceApplication $serviceApplication -SourcePercentage 30

This example creates a new scale-out database named Database2 on the MyDatabaseServer database server in the
given service application. The example also moves 30 percent of the data from the upper side of the data range in
the first scale-out database of the given service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
Note: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MoveLowerHalf
Specifies whether to move the lower or the upper side of the data range from the source scale-out database. If this
parameter is not specified, the default behavior is to move the upper side of the source scale-out database data
range.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseCredentials
Specifies the credentials to use when creating the scale-out database. These credentials will have owner
permissions on the new scale-out database. If you do not provide a value, the credentials of the logged on user will
be used.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseFailoverServer
Specifies the failover server name of the new scale-out database. If you do not provide a value, the new scale-out
database does not have a failover server.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseName
Specifies the name of a new scale-out database that you are creating.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewDatabaseServer
Specifies the name of the server of the new scale-out database. If you do not provide a value, the name of the
default database server is used.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceDatabase
The source scale-out database to move data from.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourcePercentage
Specifies the percentage of data in the source scale-out database to move. If you do not provide a value, the default
value, 50 percent, is used.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceServiceApplication
The service application in which the data move operation will take place.
Type: SPServiceApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TargetDatabase
The target scale-out database to move data to.

Type: SPDatabasePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object

Related Links
Add-SPServerScaleOutDatabase
Get-SPServerScaleOutDatabase
Remove-SPServerScaleOutDatabase
minutes to read • Edit Online

Start-SPAdminJob
In ths Article

Immediately starts any waiting administrative job on the local computer.

Syntax
Start-SPAdminJob [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Start-SPAdminJob cmdlet to execute all administrative timer jobs immediately rather than waiting for the
timer job to run.
When the service account for the SharePoint Administration service (SPAdminV4)) is disabled (necessary in some
installations for security reasons), the Start-SPAdminJob cmdlet must be run on all computers to perform
administrative task like provisioning.
When you run this cmdlet in person (not in script), use the Verbose parameter to see the individual administrative
operations that are run.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Start-SPAdminJob -Verbose

This example runs all waiting administrative jobs and shows verbose output to the administrator.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Start-SPAssignment
In ths Article

Initiates a new assignment store.

Syntax
Start-SPAssignment [-AssignmentCollection <SPAssignmentCollection>] [-Global] [<CommonParameters>]

Description
The Start-SPAssignment cmdlet properly disposes of objects used with variable assignments.
Large amounts of memory are often required when SPWeb, SPSite, or SPSiteAdminsitration objects are used. So
the use of these objects, or lists of these objects, in Windows PowerShell scripts requires proper memory
management. By default, all Get commands dispose of these objects immediately after the pipeline finishes, but by
using SPAssignment, you can assign the list of objects to a variable and dispose of the objects after they are no
longer needed. You can also ensure that the objects remain as long as you need them, even throughout multiple
iterations of commands.
There are three levels of assignment:
-- No assignment -- The object is not assigned to a variable and is disposed of after each iteration of the command.
-- Simple assignment -- All objects are assigned to the global assignment store. This is done by using the Global
parameter. When using this level, all objects are assigned to a global store and are disposed of when the Stop-
SPAssignment cmdlet is called.
-- Advanced assignment -- Objects are assigned to named stores for disposal. You can dispose of objects by using
the Identity parameter with the Stop-SPAssignment cmdlet.
Regardless of the assignment level used, all objects are disposed of when the Windows PowerShell run space is
closed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Start-SPAssignment -global
$w = Get-SPWeb https://MyWeb
$w | Set-SPWeb -title "Accounting"
Stop-SPAssignment -global

This example uses simple assignment. Although it is easier to use simple assignment, it is not a good idea to run
commands that iterate through multiple SPSite or SPWeb objects while simple assignment is enabled. Ensure that
you run Stop-SPAssignment before you attempt any iterations of multiple objects.
------------------EXAMPLE 2-----------------------

$gc = Start-SPAssignment
$web = $gc | Get-SPWeb https://MyWeb
$web | Set-SPWeb -title "Accounting"
Stop-SPAssignment -SemiGlobal $gc

This example sets the title of the SPWeb object in multiple lines and controls the rate of disposal. This is an
advanced example. Only developers are advised to use it.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Global
If you use this parameter, all objects are assigned to the lifetime of the script and are disposed of when the
Stop-SPAssignment cmdlet is called.

If you do not use this parameter, you must assign the output of this cmdlet to a variable and then dispose of objects
by using the Identity parameter of the Stop-SPAssignment cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Start-SPContentDeploymentJob
In ths Article

Starts a content deployment job.

Syntax
Start-SPContentDeploymentJob [-Identity] <SPContentDeploymentJobPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DeploySinceTime <String>] [-TestEnabled]
[-WaitEnabled] [-WhatIf] [-UseSpecificSnapshot <String>] [<CommonParameters>]

Description
The Start-SPContentDeploymentJob cmdlet starts a content deployment job.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Get-SPContentDeploymentPath "Path 1" | New-SPContentDeploymentJob -Name "Job 1" -SPContentDeploymentPath $_ -


IncrementalEnabled:$true -ScheduleEnabled:$false | Start-SPContentDeploymentJob

This example creates a content deployment job Job 1 and runs it immediately.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeploySinceTime
Specifies the date to use to determine what changes to export incrementally. This parameter is ignored if the
deployment job type is full.
The type must be a valid DateTime type, in the form 2010,12,05.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the content deployment job to run.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a content
deployment job (for example, DeployJob1); or an instance of a valid SPContentDeploymentJob object.

Type: SPContentDeploymentJobPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-TestEnabled
Runs the content deployment job in test mode only.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseSpecificSnapshot
Use a snapshot of the named Content Database.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WaitEnabled
Specifies that the command is not returned until the operation is complete.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Start-SPDiagnosticsSession
In ths Article

Starts a diagnostic session to report diagnostic information to the usage database.

Syntax
Start-SPDiagnosticsSession [-AssignmentCollection <SPAssignmentCollection>] [-CorrelationId <Guid>]
[-Dashboard] [-TraceLevel <String>] [<CommonParameters>]

Description
Use the Start-SPDiagnosticsSession cmdlet to report diagnostic information to the usage database. After a
diagnostic session starts, all Windows PowerShell for SharePoint cmdlets in Windows PowerShell scripts will use
the same correlation to report diagnostic information.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE-------

$correlationId = [guid]::NewGuid()
Start-SPDiagnosticsSession -CorrelationId $correlationId -Dashboard:$true -TraceLevel Verbose

This example starts a diagnostic session for a specified correlation ID with the trace level of verbose.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CorrelationId
Specifies the correlation ID to be used for the diagnostic session.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Dashboard
Specifies that diagnostics behave as if the developer dashboard were enabled.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TraceLevel
Specifies the Unified Logging Service (ULS ) trace level override.
--High --Medium --Monitorable --Unexpected --Verbose --VerboseEx --None

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Stop-SPDiagnosticsSession
minutes to read • Edit Online

Start-
SPEnterpriseSearchQueryAndSiteSettingsServiceInstance
In ths Article

Starts an instance of a search manager service.

Syntax
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance
[-Identity] <SearchQueryAndSiteSettingsServiceInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance cmdlet starts the query and site settings service
instance on the server instance in the same farm as the search service application to host the query object model
(OM ), Windows Communication Foundation (WCF ) endpoint and query processor for the search service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$qssInstance = Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance -Local


Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance -Identity $qssInstance

This example starts the local query and site settings instance.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search manager service instance to start.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid SPServer name, or
the name of a search manager service instance (for example, SearchManagerServiceInstance1); or an instance of a
valid SearchManagerServiceInstance object.

Type: SearchQueryAndSiteSettingsServiceInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Start-SPEnterpriseSearchServiceInstance
In ths Article

Starts an instance of a search service.

Syntax
Start-SPEnterpriseSearchServiceInstance [-Identity] <SearchServiceInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet starts an instance of a search service on a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.
If you run this cmdlet on a running search service instance, the associated search components are also restarted.
This may lead to a short downtime for queries.

Examples
------------------EXAMPLE------------------

Get-SPEnterpriseSearchServiceInstance -Local | Start-SPEnterpriseSearchServiceInstance

This example starts the local search service instance.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search service instance to start.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a query
server (for example, MyQueryServer); or an instance of a valid SearchServiceInstance object.

Type: SearchServiceInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Start-SPInfoPathFormTemplate
In ths Article

Activates a previously quiesced InfoPath form template.

Syntax
Start-SPInfoPathFormTemplate [-Identity] <SPFormTemplatePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Start-SPInfoPathFormTemplate cmdlet activates a previously quiesced InfoPath form template after the form is
upgraded. During update, a form is quiesced, which disables access to the form.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Start-SPInfoPathFormTemplate -Identity formName.xsn

This example activates a form with a specified name.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the InfoPath form template to start.
The type must be a valid URL, in the form https://server_name; a valid name of a Web application (for example,
WebApp1); a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or an instance of a valid
SPWebServiceProxy object.

Type: SPFormTemplatePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Start-SPProjectGenerateWsdl
In ths Article

Generates ASPX pages from WSDL files.

Syntax
Start-SPProjectGenerateWsdl [-AssignmentCollection <SPAssignmentCollection>] [-Path <String>]
[<CommonParameters>]

Description
Generates ASPX pages from WSDL files.

Examples
---------------EXAMPLE--------------

Start-SPProjectGenerateWsdl

Generates ASPX files in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\PSI


from the pre-existing WSDL files.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path
The path to the location containing the WSDL files.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Start-SPService
In ths Article

Enables a service in the farm.

Syntax
Start-SPService [-Identity] <SPServicePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-IncludeCustomServerRole] [-WhatIf] [<CommonParameters>]

Description
The Start-SPService cmdlet enables a service in the farm. Service instances for this service will be started on the
appropriate servers in the farm.
This cmdlet only controls service instances on servers that are managed by MinRole. The behavior for the Custom
server role has changed with the November 2016 Public Update (PU ). Please see the IncludeCustomServerRole
parameter for additional information.

Examples
---------------EXAMPLE--------------

Start-SPService -Identity "Microsoft SharePoint Foundation Sandboxed Code Service"

This example enables the Microsoft SharePoint Foundation Sandboxed Code Service in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the service to enable.

Type: SPServicePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncludeCustomServerRole
Creates a timer job that also starts service instances on servers that are assigned to the custom server role.
This is a one-time Timer job. MinRole will make no further attempts to manage the service instances on servers
assigned to the Custom server role.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServicePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Start-SPServiceInstance
In ths Article

Starts the service instance for a service on a specific server or the farm.

Syntax
Start-SPServiceInstance [-Identity] <SPServiceInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Start-SPServiceInstance cmdlet to start the service instance for a service on a specific server or on the
farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Start-SPServiceInstance 67877d63-bff4-4521-867a-ef4979ba07ce

This example starts the given service instance on the server.


The service instance GUID is unique to every farm. You can run the Get-SPServiceInstance cmdlet to see the GUID
of the service instances and then use the result from the SPServiceInstance cmdlet for other cmdlets.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID of the service instance to get.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPServiceInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Start-SPTimerJob
In ths Article

Runs a timer job once.

Syntax
Start-SPTimerJob [-Identity] <SPTimerJobPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
The Start-SPTimerJob cmdlet runs a timer job once on each front-end Web server where the parent service is
provisioned.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------------EXAMPLE----------------

Get-SPTimerJob job-recycle-bin-cleanup | Start-SPTimerJob

This example starts the timer job named, job-recycle-bin-cleanup.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the timer job to run.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a timer
job (for example, TimerJob1); or an instance of a valid SPTimerJob object.

Type: SPTimerJobPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Stop-SPAssignment
In ths Article

Disposes of objects in the provided assignment collection.

Syntax
Stop-SPAssignment [[-SemiGlobal] <SPAssignmentCollection>] [-AssignmentCollection <SPAssignmentCollection>]
[-Global] [<CommonParameters>]

Description
The Stop-SPAssignment cmdlet disposes of objects in the provided assignment collection. Use the Global parameter
to dispose of all objects in the global assignment collector and to stop the global store from collecting additional
objects. Provide a SemiGlobal assignment collector to dispose of all contained objects.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Start-SPAssignment -global
$w = Get-SPWeb https://MyWeb
$w | Set-SPWeb -title "Accounting"
Stop-SPAssignment -global

This example uses simple assignment. While easier to use simple assignment, running commands that iterate
through multiple SPSite or SPWeb objects while simple assignment is enabled is not recommended. Ensure that
Stop-SPAssignment is run before attempting any iterations of multiple objects.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Global
Stops the global assignment collector from storing objects and disposes of any objects contained by the global
assignment collector.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SemiGlobal
Provides the assignment collector from which to dispose of objects.

Type: SPAssignmentCollection
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Stop-SPContentTypeReplication
In ths Article

Stops Content Type replication job from SharePoint Online.

Syntax
Stop-SPContentTypeReplication [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Stops Content Type replication job from SharePoint Online and deletes the replication timer job.

Examples
-----------------EXAMPLE----------------

Stop-SPContentTypeReplication

Stops Content Type replication job from SharePoint Online.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

Stop-SPDiagnosticsSession
In ths Article

Stops a diagnostic session.

Syntax
Stop-SPDiagnosticsSession [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Stop-SPDiagnosticsSession cmdlet to stop a diagnostic session.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE---------

Stop-SPDiagnosticsSession

This example stops a diagnostic session.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Start-SPDiagnosticsSession
minutes to read • Edit Online

Stop-SPDistributedCacheServiceInstance
In ths Article

Stops an instance of the Distributed Cache service on a local server.

Syntax
Stop-SPDistributedCacheServiceInstance [-Graceful] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Use the Stop-SPDistributedCacheServiceInstance cmdlet to stop an instance of the Distributed Cache service on a
local server. While a -Graceful switch does exist, this cmdlet is not capable of properly transferring cached items to
another Distributed Cache host within the farm. Follow the guidance available at Manage the Distributed Cache
service in SharePoint Server 2013 to properly issue a graceful shutdown of the Distributed Cache service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at https://go.microsoft.com/fwlink/p/?LinkId=251831.

Examples
------------ Example 1 ----------

Please see referenced article instead of using this cmdlet directly.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Graceful
Specifies whether to gracefully stop an instance of the Distributed Cache service.

Type: SwitchParameter
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Related Links
Remove-SPDistributedCacheServiceInstanceOnLocalServer
Add-SPDistributedCacheServiceInstanceOnLocalServer
minutes to read • Edit Online

Stop-
SPEnterpriseSearchQueryAndSiteSettingsServiceInstance
In ths Article

Stops an instance of a search manager service.

Syntax
Stop-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance
[-Identity] <SearchQueryAndSiteSettingsServiceInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Stop-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance cmdlet stops an instance of a search manager
service.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$qssInstance = Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance -Local


Stop-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance -Identity $qssInstance

This example stops the local query and site settings service instance.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search manager service instance to stop.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid SPServer name, or
the name of a search manager service instance (for example, SearchManagerServiceInstance1); or an instance of a
valid SearchManagerServiceInstance object.

Type: SearchQueryAndSiteSettingsServiceInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Stop-SPEnterpriseSearchServiceInstance
In ths Article

Stops an instance of a search service.

Syntax
Stop-SPEnterpriseSearchServiceInstance [-Identity] <SearchServiceInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet stops an instance of a search service.
Before you can stop a search service instance, you must remove all search topology components on the associated
server from the active topology. This can be done in three ways:
Removing components from the search topology
Moving components to another server. For more information, see .
Removing the search service application. For more information, see Remove-SPEnterpriseSearchServiceApplication

Examples
------------------EXAMPLE------------------

Get-SPEnterpriseSearchServiceInstance -Local | Stop-SPEnterpriseSearchServiceInstance

This example stops the local search service instance.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the shared search service instance to stop.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a query
server (for example, MyQueryServer); or an instance of a valid SearchServiceInstance object.

Type: SearchServiceInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Stop-SPInfoPathFormTemplate
In ths Article

Disables a InfoPath form template on a farm before an upgrade.

Syntax
Stop-SPInfoPathFormTemplate [-Identity] <SPFormTemplatePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-TimeLeft <Int32>] [-WhatIf] [<CommonParameters>]

Description
The Stop-SPInfoPathFormTemplate cmdlet quiesces, or disables, an InfoPath form template before it upgrades the
form. Before a form is updated it is quiesced, which disables access to the form. Use Start-SPIPFormTemplate to
unquiesce, or activate, a form template after the form is upgraded.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Stop-SPInfoPathFormTemplate -Identity formName.xsn

This example disables a form template for a specified name.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the InfoPath form template to start.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form
template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example,
FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

Type: SPFormTemplatePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-TimeLeft
Specifies the time duration, in minutes, before the form template will be quiesced. The default value is 0.
An integer value in the range from 0 to 1440.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Stop-SPService
In ths Article

Disables a service in the farm.

Syntax
Stop-SPService [-Identity] <SPServicePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-IncludeCustomServerRole] [-WhatIf] [<CommonParameters>]

Description
The Stop-SPService cmdlet disables a service in the farm. Service instances for this service will be stopped on the
appropriate servers in the farm.
Note: This cmdlet only controls service instances on servers that are managed by MinRole. The behavior for the
Custom server role has changed with the November 2016 Public Update (PU ). Please see the
IncludeCustomServerRole parameter for additional information.

Examples
---------------EXAMPLE--------------

Stop-SPService -Identity "Microsoft SharePoint Foundation Sandboxed Code Service"

This example disables the Microsoft SharePoint Foundation Sandboxed Code Service in the farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
Note: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the service to disable.

Type: SPServicePipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IncludeCustomServerRole
Creates a timer job that also stops service instances on servers that are assigned to the custom server role. Note:
This is a one-time Timer job. MinRole will make no further attempts to manage the service instances on servers
assigned to the Custom server role.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServicePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Stop-SPServiceInstance
In ths Article

Stops the service instance for a service.

Syntax
Stop-SPServiceInstance [-Identity] <SPServiceInstancePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
Stops the service instance for a service on the specified server or for the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Stop-SPServiceInstance 67877d63-bff4-4521-867a-ef4979ba07ce

This example stops the service instance in the given server.


The service instance GUID is unique to every farm. You can run the Get-SPServiceInstance cmdlet to see the GUID
of the service instances and then use the result from the SPServiceInstance cmdlet for other cmdlets.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID of the service instance to get.

Type: SPServiceInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Stop-SPTaxonomyReplication
In ths Article

Terminates Hybrid SharePoint Taxonomy replication from SharePoint Online site to local SharePoint on-premises
site.

Syntax
Stop-SPTaxonomyReplication [-AssignmentCollection <SPAssignmentCollection>] -Credential <PSCredential>
[<CommonParameters>]

Description
Use the Stop-SPTaxonomyReplication cmdlet to terminate Hybrid SharePoint Taxonomy replication from
SharePoint Online site to local SharePoint on-premises site. The Taxonomy Groups Replication timer job will be
killed and a full replication from SharePoint Online Taxonomy store to local SharePoint on-premises store will be
performed.

Examples
------------------EXAMPLE-----------------------

Stop-SPTaxonomyReplication -Credential (Get-Credential)

This example performs a full replication and deletes the Taxonomy Groups Replication timer job. If the full
replication fails, you can run the cmdlet again. The credential is a SharePoint Online tenant administrator
credential.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Credential
This is the Taxonomy Term Store administrator credential of remote SharePoint Online Term Store.
Fetches full taxonomy data properties, so a Term Store Administrator's credential is needed to perform the
operations.

Type: PSCredential
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.Management.Automation.PSCredential
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Suspend-SPEnterpriseSearchServiceApplication
In ths Article

Suspends a search service application, pausing all crawls and search operations, to perform a task such as system
maintenance.

Syntax
Suspend-SPEnterpriseSearchServiceApplication [-Identity] <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet reads the SearchServiceApplication object and moves it from Paused for: External Request status to
Suspend status.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssa = Get-SPEnterpriseSearchServiceApplication -Identity MySSA


$ssa | Suspend-SPEnterpriseSearchServiceApplication

This example obtains a reference to a search service application named MySSA and pauses it, stopping all crawls
and other search components such as content processing components, analytics processing components and
indexing components.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search service application to suspend.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Suspend-SPStateServiceDatabase
In ths Article

Pauses a state database and thus prevents new rows of data from being added to a database.

Syntax
Suspend-SPStateServiceDatabase [-Identity] <SPStateDatabasePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Suspend-SPStateServiceDatabase cmdlet pauses a state database. This cmdlet updates the state database object
that is specified in the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

$db = Get-SPStateServiceDatabase
Suspend-SPStateServiceDatabase -Identity $db

This example suspends a specified state service database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the state database to pause.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a state
database (for example, StateSvcDB1); or an instance of a valid SPStateServiceDatabase object.

Type: SPStateDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Sync-SPProjectPermissions
In ths Article

Manually synchronizes permissions between a Project Web App instance and its associated project sites.

Syntax
Sync-SPProjectPermissions [-Url] <Uri> [-SyncPWASite] [-SyncProjectSites] [-Async]
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Sync-SPProjectPermissions [-Url] <Uri> [[-Type] <SharePointPermissionModeSyncType>]


[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Sync-SPProjectPermissions cmdlet causes permissions to be synchronized to the project sites associated with
projects in a Project Web App instance and the permissions set on those projects in Project Server.
This cmdlet works with both SharePoint permission mode and Project Server permission mode.
For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
--------------EXAMPLE-----------------

Sync-SPProjectPermissions -Url https://pwa_site -Type Full

Performs a full sync against the PWA site https://pwa_site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Async
Specifies that the synchronization is placed in the Project Server queue. Omitting this flag causes the
synchronization to occur immediately within the Windows PowerShell console.
This parameter is used with Project Server permission mode.

Type: SwitchParameter
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SyncProjectSites
Triggers a synchronization of Project Server permissions to the project sites.
This parameter is used with Project Server permission mode.

Type: SwitchParameter
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SyncPWASite
Triggers a synchronization of Project Server permissions to the PWA site.
This parameter is used with Project Server permission mode.

Type: SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type
Specifies the type of sync to perform: full or incremental.
This parameter is used with SharePoint permission mode.
Valid values are:
Full, Incremental, AllGroups
Type: SharePointPermissionModeSyncType
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url
Specifies the URL of the Project Web App instance for which you want to synch permissions.
The type must be a valid URL, in the form https://pwa_site.

Type: Uri
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Test-SPContentDatabase
In ths Article

Tests a content database.

Syntax
Test-SPContentDatabase [-Identity] <SPContentDatabasePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-DatabaseCredentials <PSCredential>] [-ExtendedCheck] [-ServerInstance <SPDatabaseServiceInstancePipeBind>]
[-ShowLocation] [-ShowRowCounts] [<CommonParameters>]

Test-SPContentDatabase -Name <String> -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-DatabaseCredentials <PSCredential>] [-ExtendedCheck]
[-ServerInstance <SPDatabaseServiceInstancePipeBind>] [-ShowLocation] [-ShowRowCounts] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
Use the Test-SPContentDatabase cmdlet to test a content database against a Web application to verify all
customizations referenced within the content database are also installed in the web application. This cmdlet can be
issued against a content database currently attached to the farm, or a content database that is not connected to the
farm. It can be used to test content databases from SharePoint 2010 Products and from SharePoint Products and
Technologies.
The Test-SPContentDatabase cmdlet does not change any of the data or structure of the content database, but can
cause load on the database while the checks are in progress, which could temporarily block use of the content
database. This cmdlet should only be used against a content database that is currently under low or no usage.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------------------EXAMPLE 1-----------------------

Test-SPContentDatabase -name WSS_Content_DB -webapplication https://sitename

This example tests the WSS_Content_DB content database against the sitename Web application and returns a list
of issues.
----------------------------EXAMPLE 2-----------------------
$DB = Get-SPContentDatabase -site https://contoso.com
Test-SPContentDatabase $DB -showrowcounts

This example gets the content database that contains the site collection at https://contoso.com and then tests the
database against the Web application that hosts it to determine issues. Together with displaying the list of issues, by
specifying the ShowRowCounts parameter, this also returns the table size metrics from the content database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-DatabaseCredentials
Specifies the PSCredential object that contains the user name and password to be used for database SQL Server
Authentication.
The type must be a valid PSCredential object.

Type: PSCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExtendedCheck
Checks for inconsistent authentication modes during database-attach upgrade process.
The selected mode, claims or classic, must be the same in both versions.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies an existing connected SharePoint content database to one of the two parameter sets in the form of a
GUID or database name if it is unique.

Type: SPContentDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the existing content database to test.
The type must be a valid name of a SharePoint content database; for example, SPContentDB1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerInstance
Specifies the instance of the database service to use to test the specified content database.
The type must be a valid GUID, such as 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a SQL Server
instance (for example, DBSvrInstance1); or an instance of a valid SPDatabaseServiceInstance object.

Type: SPDatabaseServiceInstancePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowLocation
Specifies the locations where missing templates and features are being used within the database. Typically,
reported locations are scoped within the site collections that are within the specified content database.
The use of the parameter significantly increases the time to complete the test procedure.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ShowRowCounts
Returns database statistics which are row counts for tables in the content database.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the SharePoint Web application to use to test the content database.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Test-SPInfoPathFormTemplate
In ths Article

Validates that a InfoPath form template is browser-enabled.

Syntax
Test-SPInfoPathFormTemplate [-Path] <String> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Test-SPInfoPathFormTemplate cmdlet validates that an InfoPath form template can be browser-enabled.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Test-SPInfoPathFormTemplate -Identity formName.xsn

This example validates an InfoPath form template for a specified name.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path
Specifies the path and name of the InfoPath form template to install.
The type must be a valid path and file name of a form template, in the form:
C:\folder_name\formtemplate_name
\\server_name\folder_name\formtemplate_name

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
minutes to read • Edit Online

Test-SPO365LinkSettings
In ths Article

Validates whether the configured Office 365 hybrid site uses a valid template.

Syntax
Test-SPO365LinkSettings [-AssignmentCollection <SPAssignmentCollection>] -MySiteHostUrl <Uri>
[<CommonParameters>]

Description
Use the Test-SPO365LinkSettings cmdlet to validate a templated against a configured Office 365 hybrid site.

Examples
EXAMPLE 1

Test-SPO365LinkSettings -MySiteHostUrl https://contoso-my.sharepoint.com/

This example test a template using the contoso-my.sharepoint site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-MySiteHostUrl
The root URL for the redirected pages
Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Related Links
Get-SPO365LinkSettings
Set-SPO365LinkSettings
minutes to read • Edit Online

Test-SPProjectServiceApplication
In ths Article

This cmdlet runs a series of health checks against the Project Service Application.

Syntax
Test-SPProjectServiceApplication [-Identity] <PsiServiceApplicationPipeBind>
[[-Rule] <ProjectServiceApplicationHealthRuleName>] [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
This cmdlet runs a series of health checks against the Project Service Application.

Examples
---------------EXAMPLE--------------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'Project Application Services'}


Test-SPProjectServiceApplication -Identity $sa

This example runs all health checks again the service application named "Project Service Application."

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
The name of the Project Service Application to test against.
Type: PsiServiceApplicationPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Rule
Which rule to run against the service application.
Valid rules are:
All, CalcServiceWorkerState, QueueInFlightJobs, QueueServiceInternalState
Project Server 2013 has this additional rule which is not available in Project Server 2016, Project Server 2019:
QueueSiteCheck
Project Server 2016, Project Server 2019 added this additional rule:
DatabasePermissions

Type: ProjectServiceApplicationHealthRuleName
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Inputs
Microsoft.Office.Project.Server.Cmdlet.PsiServiceApplicationPipeBind
Microsoft.Office.Project.Server.HealthRules.ProjectServiceApplicationHealthRuleName
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Test-SPProjectWebInstance
In ths Article

Runs a suite of tests on an existing Project Web Instance.

Syntax
Test-SPProjectWebInstance [-Identity] <ProjectInstancePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Rule <ProjectSiteHealthRuleName>] [<CommonParameters>]

Description
This cmdlet runs a suite of tests on an existing Project Web Instance. The tests are designed to verify the health
status of the Project Web Instance. The cmdlet returns the set of tests as a list of
Microsoft.Office.Project.Server.HealthRules objects associated with a status of type SPSiteHealthStatusType
(Passed, FailedWarning, FailedError).

For permissions and the most current information about Windows PowerShell for Project Server, see the online
documentation at https://go.microsoft.com/fwlink/p/?LinkId=251833 (https://go.microsoft.com/fwlink/p/?
LinkId=251833).

Examples
----------------------EXAMPLE-----------------------

Get-SPProjectWebInstance | Test-SPProjectWebInstance

This example runs a suite of tests on all Project Web Instances in the SharePoint Server farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies a Project Web Instance.

Type: ProjectInstancePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Rule
{{Fill Rule Description}}

Type: ProjectSiteHealthRuleName
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Mount-SPProjectWebInstance
minutes to read • Edit Online

Test-SPSite
In ths Article

Activates the RunTests method against a referenced SPSite object.

Syntax
Test-SPSite [-Identity] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-RuleId <Guid>]
[-RunAlways] [<CommonParameters>]

Description
The Test-SPSite cmdlet runs one or all site collection health checks on the site collection and its contents. This
cmdlet reports the rules which were run and provides a summary of the results.
To run tests in repair mode, use the Repair-SPSite cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE 1------------

Test-SPSite https:///sites/testsite

This example runs all the site collection health checks on the https://<site name>/sites/testsite site collection.
--------------EXAMPLE 2------------

Test-SPSite https://

This example runs just the "Missing Galleries Check" on the https://<site name>/sites/testsite site collection.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Identity
Specifies the URL or GUID of the site to run a test.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-RuleId
Specifies one specific site health rule to run.

Type: Guid
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunAlways
Forces a rule to run even if a health check was run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Repair-SPSite
minutes to read • Edit Online

Uninstall-FASTSearchAdminDatabase
In ths Article

Uninstalls the database used by the Microsoft FAST Search Server 2010 for SharePoint administration services.
This cmdlet is primarily called during uninstallation by the FAST Search Server 2010 for SharePoint installer.

Syntax
Uninstall-FASTSearchAdminDatabase [-DbConnection <String>] [-DbName <String>] [-DbServer <String>]
[<CommonParameters>]

Description
This cmdlet uninstalls the database used by the FAST Search Server 2010 for SharePoint administration services.
All data is deleted. This cmdlet is primarily called during uninstallation, by the FAST Search Server 2010 for
SharePoint installer.
The administration database default name is "FASTSearchAdminDatabase" and is located in the Microsoft SQL
Server instance specified by the DbServer or DbConnection parameters.
For permissions and the most current information about FAST Search Server 2010 for SharePoint cmdlets, see the
online documentation, (https://go.microsoft.com/fwlink/?LinkId=163227).

Examples
---------------EXAMPLE 1----------------- (FAST Server for SharePoint 2010)

Uninstall-FASTSearchAdminDatabase -DbServer=sqlserver.contoso.com

This example uninstalls the FAST Search Server 2010 for SharePoint administration database on the given SQL
Server instance. All data will be deleted.

Parameters
-DbConnection
Specifies the database connection string for the FAST Search Server 2010 for SharePoint administration database,
in the same format as the ConnectionString property of the System.Data.SqlClient.SqlConnection .NET Framework
type.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DbName
Specifies the name of the FAST Search Server 2010 for SharePoint administration database.
The name only takes effect when used in conjunction with the DbServer parameter, not the DbConnection
parameter.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DbServer
Specifies the database server instance that contains the FAST Search Server 2010 for SharePoint administration
database
Only one of the DbServer and DbConnection parameters must be specified. Using DbServer with a value of
sqlserver.contoso.com is equivalent to using DbConnection with the value "Data
Source=sqlserver.contoso.com;Database=FASTSearchAdminDatabase;integrated Security=True""

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Install-FASTSearchAdminDatabase
minutes to read • Edit Online

Uninstall-SPAppInstance
In ths Article

Uninstalls an instance of an app.

Syntax
Uninstall-SPAppInstance -Identity <SPAppInstance> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Use the Uninstall-SPAppInstance cmdlet to uninstall an instance of an app. This cmdlet is required to be run before
a migration process.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE--------------

$spapp = Get-SPAppInstance -AppInstanceId $instance.Id


Uninstall-SPAppInstance -Identity $spapp

This example uninstalls an instance of an app.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the app instance for which to find metadata.

Type: SPAppInstance
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPAppInstance
Restart-SPAppInstanceJobs
Uninstall-SPAppInstance
minutes to read • Edit Online

Uninstall-SPDataConnectionFile
In ths Article

Removes a data connection file.

Syntax
Uninstall-SPDataConnectionFile [-Identity] <SPDataConnectionFilePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Uninstall-SPDataConnectionFile cmdlet removes the data connection file specified in the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Uninstall-SPDataConnectionFile -Identity "Sample.udcx


"Sample1.udcx", "Sample2.udcx", "Sample3.udcx" | Uninstall-SPDataConnectionFile

This example uninstalls a specified data connection file in two different ways.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the data connection file to remove.
The type must be a valid GUID, in form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a data
connection file (for example, DataConnectionFileName1.udcx); or an instance of a valid SPDataConnectionFile
object.

Type: SPDataConnectionFilePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Uninstall-SPFeature
In ths Article

Uninstalls an installed feature definition.

Syntax
Uninstall-SPFeature [-Identity] <SPFeatureDefinitionPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-CompatibilityLevel <Int32>] [-Confirm] [-Force] [-WhatIf] [<CommonParameters>]

Description
The Uninstall-SPFeature cmdlet removes the specified feature definition from the collection of feature definitions
in the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1-----------------------

Uninstall-SPFeature -Identity "MyCustomFeature"

This example uninstalls the feature at $env:ProgramFiles\Common Files\Microsoft Shared\Web Server


Extensions\15\TEMPLATE\FEATURES\MyCustomFeature/feature.xml.
------------------EXAMPLE 2-----------------------

Uninstall-SPFeature -Identity "MyCustomFeature" -CompatibilityLevel 14

This example uninstalls the feature at $env:ProgramFiles\Common Files\Microsoft Shared\Web Server


Extensions\15\TEMPLATE\FEATURES\MyCustomFeature/feature.xml.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies the version of feature to uninstall. When the version is not specified it will default to the web applications
MaxVersion value.

Type: Int32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the uninstallation of a feature that is already installed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the name of the feature or GUID to uninstall.
The type must be the name of the feature folder located in the <drive>:\program files\common files\Microsoft
Shared\Web server extensions\15\template\features folder, or must be a GUID, in the form 21d186e1-7036-4092-
a825-0eb6709e9281.
Type: SPFeatureDefinitionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Uninstall-SPHelpCollection
In ths Article

Removes Help collection files.

Syntax
Uninstall-SPHelpCollection -Name <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Uninstall-SPHelpCollection cmdlet removes the specified Help collection files from the product Help library in
the current farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Uninstall-SPHelpCollection -Name "OSSAdmin.1033"

This example uninstalls a Help collection. The folder name of the Help collection to uninstall is OSSAdmin.1033.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name
Specifies the name of the Help collection files to uninstall.
The type must be a valid name of a Help collection; for example, HelpDocs1.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Uninstall-SPInfoPathFormTemplate
In ths Article

Removes a InfoPath form template from a farm.

Syntax
Uninstall-SPInfoPathFormTemplate [-Identity] <SPFormTemplatePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Uninstall-SPInfoPathFormTemplate cmdlet removes a specified InfoPath form template from a farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Uninstall-SPInfoPathFormTemplate -Identity formName.xsn

This example removes an InfoPath form template from a farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the InfoPath form template to uninstall.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a form
template (for example, InfoPathFormTemplate1); a valid name of a form template files (for example,
FormTemplateFile1.xsn); or an instance of a valid SPFormTemplate object.

Type: SPFormTemplatePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Uninstall-SPSolution
In ths Article

Retracts a deployed SharePoint solution.

Syntax
Uninstall-SPSolution [-Identity] <SPSolutionPipeBind> [-AllWebApplications]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-CompatibilityLevel <String>]
[-Language <UInt32>] [-Local] [-Time <String>] [-WhatIf] [<CommonParameters>]

Uninstall-SPSolution [-Identity] <SPSolutionPipeBind> -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-CompatibilityLevel <String>]
[-Language <UInt32>] [-Local] [-Time <String>] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Uninstall-SPSolution cmdlet retracts a deployed SharePoint solution in preparation for removing it from the
farm entirely. This cmdlet removes files from the front-end Web server. Use the Remove-SPSolution cmdlet to delete
the solution package from the solution store of the farm; be sure to use the Remove-SPSolution cmdlet only after
you have run Uninstall-SPSolution .
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Uninstall-SPSolution -Identity contoso_solution.wsp

This example retracts the deployed SharePoint solution contoso_solution.wsp.

Parameters
-AllWebApplications
Specifies that the new SharePoint solution will be uninstalled for all SharePoint Web applications in the farm.
Type: SwitchParameter
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
Specifies whether to uninstall the solution, from a specific version directory based on CompatibilityLevel. The
default behavior if this parameter is not specified is to uninstall the solution only from the version directory based
on the version tracked in the manifest of the solution's cab file.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SharePoint solution to uninstall.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint solution (for example, SPSolution1); or an instance of a valid SPSolution object.
Type: SPSolutionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Language
Uninstalls the language pack for the specified language.
The type must be a valid language identifier; for example, 1033.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Local
Uninstalls the solution from the active server computer.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Time
Specifies when the solution will be uninstalled. The default value is immediate retraction.
The type must be a valid DateTime value, in the form 2010,12,05.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Uninstalls the SharePoint solution for the specified SharePoint Web application.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; or a valid name of a
SharePoint Web application (for example, MyOfficeApp1); or an instance of a valid SPWebApplication object.

Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Uninstall-SPUserSolution
In ths Article

Deactivates a sandboxed solution in a site collection.

Syntax
Uninstall-SPUserSolution [-Identity] <SPUserSolutionPipeBind> -Site <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Uninstall-SPUserSolution cmdlet deactivates a sandboxed solution in a site collection so that you can delete it
by using the Remove-SPUserSolution cmdlet. A user solution is a sandboxed solution.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE---------------

Uninstall-SPUserSolution -Identity contoso_solution.wsp -Site https://sitename

This example deactivates the sandboxed solution contoso_solution.wsp on the site https://sitename.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the sandboxed solution to deactivate.
The type must be a valid name of a sandboxed solution (for example, UserSolution1); or an instance of a valid
SPUserSolution object.

Type: SPUserSolutionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Deactivates the sandboxed solution for the specified site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
http://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Uninstall-SPWebPartPack
In ths Article

Uninstalls the specified Web Part package.

Syntax
Uninstall-SPWebPartPack [-Identity] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Language <UInt32>] [-WebApplication <SPWebApplicationPipeBind>] [-WhatIf] [-CompatibilityLevel <String>]
[<CommonParameters>]

Description
The Uninstall-SPWebPartPack cmdlet uninstalls the Web Part package specified by the Identity parameter.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE 1------------------

Uninstall-SPWebPartPack "mypart.wpp" -WebApplication https://portal

This example uninstalls mypart.wpp to from the Web application https://portal.


------------------EXAMPLE 2------------------

Get-SPWebPartPack -WebApplication https://portal | Uninstall-SPWebPartPack

This example uninstalls all Web part packages from the Web application https://portal.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CompatibilityLevel
{{Fill CompatibilityLevel Description}}

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Web Part package in the farm's configuration database.

Type: String
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Language
Specifies the language ID of the Web Part package to delete. If no language is specified, the Web Part package is
uninstalled for all languages.
The type must be a valid language identifier, in the form 1033.

Type: UInt32
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the Web application from which to uninstall the Web Part package. If no Web application is specified, the
Web Part package is uninstalled from all Web applications.
The type must be a valid name, in the form WebApplication-1212, or a URL, in the form
https://server_name/WebApplication-1212.

Type: SPWebApplicationPipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Unpublish-SPServiceApplication
In ths Article

Stops sharing the specified service application outside the farm.

Syntax
Unpublish-SPServiceApplication [-Identity] <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Unpublish-SPServiceApplication cmdlet to stop publishing the service application, specified by the Identity
parameter, outside the farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

UnPublish-SPServiceApplication 053c34be-d251-488c-8e94-644eae94da26

This example stops publishing of the specified service application outside the farm.
The service application GUID is unique to every farm. You can run the Get-SPServiceApplication cmdlet to see the
GUID of the service applications and then use the result from the Get-SPServiceApplication cmdlet for other
SPServiceApplication cmdlets; for example, Publish-SPServiceApplication .

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the GUID of the service application to stop sharing outside the farm.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPAppCatalogConfiguration
In ths Article

Sets a specific site collection as the App Catalog site collection.

Syntax
Update-SPAppCatalogConfiguration [-Site] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Force] [-SkipWebTemplateChecking] [-WhatIf] [<CommonParameters>]

Description
Use the Update-SPAppCatalogConfiguration cmdlet to set a specific site collection as the App Catalog site
collection. The App Catalog site collection contains catalogs for Apps for SharePoint and Apps for Office. It is used
to help ITPro administrators distribute SharePoint Apps and Office Apps to their end users. Each Web Application
or Tenancy can have 1 App Catalog Site collection associated to it.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at Windows PowerShell for SharePoint Server 2016, SharePoint Server 2019 reference
(https://go.microsoft.com/fwlink/p/?LinkId=671715).

Examples
---------------EXAMPLE-----------

Update-SPAppCatalogConfiguration -Site https://contoso/sites/appcatalog_1 -Force:$true -


SkipWebTemplateChecking:$true

This example sets https://contoso/sites/appcatalog_1 as the app catalog site collection for the tenant it belongs to.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Specifies to force marking the site collection even if there are validation errors.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the URL or GUID of the site collection to be set as the app catalog site collection.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SkipWebTemplateChecking
Specifies whether to skip checking if the template of the site is APCATALOG#0.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPSitePipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Update-SPAppInstance
In ths Article

Updates the app instance.

Syntax
Update-SPAppInstance -App <SPApp> -Identity <SPAppInstance> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Update-SPAppInstance cmdlet to update the app instance.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------EXAMPLE---------

$spapp = Import-SPAppPackage -Path .\feature-upgrade-v2.spapp -Site https://localhost -Source


([microsoft.sharepoint.administration.spappsource]::ObjectModel)
C:\S>$instance = Get-SPAppInstance -AppInstanceId $instance.Id
Update-SPAppInstance -Identity $instance -App $spapp

This example updates an instance of an app.

Parameters
-App
Specifies the app version to upgrade to.

Type: SPApp
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies The app instance to upgrade.

Type: SPAppInstance
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Get-SPAppInstance
Restart-SPAppInstanceJobs
Uninstall-SPAppInstance
minutes to read • Edit Online

Update-SPDistributedCacheSize
In ths Article

Reconfigures the allocation of memory that is dedicated to the Distributed Cache service.

Syntax
Update-SPDistributedCacheSize [-CacheSizeInMB] <UInt32> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
Use the Update-SPDistributedCacheSize cmdlet to allocate memory to the Distributed cache service.

Examples
-------------EXAMPLE----------

Update-SPDistributedCacheSize -CacheSizeInMB 2048

Updates the Distributed Cache size to 2048MB.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CacheSizeInMB
Specifies the memory size in megabytes (MB ) that you want to allocate to the Distributed Cache service. The
default value is 5 percent of total system random access memory (RAM ). This value should not be more than 40
percent of total system RAM with a maximum limit of 16 gigabytes (GB ).

Type: UInt32
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Inputs
System.UInt32
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Update-SPFarmEncryptionKey
In ths Article

Changes the value of the farm encryption key and using the new key, re-encrypts all the data.

Syntax
Update-SPFarmEncryptionKey [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Resume] [-WhatIf]
[<CommonParameters>]

Description
The Update-SPFarmEncryptionKey cmdlet changes the farm encryption key to a new randomly generated value.
When the new key is used, all the data is re-encrypted.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-----------------------

Update-SPFarmEncryptionKey -confirm

This example changes the farm encryption key to a new value and re-encrypts all the data.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Resume
Resumes re-encryption of data with the new farm encryption key if a previous attempt failed.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPHelp
In ths Article

Updates SharePoint cmdlet help.

Syntax
Update-SPHelp [-AssignmentCollection <SPAssignmentCollection>] [-Force] [<CommonParameters>]

Description
The Update-SPHelp cmdlet checks the Windows Download Center for updates for the SharePoint Management
Shell help files against the version of the help files on the local computer. If there updates available, the cmdlet will
download and install these updates. By default, the cmdlet will allow checking for updates only once every 24
hours. To override this check, use the Force parameter.
The computer that the cmdlet is being run on must have an internet connection.
Note: This cmdlet currently does not update cmdlet help.

Examples
--------------------EXAMPLE 1---------------------

Update-SPHelp

Updates SharePoint cmdlet help.


--------------------EXAMPLE 2---------------------

Update-SPHelp -Force

This example over-rides the throttling logic and checks for updates to the help files even if a check was made in the
last 24 hours.
--------------------EXAMPLE 3---------------------

Update-SPHelp -Verbose

This example checks for updates to the help files and provides detailed feedback for each step of the process.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
NOTE: When the Global parameter is used, all objects are contained in the global store. If objects are not
immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can
occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force
Over-rides the throttling logic and checks for updates to the help files even if a check was made in the last 24
hours.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Update-SPInfoPathAdminFileUrl
In ths Article

Updates InfoPath form templates (.xsn files) and universal data connections (.udcx files), including all .xsn files and
.udcx files that were deployed by an administrator.

Syntax
Update-SPInfoPathAdminFileUrl -Find <Uri> -Replace <Uri> [-AssignmentCollection <SPAssignmentCollection>]
[-Confirm] [-Scan] [-WhatIf] [<CommonParameters>]

Description
The Update-SPInfoPathAdminFileUrl cmdlet updates data connections in administrator-approved InfoPath form
templates (.xsn files) and universal data connections (.udcx files). This allows for InfoPath data connections that
reference the current farm to be updated when content is migrated to a different farm URL. This cmdlet cannot
update any references to URLs that exist in form template business logic (code). Typically, this cmdlet is used with
the Import-SPInfoPathAdministratorFiles cmdlet.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPWebApplication http://contoso2010 | Update-SPInfoPathAdminFileUrl


-find "http://contoso2007"
-replace "http://contoso2010"

This example updates data connections in administrator-approved InfoPath form templates and universal data
connection files. Data connections that reference http://contoso 2007 are updated to reference http://contoso2010.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Find
Specifies the URL to find.
The type must be a valid URL, in the form http://previous_server_name.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Replace
Specifies the URL to find.
The type must be a valid URL, in the form http://server_name.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scan
Run the tool and log the actions that can be taken. No content is changed as a result of the scan.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPInfoPathFormTemplate
In ths Article

Upgrades all InfoPath form templates on the farm.

Syntax
Update-SPInfoPathFormTemplate [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Update-SPInfoPathFormTemplate cmdlet upgrades all the InfoPath form templates on a farm that were deployed
by an administrator. Use this cmdlet after the farm is upgraded to a new version.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
---------------EXAMPLE--------------

Update-SPInfoPathFormTemplate

This example updates InfoPath form templates on the entire farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPInfoPathUserFileUrl
In ths Article

Updates InfoPath form templates (.xsn files) and universal data connections (.udcx files).

Syntax
Update-SPInfoPathUserFileUrl [-ContentDatabase] <SPContentDatabasePipeBind> -Find <Uri> -Replace <Uri>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Scan] [-WhatIf] [<CommonParameters>]

Update-SPInfoPathUserFileUrl [-Site] <SPSitePipeBind> -Find <Uri> -Replace <Uri>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Scan] [-WhatIf] [<CommonParameters>]

Update-SPInfoPathUserFileUrl [-WebApplication] <SPWebApplicationPipeBind> -Find <Uri> -Replace <Uri>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-Scan] [-WhatIf] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets (https://go.microsoft.com/fwlink/?LinkID=187810).
The Update-SPInfoPathAdminFileUrl cmdlet updates data connections in InfoPath form templates (.xsn files) and
universal data connections (.udcx files). This allows for InfoPath data connections that reference the current farm to
be updated when content is migrated to a different farm URL.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Get-SPWebApplication http://contoso2010 | Update-SPInfoPathUserFileUrl -Find "http://contoso2007" -Replace


"http://contoso2010"

This example updates data connections in InfoPath form templates and universal data connection files, for all
content under the Web application http://contoso2010.
Data connections that reference http://contoso2007 are updated to reference http://contoso2010.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentDatabase
Specifies the parent content database where the update will start.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a content
database (for example, SPContent DB1); or an instance of a valid SPContentDatabase object.

Type: SPContentDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Find
Specifies the URL to find.
The type must be a valid URL, in the form http://previous_server_name.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Replace
Specifies the URL to find.
The type must be a valid URL, in the form http://server_name.

Type: Uri
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Scan
Run the tool and log the actions that can be taken. No content is changed as a result of the scan.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Site
Specifies the parent site collection where the update will start.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
http://sites/example; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WebApplication
Specifies the parent SharePoint Web application where the update will start.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-
1234-567890bcdefgh; a valid name of SharePoint Web application (for example, MyOfficeApp1); or an instance of
a valid SPWebApplication object

Type: SPWebApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPProfilePhotoStore
In ths Article

Updates the profile photo store to be compatible with SharePoint Server.

Syntax
Update-SPProfilePhotoStore -MySiteHostLocation <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-CreateThumbnailsForImportedPhotos <Boolean>]
[-NewBaseUri <Uri>] [-NoDelete <Boolean>] [-OldBaseUri <Uri>] [<CommonParameters>]

Description
After upgrading from Office SharePoint Server to SharePoint Server, run the Update-SPProfilePhotoStore cmdlet
to ensure that the SharePoint profile photo store is compatible with SharePoint Server. The
Update-SPProfilePhotoStore cmdlet should be used only after an upgrade from Office SharePoint Server has
completed. When the Update-SPProfilePhotoStore cmdlet is used, three thumbnail versions with predictable sizes
and names are created from the original photo, the new photos are placed into the My Site Host's User Photos
library, and the property value in the profile database is updated.
During the operation, the original image is left as-is. If the operation fails for certain users for any reason, it
continues on to the next user.
During the migration of profile photos from one server URL to another, one can use the OldBaseUri and
NewBaseUri parameters. You just need to specify the starting portion of the URL that has changed from old to
new and an attempt to rebase the profile picture URLs will occur.
For example, OldBaseUri: https://server1/my/ProfilePhotos; NewBaseUri:
https://server1/my/NewLocation/ProfilePhotos
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE-------------------

Update-SPProfilePhotoStore -MySiteHostLocation https://mysites

This example uploads photos to a specified My Site host location.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CreateThumbnailsForImportedPhotos
Creates thumbnails for all the imported user profile pictures.

Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MySiteHostLocation
Specifies the URL for the My Site host location where the photos are to be uploaded.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-NewBaseUri
Specifies the new URL for profile pictures. For example, https://server2/.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoDelete
When the value is set to true, imported user profile picture files will be preserverd after creating thumbnails for
them.

NOTE
This will only work when CreateThumbnailsForImportedPhotos is set to $true
Type: Boolean
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OldBaseUri
Specifies the old URL for profile pictures. For example, https://server1/.

Type: Uri
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPProfileSync
In ths Article

Updates the configuration of the User Profile Synchronization job based on the parameters specified.

Syntax
Update-SPProfileSync [[-ExcludeWebApplications] <String>] [[-SynchronizationTiming] <String>]
[[-SweepTiming] <String>] [[-IgnoreIsActive] <Boolean>] [-AssignmentCollection <SPAssignmentCollection>]
[-WhatIf] [-Confirm] [<CommonParameters>]

Description
The Update-SPProfileSync cmdlet updates the configuration of the User Profile Synchronization job based on the
parameters specified.

Examples
EXAMPLE 1

Update-SPProfileSync -IgnoreIsActive:$false

This example updates the User Profile Synchronization job marking it to sync all users irrespective of their activity,
without prompting for user confirmation.
EXAMPLE 2

Update-SPProfileSync -SynchronizationTiming "every 15 minutes"

This example updates the User Profile Synchronization job marking it to run every 15 minutes, without prompting
for user confirmation.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeWebApplications
Comma-delimited list of Web application URLs to exclude from consideration in the synchronization process.
The values specified delete any existing values set.

Type: String
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-IgnoreIsActive
Specifies whether to sync only active profiles or all profiles. User profiles of users who contribute to the site are
considered as Active.
The valid values are True or False.

Type: Boolean
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SweepTiming
Performs the same tasks as the SynchronizationTiming parameter. However, the SweepTiming parameter sets the
schedule for the "sweep" job. The sweep job is driven by the SharePoint Foundation change log and is used as a
lightweight way to capture new users added. For example, you might have a fully synchronized site, but then a user
is added to the site. The sweep job ensures that the incremental newly added user gets the User Profile properties
replicated quickly.
The default value is every 1 minute.
Type: String
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SynchronizationTiming
Sets the schedule for the main synchronization job. You can mention the schedule using a text string of SPSchedule
format (for example, "every 15 minutes" means the job is scheduled to run every 15 minutes, "daily at 09:00:00"
means the job is scheduled to run at 9 AM every day).
The default is once per hour.
You can use the SPSchedule.FromString() string method to pass in the strings, "every 5 minutes" or "weekly
xxxxxxx".

Type: String
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPRepopulateMicroblogFeedCache
In ths Article

Refreshes the microblog feed cache.

Syntax
Update-SPRepopulateMicroblogFeedCache [-AccountName <String>]
-ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-SiteSubscription <SPSiteSubscriptionPipeBind>]
[-SiteUrl <String>] [<CommonParameters>]

Update-SPRepopulateMicroblogFeedCache [-AccountName <String>]


-ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-SiteSubscription <SPSiteSubscriptionPipeBind>]
[-SiteUrl <String>] [<CommonParameters>]

Update-SPRepopulateMicroblogFeedCache -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] -SiteSubscription <SPSiteSubscriptionPipeBind> -ListId <Guid>
-ListRootFolderUrl <String> -SiteId <Guid> -WebId <Guid> [<CommonParameters>]

Description
Use the Update-SPRepopulateMicroblogFeedCache cmdlet to refresh the feeds of a given user. It can be used in
scenarios where the automatic refresh has failed or when reverting to an old version of a user's personal site.
When you refresh the cache, the Update-SPRepopulateMicroblogLMTCache cmdlet should be run first and then the
Update-SPRepopulateMicroblogFeedCache cmdlet second.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE 1------------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Update-SPRepopulateMicroblogFeedCache -ProfileServiceApplicationProxy $proxy -AccountName contoso\userName

This example refreshes the feed for a specific user by using the AccountName parameter.
------------EXAMPLE 2------------
$site = (Get-SPWebApplication -IncludeCentralAdministration | ?{$_.IsAdministrationWebApplication -eq
$true}).Sites[0]
$context = Get-SPServiceContext $site
$upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)
$profiles = $upm.GetEnumerator()
$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}
while($profiles.MoveNext()) {
$profile = $profiles.Current
Update-SPRepopulateMicroblogFeedCache -ProfileServiceApplicationProxy $proxy -AccountName
$profile.AccountName }

This example refreshes the feeds for all users in the User Profile Service Application.
------------EXAMPLE 3------------

Update-SPRepopulateMicroblogFeedCache -ProfileServiceApplicationProxy $proxy -SiteUrl


https://sharepoint.contoso.com

This example refreshes the feed on the site https://sharepoint.contoso.com.

Parameters
-AccountName
Specifies the user's account name for the User Profile Service application.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ListId
The ListId of the FollowableList.
Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ListRootFolderUrl
The RootFolderUrl of the FollowableList.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the User Profile Service application proxy to update.
The type must be in one of the following forms:
--A valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh --A valid name of a service application
proxy (for example, UserProfileSvcProxy1) --An instance of a valid SPServiceApplicationProxy object

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SiteId
The SiteId containing the FollowableList.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteSubscription
Specifies the account under which this service should run. This parameter is mandatory in a hosted-environment
and optional in a non-hosted environment.

Type: SPSiteSubscriptionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-SiteUrl
Specifies the Site's URL to repopulate the site feeds. If you don't specify this parameter, you must specify the
AccountName parameter. If neither parameter is specified, an error message is displayed.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebId
The WebId containing the FollowableList.

Type: Guid
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Update-SPRepopulateMicroblogLMTCache
minutes to read • Edit Online

Update-SPRepopulateMicroblogLMTCache
In ths Article

Refreshes the cache.

Syntax
Update-SPRepopulateMicroblogLMTCache -ProfileServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
Use the Update-SPRepopulateMicroblogLMTCache cmdlet to refresh when the Feed Cache Repopulation Job timer job
fails to work. The Update-SPRepopulateMicroblogLMTCache cmdlet forcefully refreshes the last modified times of all
the known persisted entities to FeedCache.
When you refresh the cache, the Update-SPRepopulateMicroblogLMTCache cmdlet should be run first and then the
Update-SPRepopulateMicroblogFeedCache cmdlet second.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------EXAMPLE-----------

$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'User Profile Service Application Proxy'}


Update-SPRepopulateMicroblogLMTCache -ProfileServiceApplicationProxy $proxy

This example refreshes the cache for the specified proxy.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ProfileServiceApplicationProxy
Specifies the User Profile Service application proxy to update.
The type must be in one of the following forms:
--A valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh
--A valid name of a service application proxy (for example, UserProfileSvcProxy1)
--An instance of a valid SPServiceApplicationProxy object

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

Related Links
Update-SPRepopulateMicroblogFeedCache
minutes to read • Edit Online

Update-SPSecureStoreApplicationServerKey
In ths Article

Synchronizes the key on a Microsoft SharePoint server with the Secure Store master key.

Syntax
Update-SPSecureStoreApplicationServerKey -Passphrase <String>
-ServiceApplicationProxy <SPServiceApplicationProxyPipeBind> [-AssignmentCollection <SPAssignmentCollection>]
[<CommonParameters>]

Description
The Update-SPSecureStoreApplicationServerKey cmdlet synchronizes the key on a SharePoint server with the master
key for the Secure Store service database.
Updating a server key is required when:
--A new SharePoint server that will run a Secure Store service instance is joined to the farm. --The key stored in
the server is not the key required for the current Secure Store service database (because of server or networking
issues). --The master key is updated but during propagation of the new key, this process fails on one or more of the
servers.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$newPassPhrase = "abcDEF123!"
$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'Secure Store Service Application Proxy'}
Update-SPSecureStoreApplicationServerKey -ServiceApplicationProxy $proxy -Passphrase $newPassPhrase

This example synchronizes the passphrase of the server key on a SharePoint server with the master key for the
Secure Store service database.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Passphrase
Specifies the passphrase that is used for the Secure Store service database.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplicationProxy
Specifies the proxy of the service application that contains the server key to synchronize.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPSecureStoreCredentialMapping
In ths Article

Sets a new credential mapping for a Secure Store Service application.

Syntax
Update-SPSecureStoreCredentialMapping -Identity <SPSecureStoreApplication> -Principal <SPClaim>
-Values <SecureString[]> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Update-SPSecureStoreCredentialMapping cmdlet sets a new credential mapping for a Secure Store Service
application.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssApp = Get-SPSecureStoreApplication -ServiceContext http://contoso -Name "ContosoTargetApplication"


$firstCredential = ConvertTo-SecureString "LOBDATABASE\jdoe" -AsPlainText -Force
$secondCredential = ConvertTo-SecureString "abcDEF123$%^" -AsPlainText -Force
$credentialValues = $firstCredential,$secondCredential
$userClaim = New-SPClaimsPrincipal -Identity "CONTOSO\janedoe" -IdentityType WindowsSamAccountName
Update-SPSecureStoreCredentialMapping -Identity $ssApp -Values $credentialValues -Principal $userClaim

This example updates a credential mapping for the given site and the target application ContosoTargetApplication,
for the user with the identity janedoe on domain CONTOSO. This user is mapped to a pair of credential values on
the External System with a username of identity jdoe on domain LOBDATABASE and password abcDEF123$%^.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Secure Store Service application (that contains the principal) from which to delete the credential
mapping.

Type: SPSecureStoreApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Principal
Specifies the SPClaims object that contains the principal.

Type: SPClaim
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Values
Specifies the field values for the credential mapping.

Type: SecureString[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPSecureStoreGroupCredentialMapping
In ths Article

Sets a new group credential mapping for a Secure Store Service application.

Syntax
Update-SPSecureStoreGroupCredentialMapping -Identity <SPSecureStoreApplication> -Values <SecureString[]>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
The Update-SPSecureStoreGroupCredentialMapping cmdlet sets a new group credential mapping for a Secure Store
Service application. Group credentials are a set of credentials that are associated with multiple identities. Target
applications will get credentials for a Secure Store application by using the current user. If the current user meets
the authorization rule defined in the Secure Store application for the group credentials, then the data is provided.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$ssApp = Get-SPSecureStoreApplication -ServiceContext http://contoso -Name "ContosoGroupTargetApplication"


$firstCredential = ConvertTo-SecureString "LOBDATABASE\fulltimeemployees" -AsPlainText -Force
$secondCredential = ConvertTo-SecureString "abcDEF123$%^" -AsPlainText -Force
$credentialValues = $firstCredential,$secondCredential
Update-SPSecureStoreGroupCredentialMapping -Identity $ssApp -Values $credentialValues

This example adds a credential mapping for the target application ContosoGroupTargetApplication, for all users in
this group target application. These users are mapped to a pair of credential values on the External System with a
username of identity fulltimeemployees on domain LOBDATABASE and with password abcDEF123$%^.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the Secure Store application (that contains the principal) from which to delete the credential mapping.

Type: SPSecureStoreApplication
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Values
Specifies the field values for the credential mapping.

Type: SecureString[]
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPSecureStoreMasterKey
In ths Article

Changes the master key of a Secure Store Service application.

Syntax
Update-SPSecureStoreMasterKey -Passphrase <String> -ServiceApplicationProxy <SPServiceApplicationProxyPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Update-SPSecureStoreApplicationServerKey cmdlet changes the master key of a Secure Store Service
application.
Updating the master key is required when:
--A new instance of a service application is created and the database for the Secure Store service application is new
or empty.
--The master key or passphrase has been compromised.
--Security guidelines require that the passphrase or key be replaced.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

$newPassPhrase = "abcDEF123!"
$proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq 'Secure Store Service Application Proxy'}
Update-SPSecureStoreMasterKey -ServiceApplicationProxy $proxy -Passphrase $newPassPhrase

This example creates a new master key for the given service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Passphrase
Specifies the passphrase that is used for the Secure Store database. The passphrase that you enter is not stored.
Make sure that you write down the passphrase and store it in a secure location. The passphrase will be required to
add new Secure Store service servers.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServiceApplicationProxy
Specifies the proxy of the Secure Store service application that contains the master key to update.

Type: SPServiceApplicationProxyPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPSolution
In ths Article

Upgrades a deployed SharePoint solution.

Syntax
Update-SPSolution [-Identity] <SPSolutionPipeBind> -LiteralPath <String>
[-AssignmentCollection <SPAssignmentCollection>] [-CASPolicies] [-Confirm] [-Force] [-GACDeployment] [-Local]
[-Time <String>] [-WhatIf] [-FullTrustBinDeployment] [<CommonParameters>]

Description
The Update-SPSolution cmdlet upgrades a deployed SharePoint solution in the farm. Use this cmdlet only if a new
solution contains the same set of files and features as the deployed solution. If files and features are different, the
solution must be retracted and redeployed by using the Uninstall-SPSolution and Install-SPSolution cmdlets,
respectively.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Update-SPSolution -Identity contoso_solution.wsp -LiteralPath c:\contoso_solution_v2.wsp -GACDeployment

This example upgrades the deployed SharePoint solution contoso_solution.wsp to the solution
c:\contoso_solution_v2.wsp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-CASPolicies
Specifies that Code Access Security (CAS ) policies can be deployed for the new SharePoint solution.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force
Forces the deployment of the new SharePoint solution.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FullTrustBinDeployment
Specifies whether to deploy using fully trusted bin.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GACDeployment
Specifies that the new SharePoint solution can be deployed to the global assembly cache (GAC ).
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SharePoint solution to deploy.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a
SharePoint solution (for example, SPSolution1); or an instance of a valid SPSolution object.

Type: SPSolutionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-LiteralPath
Specifies the path to the solution package.
The type must be a valid path in either of the following forms:
C:\folder_name
\\server_name\folder_name

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Local
Deploys the solution on the local computer only.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Time
Specifies when the solution will be deployed. The default value is immediate deployment.
The type must be a valid DateTime value, in the form 2010, 5, 1.
Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPUserSolution
In ths Article

Upgrades an activated sandboxed solution in a farm.

Syntax
Update-SPUserSolution [-Identity] <SPUserSolutionPipeBind> -Site <SPSitePipeBind>
-ToSolution <SPUserSolutionPipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf]
[<CommonParameters>]

Description
The Update-SPUserSolution cmdlet upgrades a sandboxed solution that has already been activated in a specified
site collection. A user solution is a sandboxed solution. Before you use this cmdlet to upgrade the activated
solution, use the Add-SPUserSolution cmdlet to upload the upgraded solution to the solution gallery.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE---------------------

Update-SPUserSolution -Identity contoso_solution.wsp -Site https://sitename -ToSolution contoso_solution_v2.wsp

This example upgrades the sandboxed solution contoso_solution.wsp in the site https://sitename to the sandboxed
solution contoso_solution_v2.wsp.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the sandboxed solution to upgrade.
The type must be a valid name of a sandboxed solution (for example, UserSolution1); or an instance of a valid
SPUserSolution object.

Type: SPUserSolutionPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Site
Upgrade the sandboxed solution for the specified site collection.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form
https://server_name; or an instance of a valid SPSite object.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ToSolution
Specifies the sandboxed solution you want to upgrade to.
The type must be a valid name of a sandboxed solution (for example, UserSolution1); or an instance of a valid
SPUserSolution object.
Type: SPUserSolutionPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Update-SPWOPIProofKey
In ths Article

Updates the public key that is used to connect to the WOPI application on the current SharePoint farm where this
cmdlet is run.

Syntax
Update-SPWOPIProofKey [-AssignmentCollection <SPAssignmentCollection>] [-ServerName <String>]
[<CommonParameters>]

Description
The Update-SPWOPIProofKey cmdlet updates the public key that is used to connect to the WOPI application (which
could be a server that runs Office Web Apps Server) on the current SharePoint farm where this cmdlet is run. You
may want to use this cmdlet if the keys become unsynchronized between the SharePoint farm and the WOPI
application. If the keys are unsynchronized, documents may not open in the browser and messages such as "Invalid
Proof Signature for file..." or "Invalid Proof Signature for folder..." are found in the Unified Logging System (ULS )
logs.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------------EXAMPLE-----------------

Update-SPWOPIProofKey -ServerName "Server.corp.Contoso.com"

This example obtains the current public key from the WOPI application (such as a server that runs Office Web
Apps Server) and updates the key that is stored on the SharePoint farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ServerName
Specifies the WOPI application to obtain the key from. This may be a server that runs Office Web Apps Server. If
this parameter is missing, public keys for all WOPI applications which are connected to the current SharePoint
farm, are updated.

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Content roadmap f or Of f ice Web Apps

Use Of f ice Web Apps wit h SharePoint 2013


minutes to read • Edit Online

Upgrade-SPAppManagementServiceApplication
In ths Article

Do Not Use

Syntax
Upgrade-SPAppManagementServiceApplication [[-Identity] <SPServiceApplicationPipeBind>]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-DatabaseIds <Guid[]>] [-WhatIf]
[<CommonParameters>]

Upgrade-SPAppManagementServiceApplication [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]


[-DatabaseIds <Guid[]>] [-Name <String>] [-WhatIf] [<CommonParameters>]

Description
Do Not Use

Examples
--------------EXAMPLE-----------------

Do Not Use

Parameters
-AssignmentCollection
Do Not Use

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DatabaseIds
Do Not Use

Type: Guid[]
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Do Not Use

Type: SPServiceApplicationPipeBind
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Do Not Use

Type: String
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection
Outputs
System.Object
minutes to read • Edit Online

Upgrade-SPContentDatabase
In ths Article

Resumes a failed database upgrade or begins a build-to-build database upgrade.

Syntax
Upgrade-SPContentDatabase [-Identity] <SPContentDatabasePipeBind> [-ForceDeleteLock]
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-NoB2BSiteUpgrade]
[-ServerInstance <SPDatabaseServiceInstancePipeBind>] [-SkipIntegrityChecks] [-UseSnapshot] [-WhatIf]
[-AllowUnattached] [-SkipSiteUpgrade] [<CommonParameters>]

Upgrade-SPContentDatabase [-ForceDeleteLock] -Name <String> -WebApplication <SPWebApplicationPipeBind>


[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-NoB2BSiteUpgrade]
[-ServerInstance <SPDatabaseServiceInstancePipeBind>] [-SkipIntegrityChecks] [-UseSnapshot] [-WhatIf]
[-AllowUnattached] [-SkipSiteUpgrade] [<CommonParameters>]

Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you
may not combine parameters from different parameter sets. For more information about how to use parameter
sets, see Cmdlet Parameter Sets.
Use the Upgrade-SPContentDatabase cmdlet to resume a failed database upgrade or begin a build-to-build database
upgrade against a SharePoint content database. The Upgrade-SPContentDatabase cmdlet initiates an upgrade of an
existing content database that is attached to the current farm. This cmdlet begins a new upgrade session, which can
be used either to resume a failed version-to-version or build-to-build upgrade of a content database or to begin a
build-to-build upgrade of a content database.
If the database is hosted on a version of SQL Server that supports creation and use of snapshots of the database,
this cmdlet can use a database snapshot for build-to-build upgrades. During upgrade, users see a ready-only
version of the database, which is the snapshot. After upgrade users see upgraded content.
The default behavior of this cmdlet causes an upgrade of the schema of the database and initiates build-to-build
upgrades for all site collections within the specified content database if required. To prevent build-to-build
upgrades of site collections, use the NoB2BSiteUpgrade parameter.
This cmdlet does not trigger version-to-version upgrade of any site collections.

Examples
--------------------------EXAMPLE 1------------------------------

Upgrade-SPContentDatabase WSS_Content

This example upgrades the existing WSS_Content content database schema and then performs only build-to-build
upgrade actions on existing site collections if required. This operation does not changed the CompatibilityLevel for
existing site collections in this database.
--------------------------EXAMPLE 2------------------------------

Upgrade-SPContentDatabase WSS_Content -NoB2BSiteUpgrade

This example upgrades the existing WSS_Content content database schema only. No build-to-build upgrade
actions are performed on any site collections. This operation does not change The CompatibilityLevel for existing
site collections in this database.
--------------------------EXAMPLE 3------------------------------

Upgrade-SPContentDatabase WSS_Content -NoB2BSiteUpgrade -UseSnapshot

This example upgrades the existing WSS_Content content database schema only while using a snapshot of the
database to retain read-only access to the content during the upgrade. No build-to-build upgrade actions are
performed on any site collections. This operation does not change the CompatibilityLevel for existing site
collections in this database.

Parameters
-AllowUnattached
Lets the upgrade process to proceed on a content database which is not currently attached to a SharePoint farm.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForceDeleteLock
Forces deletion of locks on the database before the upgrade starts.

Type: SwitchParameter
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the content database to upgrade.
The value must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh or an instance of a valid
SPContentDatabase object.

Type: SPContentDatabasePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name
Specifies the name of attached content database.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoB2BSiteUpgrade
Specifies to not upgrade all child objects when performing a build-to-build upgrade.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerInstance
The SQL Server instance that hosts the attached content database.
Type: SPDatabaseServiceInstancePipeBind
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipIntegrityChecks
Specifies the upgrade process not to run the internal integrity checks such as missing templates and orphan
detection as part of the upgrade process.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipSiteUpgrade
Specifies to not upgrade databases and their child objects when performing upgrade.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseSnapshot
Specifies to use the snapshot method to perform unattached upgrade. This will make a snapshot of the current
database and then perform all upgrade operations that apply to the database and optionally to its contents.
The existing connections to the content database will be set to use the snapshot for the duration of the upgrade and
then switched back after successful completion of upgrade. A failed upgrade reverts the database to its state when
the snapshot was taken.
This parameter only works for versions of SQL Server that support creation and use of snapshots, for example,
SQL ServerEnterprise edition.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WebApplication
Specifies the web application that hosts the attached content database.
Type: SPWebApplicationPipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Upgrade-SPEnterpriseSearchServiceApplication
In ths Article

Upgrades a search service application.

Syntax
Upgrade-SPEnterpriseSearchServiceApplication [-Identity] <SearchServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
This cmdlet starts an upgrade process on a search service application. This cmdlet runs the associated upgrade
actions for the search service application. Also, you can upgrade multiple search service applications in parallel by
starting several instances of this cmdlet. It is not necessary to run this cmdlet if you already have run the
SharePoint Products Configuration Wizard.
For the upgrade process to run successful, all of the computers in the farm must have the same version of binaries
installed.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
----------------EXAMPLE 1-----------------

Get-SPEnterpriseSearchServiceApplication | Upgrade-SPEnterpriseSearchServiceApplication

This example upgrades a search service application.


----------------EXAMPLE 2-----------------

Upgrade-SPEnterpriseSearchServiceApplication -Identity 846ceb0b-31d6-4c79-82c1-3a9deafe0b45

This example upgrades a search service application.


----------------EXAMPLE 3-----------------

Upgrade-SPEnterpriseSearchServiceApplication "DefaultSearchApplication"

This example upgrades a search service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the search service application to upgrade.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application
name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object.

Type: SearchServiceApplicationPipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Upgrade-SPEnterpriseSearchServiceApplicationSiteSettings
In ths Article

Upgrades search settings for a particular site collection.

Syntax
Upgrade-SPEnterpriseSearchServiceApplicationSiteSettings -Identity <SPSitePipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Use the Upgrade-SPEnterpriseSearchServiceApplicationSiteSettings cmdlet to upgrade the search settings for
specified site collection from 2010 to 2013 experience. The upgrades include conversion of best bets to query rules.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
--------EXAMPLE--------

C:\PS>$site= Get-SPSite https://test

Upgrade-SPEnterpriseSearchServiceApplicationSiteSettings -Identity $site

This example upgrades the search settings for the site collection referenced by $site.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the site collection for which to upgrade search settings. The type must be a valid GUID, in the form
12345678-90ab-cdef-1234-567890bcdefgh.

Type: SPSitePipeBind
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links
Remove-SPEnterpriseSearchServiceApplicationSiteSettings
minutes to read • Edit Online

Upgrade-SPFarm
In ths Article

Activates the Upgrade method for the local farm.

Syntax
Upgrade-SPFarm [-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [-ServerOnly]
[-SkipDatabaseUpgrade] [-SkipSiteUpgrade] [<CommonParameters>]

Description
The Upgrade-SPFarm cmdlet starts the upgrade process on the local farm.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-----------EXAMPLE---------

Upgrade-SPFarm

This example starts the upgrade process on the local farm.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ServerOnly
Specifies to only upgrade local server.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipDatabaseUpgrade
Specifies to not upgrade databases and their child objects when performing upgrade.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipSiteUpgrade
Specifies to not upgrade all site objects when performing upgrade.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Upgrade-SPProfileServiceApplication
In ths Article

Upgrades User Profile Service and its related profile and social store.

Syntax
Upgrade-SPProfileServiceApplication [-Identity] <SPServiceApplicationPipeBind>
[-AssignmentCollection <SPAssignmentCollection>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description
Upgrades User Profile Service and its related profile and social store.

Examples
-----------EXAMPLE---------

$sa = Get-SPServiceApplication | ?{$_.TypeName -eq 'User Profile Service Application'}


Upgrade-SPProfileServiceApplication $sa

This example upgrades the specified user profile service application.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the User Profile Service application to update.The type must be a valid GUID, in the form 12345678-
90ab-cdef-1234-567890bcdefgh; a valid name of a user profile service application (for example,
UserProfileServiceApp); or an instance of a valid SPServiceApplication object.

Type: SPServiceApplicationPipeBind
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Inputs
Microsoft.SharePoint.PowerShell.SPServiceApplicationPipeBind
Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Outputs
System.Object
minutes to read • Edit Online

Upgrade-SPSingleSignOnDatabase
In ths Article

Migrates the application definitions from Single Sign-On (SSO ) database to Secure Store database as target
applications.

Syntax
Upgrade-SPSingleSignOnDatabase -SecureStoreConnectionString <String> -SecureStorePassphrase <SecureString>
-SSOConnectionString <String> [-AssignmentCollection <SPAssignmentCollection>] [<CommonParameters>]

Description
The Upgrade-SPSingleSignOnDatabase cmdlet migrates the application definitions from SSO database to Secure
Store database as target applications. Use the Upgrade-SPSingleSignOn cmdlet to convert an SSO database to a
Secure Store database. SSO is a SharePoint Server feature. SSO functionality is performed by the Secure Store
Service in SharePoint Server.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
------------------EXAMPLE------------------

Upgrade-SPSingleSignOnDatabase -SSOConnectionString "Data


Source=oldServer;Database=SSO;Trusted_Connection=yes;" -SecureStoreConnectionString "Data
Source=CONTOSO\SQLDatabase;Database=ContosoSSDatabase;Trusted_Connection=yes;" -SecureStorePassphrase
"abcDEF123!@#"

This example migrates the SSO database at the SSO connection to a Secure Store database at the Secure Store
connection.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-SecureStoreConnectionString
Specifies the SQL Server connection string for the Secure Store database.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecureStorePassphrase
Specifies the passphrase used for the Secure Store database.

Type: SecureString
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SSOConnectionString
Specifies the SQL Server connection string for the SSO database.

Type: String
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Upgrade-SPSite
In ths Article

Starts the upgrade process on a site collection.

Syntax
Upgrade-SPSite [-Identity] <SPSitePipeBind> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-Email] [-QueueOnly] [-Unthrottled] [-VersionUpgrade] [-WhatIf] [-Priority <Byte>] [<CommonParameters>]

Description
The Upgrade-SPSite cmdlet starts the upgrade process on a site collection.
The Upgrade-SPSite cmdlet activates the upgrade process for the specified SPSite object. You can also use this
cmdlet to resume failed upgrades. When you use this cmdlet to initiate upgrade on an SPSite object, the object can
be either a build-to-build or version-to-version upgrade.
By default, the Upgrade-SPSite cmdlet operates as a build-to-build upgrade. This prevents unexpected version
upgrades of site collections if you use this cmdlet after a patching operation. When in version-to-version upgrade
mode, site collection health checks are run in repair mode to ensure that the site collection is healthy enough to
upgrade successfully. If successful, the remainder of the upgrade occurs.
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the
online documentation at SharePoint Server Cmdlets.

Examples
-------------EXAMPLE 1----------

Upgrade-SPSite https:///sites/testsite

This example upgrades the existing https://<site name>/sites/testsite site collection by using only build-to-build
upgrade actions. The SPSite.CompatibilityLevel will not be changed by this operation.
-------------EXAMPLE 2----------

Upgrade-SPSite https:///sites/testsite -VersionUpgrade

This example upgrades the existing https://<site name>/sites/testsite site collection by using only build-to-build
upgrade actions. The SPSite.CompatibilityLevel will not be changed by this operation.

Parameters
-AssignmentCollection
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large
amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory
management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after
they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects
are automatically disposed of if an assignment collection or the Global parameter is not used.
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately
used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before executing the command. For more information, type the following command:
get-help about_commonparameters

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email
Specifies whether to send mail on completion of the site collection upgrade.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity
Specifies the SPSite object to run upgrade operations against.

Type: SPSitePipeBind
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Priority
Specifies what priority to upgrade the site.
The valid values are:
128 - 255 (Low Priority)
11 - 127 (Normal Priority)
0 - 10 (High Priority)

Type: Byte
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-QueueOnly
Specifies to put the site into the queue for a delayed upgrade that is managed by a timer job.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Unthrottled
Specifies a farm administrator to bypass the throttle which permits a site collection to be upgraded even if there
are "too many" site collections in the throttle to be upgraded.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VersionUpgrade
Specifies to perform a version-to-version upgrade on the SPSite object. When this parameter is set, it internally
triggers all available build-to-build actions that are associated with the current site collection operating mode.
Version-to-version actions follow to bring site collections to the next site collection operating mode inclusive of all
new build-to-build actions that are associated with the new site collection operating mode. When this parameter is
not set, it triggers only available build-to-build upgrade actions that are associated with the current site collection
operating mode.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf
Displays a message that describes the effect of the command instead of executing the command. For more
information, type the following command: get-help about_commonparameters
Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
minutes to read • Edit Online

Upgrade-SPSiteMapDatabase
In ths Article

Do not use.

Syntax
Upgrade-SPSiteMapDatabase [-DatabaseId] <Guid> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm]
[-WhatIf] [<CommonParameters>]

Description
Do not use.

Examples
-------------EXAMPLE 1----------

#Do not use

Do not use.

Parameters
-AssignmentCollection
Do not use.

Type: SPAssignmentCollection
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm
Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-DatabaseId
Do

Вам также может понравиться