Crawl error Processing this item failed because of an unknown error when trying to parse its contents sharepoint

During various search troubleshooting i came across the following crawling error in the Crawl log of a SharePoint 2013 environment.

Processing this item failed because of an unknown error when trying to parse its contents. (Error parsing document ‘http://********.*****.com/Project/abcd/Q_M/ABX/SitePages/Homepage.aspx’. Sandbox worker pool is
closed.; ; SearchID = *******************)

In order to fix this you can try to perform the following action plan:
Open “Local Policies
Click on “User rights assignment

user-rights-assignment

Make sure that the search service account has the following rights:
Replace a process level token

adjust-memory-quotas-for-process

Adjust memory quotas for a process

adjust-memory-quotas-for-process-properties

Impersonate a client after authentication

impersonate

Please make sure that the policies don’t get changed afterwards.

After implementing the above changes please run a clear configuration cache
After clearing the cache, start a full crawl and the errors should be gone.

Advertisements

Slow SharePoint improve performance without upgrading hardware

what you can do if your SharePoint is sometimes very slow.

E.g.: on the first start of a Site
Sometimes during the day a search query will take about a minute until you get results…..

Just look on that article: http://support.microsoft.com/kb/2625048

it will improve “feeled” performance (site response times) massive, if you’re going to implement both solutions.

Disabling CRL Check is just necessary if the SP Server does not have internet connectivity, that means proxy settings must be configured for the server itself

http://technet.microsoft.com/de-de/library/bb430772(v=exchg.141).aspx, and your proxy must allow traffic from the server of course.

SharePoint shortcut URL and hidden list

Users and Permissions:
People and Groups: _layouts/people.aspx
Site Collection Admins: _layouts/mngsiteadmin.aspx
Advanced Permissions: _layouts/user.aspx
Master Pages: _Layouts/ChangeSiteMasterPage.aspx
Look and Feel:
Quick Launch settings page: /_layouts/quiklnch.aspx
Title, Desc, and Icon: _layouts/prjsetng.aspx
Navigation: _layouts/AreaNavigationSettings.aspx
Page Layout and Ste Templates: _Layouts/AreaTemplateSettings.aspx
Welcome Page: _Layouts/AreaWelcomePage.aspx
Tree View: _layouts/navoptions.aspx
Top Nav Bar: _layouts/topnav.aspx
Site Theme: _layouts/themeweb.aspx
Reset to Site Definition: _layouts/reghost.aspx
Searchable Columns: _Layouts/NoCrawlSettings.aspx
Site Content Types: _layouts/mngctype.aspx
Galleries
Site Columns: _layouts/mngfield.aspx
Site Templates: _catalogs/wt/Forms/Common.aspx
List Templates: _catalogs/lt/Forms/AllItems.aspx
Filter toolbar for Lists and libraries: ?Filter=1
Web Parts: _catalogs/wp/Forms/AllItems.aspx
Workflows: _layouts/wrkmng.aspx
Workflow history hidden list: /lists/Workflow History
Master Pages and Page Layouts: _catalogs/masterpage/Forms/AllItems.aspx
Regoinal Settings: _layouts/regionalsetng.aspx
Site Administration
Recreate default site sp groups: _layouts/15/permsetup.aspx
recycle bin: _layouts/RecycleBin.aspx
Site Libraries and Lists: _layouts/mcontent.aspx
Site Usage Report: _layouts/usageDetails.aspx
User Alerts: _layouts/sitesubs.aspx
RSS: _layouts/siterss.aspx
Search Visibility: _layouts/srchvis.aspx
Sites and Workspaces: _layouts/mngsubwebs.aspx
Site Features: _layouts/ManageFeatures.aspx
Delete This Site: _layouts/deleteweb.aspx
Site Output Cache: _Layouts/areacachesettings.aspx
Content and Structure: _Layouts/sitemanager.aspx
Content and Structure Logs: _Layouts/SiteManager.aspx?lro=all
Search Settings: _layouts/enhancedSearch.aspx
Site Collection Administration
Search Scopes: _layouts/viewscopes.aspx?mode=site
Search Keywords: _layouts/listkeywords.aspx
Recycle Bin: _layouts/AdminRecycleBin.aspx
Site Collection Features: _layouts/ManageFeatures.aspx?Scope=Site
Site Hierachy: _layouts/vsubwebs.aspx
Site hierarchy page (lists of sub sites): /_layouts/1033/vsubwebs.aspx
Portal Site Connection: _layouts/portal.aspx
Site Collection Audit Settings: _layouts/AuditSettings.aspx
Site Collection Policies: _layouts/Policylist.aspx
Site Collection Cache Profiles: Cache%20Profiles/AllItems.aspx
Site Collection Output Cache: _Layouts/sitecachesettings.aspx
Site Collection Object Cache: _Layouts/objectcachesettings.aspx
Variations: _Layouts/VariationSettings.aspx
Variation Labels: _Layouts/VariationLabels.aspx
Translatable Columns: _Layouts/TranslatableSettings.aspx
Variation Logs: _Layouts/VariationLogs.aspx
Site Settings: _layouts/settings.aspx
Delete user from Site collection (on-premises): /_layouts/15/people.aspx?MembershipGroupId=0

Load document tab initial
?InitialTabId=Ribbon.Document

Delete user from Site collection (on-premises):
/_layouts/15/people.aspx?MembershipGroupId=0

Display list in grid view. ‘True’ is case sensitive:
?ShowInGrid=True

Sandboxed Solution Gallery:
/_catalogs/solutions/Forms/AllItems.aspx

Filter toolbar for Lists and libraries:
?Filter=1

Site usage page:
/_layouts/usage.aspx

View all site content page (Site content):
/_layouts/viewlsts.aspx

Get the version of the SharePoint server (Patch level):
/_vti_pvt/Service.cnf

Web Part Maintenance Page:
?Contents=1

Show Page in Dialog View:
?isdlg=1

Application page for registering SharePoint apps
/_layouts/15/appregnew.aspx

Save Site as a template
/_layouts/savetmpl.aspx

Sign in as a different user
/_layouts/closeConnection.aspx?loginasanotheruser=true

Enable SharePoint designer
/_layouts/SharePointDesignerSettings.aspx

Quick Deploy List
Quick%20Deploy%20Items/AllItems.aspx

Open Page in Edit Mode
?ToolPaneView=2

Taxonomy Hidden List (MMS)
Lists/TaxonomyHiddenList/AllItems.aspx

User Information List:
_catalogs/users
_catalogs/users/simple.aspx

Force displaying the user profile in the site collection:
/_layouts/userdisp.aspx?id={UserID}&Force=True

Site hierarchy page (lists of sub sites)
/_layouts/vsubwebs.aspx
/_layouts/1033/vsubwebs.aspx

Add Web Parts Pane: ?ToolPaneView=2 : Add to the end of the page URL; will only work if the page is already checked out
Create: [area]/_layouts/spscreate.aspx
Create: /_layouts/create.aspx

Create list in a different portal area :

/_layouts/new.aspx?NewPageFilename=YourTemplateName.stp&ListTemplate=100&
ListBaseType=0

When you save a template in a portal area and try to create a new list in a different portal area, the template will not show on the Create page. Use this URL to force it to show.

Documents and Lists: /_layouts/viewlsts.aspx

List Template Gallery: /_catalogs/lt

Manage Audiences: /_layouts/Audience_Main.aspx

Manage Cross Site Groups: /_layouts/mygrps.aspx

Manage List Template Gallery: /_catalogs/lt/Forms/AllItems.aspx

Manage My Alerts: /_layouts/MySubs.aspx

Manage People: /_layouts/people.aspx

Manage Site Collection Administrators: /_layouts/mngsiteadmin.aspx

Manage Site Collection Users:
/_layouts/siteusrs.aspx : To access you must be an admin on the server or a site collection admin for the site.

Manage Site Groups: /_layouts/role.aspx

Manage Site Template Gallery: /_catalogs/wt/Forms/AllItems.aspx

Manage Site Template Gallery: /_catalogs/wt/Forms/Common.aspx

Manage Sites and Workspaces: /_layouts/mngsubwebs.aspx

Manage User Alerts: /_layouts/AlertsAdmin.aspx

Manage User Alerts: /_layouts/SiteSubs.aspx

Manage User Permissions: /_layouts/user.aspx

Manage Web Part Gallery: /_catalogs/wp/Forms/AllItems.aspx

Master Page Gallery: /_catalogs/masterpage : Also includes Page Layouts

Modify Navigation: /_layouts/AreaNavigationSettings.aspx

Recycle Bin: /_layouts/AdminRecycleBin.aspx

Save as site template: /_layouts/savetmpl.aspx

Site Column Gallery: /_layouts/mngfield.aspx

Site Content and Structure Manager: /_layouts/sitemanager.aspx

Site Content Types: /_layouts/mngctype.aspx

Site Settings: /_layouts/settings.aspx

Site Settings: /_layouts/default.aspx

Site Template Gallery: /_catalogs/wt

Site Theme: /_layouts/themeweb.aspx

Site usage details: /_layouts/UsageDetails.aspx

Site Usage Summary: /_layouts/SpUsageWeb.aspx

Site Usage Summary: /_layouts/Usage.aspx

Sites Registry: /SiteDirectory/Lists/Sites/Summary.aspx

Top-level Site Administration: /_layouts/webadmin.aspx

User Information: /_layouts/userinfo.aspx

Web Part Gallery: /_catalogs/wp

Web Part Page Maintenance: ?contents=1 : Add to the end of the page URL

Display template SharePoint Server 2013

Display templates for the Content Search Web Part

You can use the following display templates to change the appearance of content that is shown in a Content Search Web Part. These display template files are located in the Content Web Parts subfolder in the Display Templates folder in the Master Page Gallery.

template-contentsearchwebpart

Display templates for the Refinement Web Part and the Taxonomy Refinement Web Part

You can use the display templates listed in the following table to change the appearance of content that is shown in a Refinement Web Part and a Taxonomy Refinement Web Part. These display template files are located in the Filters subfolder in the Display Templates folder in the Master Page Gallery. Note that there are different display templates for different refiner types.

template-webpart

Display templates for the Search Results Web Part

You can use the display templates in the following table to change the appearance of content shown in a Search Results Web Part. Note that the hover panels for the different result types have separate display templates. These display template files are located in the Search subfolder in the Display Templates folder in the Master Page Gallery.

template-search1
template-search2

Retrive account password powershell

Basic Powershell cmdlet sharepoint

Get-Command -Noun SP*
Get-Help Get-SPSite
Get-Help Get-SPSite -Examples
PS C:\Users\de.prasad.adm> Get-Command -Noun SPSite

CommandType Name ModuleName


Cmdlet Backup-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Copy-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Move-SPSite Microsoft.SharePoint.PowerShell
Cmdlet New-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Repair-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Restore-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Set-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Test-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Upgrade-SPSite Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPWeb

CommandType Name ModuleName


Cmdlet Export-SPWeb Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWeb Microsoft.SharePoint.PowerShell
Cmdlet Import-SPWeb Microsoft.SharePoint.PowerShell
Cmdlet New-SPWeb Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPWeb Microsoft.SharePoint.PowerShell
Cmdlet Set-SPWeb Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPWebApplication

CommandType Name ModuleName


Cmdlet Convert-SPWebApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWebApplication Microsoft.SharePoint.PowerShell
Cmdlet New-SPWebApplication Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPWebApplication Microsoft.SharePoint.PowerShell
Cmdlet Set-SPWebApplication Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPServiceApplication

CommandType Name ModuleName


Cmdlet Get-SPServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Publish-SPServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Set-SPServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Unpublish-SPServiceApplication Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPServiceApplicationPool

CommandType Name ModuleName


Cmdlet Get-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
Cmdlet New-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
Cmdlet Set-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPContentDatabase

CommandType Name ModuleName


Cmdlet Dismount-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Mount-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet New-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Set-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Test-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Upgrade-SPContentDatabase Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPDatabase

CommandType Name ModuleName


Cmdlet Get-SPDatabase Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPManagedAccount

CommandType Name ModuleName


Cmdlet Get-SPManagedAccount Microsoft.SharePoint.PowerShell
Cmdlet New-SPManagedAccount Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPManagedAccount Microsoft.SharePoint.PowerShell
Cmdlet Set-SPManagedAccount Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun STimerJob
PS C:\Users\de.prasad.adm> Get-Command -Noun SPTimerJob

CommandType Name ModuleName


Cmdlet Disable-SPTimerJob Microsoft.SharePoint.PowerShell
Cmdlet Enable-SPTimerJob Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTimerJob Microsoft.SharePoint.PowerShell
Cmdlet Set-SPTimerJob Microsoft.SharePoint.PowerShell
Cmdlet Start-SPTimerJob Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun SPUser

CommandType Name ModuleName


Cmdlet Get-SPUser Microsoft.SharePoint.PowerShell
Cmdlet Move-SPUser Microsoft.SharePoint.PowerShell
Cmdlet New-SPUser Microsoft.SharePoint.PowerShell
Cmdlet Remove-SPUser Microsoft.SharePoint.PowerShell
Cmdlet Set-SPUser Microsoft.SharePoint.PowerShell
PS C:\Users\de.prasad.adm> Get-Command -Noun WebApplication

CommandType Name ModuleName


Cmdlet ConvertTo-WebApplication WebAdministration
Cmdlet Get-WebApplication WebAdministration
Cmdlet New-WebApplication WebAdministration
Cmdlet Remove-WebApplication WebAdministration
PS C:\Users\de.prasad.adm> Get-Command -Noun SPProcessAccount

CommandType Name ModuleName


Cmdlet Get-SPProcessAccount Microsoft.SharePoint.PowerShell

PS C:\Users\de.prasad.adm> Get-Command -Verb Get

Cmdlet Get-PfxCertificate Microsoft.PowerShell.Security
Cmdlet Get-PfxData PKI
Cmdlet Get-Process Microsoft.PowerShell.Management
Cmdlet Get-PSBreakpoint Microsoft.PowerShell.Utility
Cmdlet Get-PSCallStack Microsoft.PowerShell.Utility
Cmdlet Get-PSDrive Microsoft.PowerShell.Management
Cmdlet Get-PSProvider Microsoft.PowerShell.Management
Cmdlet Get-PSSession Microsoft.PowerShell.Core
Cmdlet Get-PSSessionConfiguration Microsoft.PowerShell.Core
Cmdlet Get-PSSnapin Microsoft.PowerShell.Core
Cmdlet Get-Random Microsoft.PowerShell.Utility
Cmdlet Get-ScheduledJob PSScheduledJob
Cmdlet Get-ScheduledJobOption PSScheduledJob
Cmdlet Get-SecureBootPolicy SecureBoot
Cmdlet Get-SecureBootUEFI SecureBoot
Cmdlet Get-Service Microsoft.PowerShell.Management
Cmdlet Get-SPAccessServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAccessServicesApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAccessServicesDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAccessServicesDatabaseServer Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAccessServicesDatabaseServerGroup Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAccessServicesDatabaseServerGroupMapping Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAlternateURL Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppAcquisitionConfiguration Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppAutoProvisionConnection Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppDeniedEndpointList Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppDisablingConfiguration Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppDomain Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppHostingQuotaConfiguration Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppInstance Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppPrincipal Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppScaleProfile Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppSiteSubscriptionName Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppStateSyncLastRunTime Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppStateUpdateInterval Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAppStoreConfiguration Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAuthenticationProvider Microsoft.SharePoint.PowerShell
Cmdlet Get-SPAuthenticationRealm Microsoft.SharePoint.PowerShell
Cmdlet Get-SPBackupHistory Microsoft.SharePoint.PowerShell
Cmdlet Get-SPBingMapsBlock Microsoft.SharePoint.PowerShell
Cmdlet Get-SPBingMapsKey Microsoft.SharePoint.PowerShell
Cmdlet Get-SPBrowserCustomerExperienceImprovementProgram Microsoft.SharePoint.PowerShell
Cmdlet Get-SPBusinessDataCatalogEntityNotificationWeb Microsoft.SharePoint.PowerShell
Cmdlet Get-SPBusinessDataCatalogMetadataObject Microsoft.SharePoint.PowerShell
Cmdlet Get-SPBusinessDataCatalogThrottleConfig Microsoft.SharePoint.PowerShell
Cmdlet Get-SPCertificateAuthority Microsoft.SharePoint.PowerShell
Cmdlet Get-SPClaimProvider Microsoft.SharePoint.PowerShell
Cmdlet Get-SPClaimProviderManager Microsoft.SharePoint.PowerShell
Cmdlet Get-SPClaimTypeEncoding Microsoft.SharePoint.PowerShell
Cmdlet Get-SPContentDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPContentDeploymentJob Microsoft.SharePoint.PowerShell
Cmdlet Get-SPContentDeploymentPath Microsoft.SharePoint.PowerShell
Cmdlet Get-SPCustomLayoutsPage Microsoft.SharePoint.PowerShell
Cmdlet Get-SPDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPDataConnectionFile Microsoft.SharePoint.PowerShell
Cmdlet Get-SPDataConnectionFileDependent Microsoft.SharePoint.PowerShell
Cmdlet Get-SPDeletedSite Microsoft.SharePoint.PowerShell
Cmdlet Get-SPDesignerSettings Microsoft.SharePoint.PowerShell
Cmdlet Get-SPDiagnosticConfig Microsoft.SharePoint.PowerShell
Cmdlet Get-SPDiagnosticsPerformanceCounter Microsoft.SharePoint.PowerShell
Cmdlet Get-SPDiagnosticsProvider Microsoft.SharePoint.PowerShell
Cmdlet Get-SPDistributedCacheClientSetting Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEduServiceSetting Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchAdministrationComponent Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchComponent Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchContentEnrichmentConfigur… Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchCrawlContentSource Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchCrawlCustomConnector Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchCrawlDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchCrawlExtension Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchCrawlLogReadPermission Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchCrawlMapping Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchCrawlRule Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchFileFormat Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchHostController Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchLanguageResourcePhrase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchLinguisticComponentsStatus Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchLinksDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchMetadataCategory Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchMetadataCrawledProperty Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchMetadataManagedProperty Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchMetadataMapping Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchOwner Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchPropertyRule Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchPropertyRuleCollection Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQueryAndSiteSettingsService Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQueryAndSiteSettingsServi… Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQueryAndSiteSettingsServi… Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQueryAuthority Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQueryDemoted Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQueryKeyword Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQueryScope Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQueryScopeRule Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQuerySpellingCorrection Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchQuerySuggestionCandidates Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchRankingModel Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchResultItemType Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchResultSource Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchSecurityTrimmer Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchService Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchServiceApplicationBackupS… Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchServiceApplicationProxy Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchServiceInstance Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchSiteHitRule Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchStatus Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchTopology Microsoft.SharePoint.PowerShell
Cmdlet Get-SPEnterpriseSearchVssDataPath Microsoft.SharePoint.PowerShell
Cmdlet Get-SPExcelBIServer Microsoft.SharePoint.PowerShell
Cmdlet Get-SPExcelBlockedFileType Microsoft.SharePoint.PowerShell
Cmdlet Get-SPExcelDataConnectionLibrary Microsoft.SharePoint.PowerShell
Cmdlet Get-SPExcelDataProvider Microsoft.SharePoint.PowerShell
Cmdlet Get-SPExcelFileLocation Microsoft.SharePoint.PowerShell
Cmdlet Get-SPExcelServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPExcelUserDefinedFunction Microsoft.SharePoint.PowerShell
Cmdlet Get-SPFarm Microsoft.SharePoint.PowerShell
Cmdlet Get-SPFarmConfig Microsoft.SharePoint.PowerShell
Cmdlet Get-SPFeature Microsoft.SharePoint.PowerShell
Cmdlet Get-SPHealthAnalysisRule Microsoft.SharePoint.PowerShell
Cmdlet Get-SPHelpCollection Microsoft.SharePoint.PowerShell
Cmdlet Get-SPInfoPathFormsService Microsoft.SharePoint.PowerShell
Cmdlet Get-SPInfoPathFormTemplate Microsoft.SharePoint.PowerShell
Cmdlet Get-SPInfoPathUserAgent Microsoft.SharePoint.PowerShell
Cmdlet Get-SPInfoPathWebServiceProxy Microsoft.SharePoint.PowerShell
Cmdlet Get-SPInternalAppStateSyncLastRunTime Microsoft.SharePoint.PowerShell
Cmdlet Get-SPInternalAppStateUpdateInterval Microsoft.SharePoint.PowerShell
Cmdlet Get-SPIRMSettings Microsoft.SharePoint.PowerShell
Cmdlet Get-SPLogEvent Microsoft.SharePoint.PowerShell
Cmdlet Get-SPLogLevel Microsoft.SharePoint.PowerShell
Cmdlet Get-SPManagedAccount Microsoft.SharePoint.PowerShell
Cmdlet Get-SPManagedPath Microsoft.SharePoint.PowerShell
Cmdlet Get-SPMetadataServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPMetadataServiceApplicationProxy Microsoft.SharePoint.PowerShell
Cmdlet Get-SPMobileMessagingAccount Microsoft.SharePoint.PowerShell
Cmdlet Get-SPODataConnectionSetting Microsoft.SharePoint.PowerShell
Cmdlet Get-SPODataConnectionSettingMetadata Microsoft.SharePoint.PowerShell
Cmdlet Get-SPOfficeStoreAppsDefaultActivation Microsoft.SharePoint.PowerShell
Cmdlet Get-SPPendingUpgradeActions Microsoft.SharePoint.PowerShell
Cmdlet Get-SPPerformancePointServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPPerformancePointServiceApplicationTrusted… Microsoft.SharePoint.PowerShell
Cmdlet Get-SPPluggableSecurityTrimmer Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProcessAccount Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProduct Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProfileLeader Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProfileServiceApplicationSecurity Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProjectDatabaseQuota Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProjectDatabaseState Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProjectEnterpriseProjectTaskSync Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProjectLogLevelManager Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProjectOdataConfiguration Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProjectPCSSettings Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProjectPermissionMode Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProjectQueueSettings Microsoft.SharePoint.PowerShell
Cmdlet Get-SPProjectWebInstance Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRequestManagementSettings Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRoutingMachineInfo Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRoutingMachinePool Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRoutingRule Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSDatabaseCreationScript Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSDatabaseRightsScript Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSDatabaseUpgradeScript Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSExtension Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSProxyUrl Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSServiceApplicationProxy Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSServiceApplicationServers Microsoft.SharePoint.PowerShell
Cmdlet Get-SPRSSite Microsoft.SharePoint.PowerShell
Cmdlet Get-SPScaleOutDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPScaleOutDatabaseDataState Microsoft.SharePoint.PowerShell
Cmdlet Get-SPScaleOutDatabaseInconsistency Microsoft.SharePoint.PowerShell
Cmdlet Get-SPScaleOutDatabaseLogEntry Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSecureStoreApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSecureStoreSystemAccount Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSecurityTokenServiceConfig Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServer Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServerScaleOutDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServerScaleOutDatabaseDataState Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServerScaleOutDatabaseInconsistency Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServerScaleOutDatabaseLogEntry Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServiceApplicationEndpoint Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServiceApplicationPool Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServiceApplicationProxy Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServiceApplicationProxyGroup Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServiceApplicationSecurity Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServiceContext Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServiceHostConfig Microsoft.SharePoint.PowerShell
Cmdlet Get-SPServiceInstance Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSessionStateService Microsoft.SharePoint.PowerShell
Cmdlet Get-SPShellAdmin Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSite Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteAdministration Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteSubscription Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteSubscriptionConfig Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteSubscriptionEdiscoveryHub Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteSubscriptionEdiscoverySearchScope Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteSubscriptionFeaturePack Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteSubscriptionIRMConfig Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteSubscriptionMetadataConfig Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteUpgradeSessionInfo Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSiteURL Microsoft.SharePoint.PowerShell
Cmdlet Get-SPSolution Microsoft.SharePoint.PowerShell
Cmdlet Get-SPStateServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPStateServiceApplicationProxy Microsoft.SharePoint.PowerShell
Cmdlet Get-SPStateServiceDatabase Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTaxonomySession Microsoft.SharePoint.PowerShell
Cmdlet Get-SPThrottlingRule Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTimerJob Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTopologyServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTopologyServiceApplicationProxy Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTranslationThrottlingSetting Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTrustedIdentityTokenIssuer Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTrustedRootAuthority Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTrustedSecurityTokenIssuer Microsoft.SharePoint.PowerShell
Cmdlet Get-SPTrustedServiceTokenIssuer Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUpgradeActions Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUsageApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUsageDefinition Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUsageService Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUser Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUserLicense Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUserLicenseMapping Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUserLicensing Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUserSettingsProvider Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUserSettingsProviderManager Microsoft.SharePoint.PowerShell
Cmdlet Get-SPUserSolution Microsoft.SharePoint.PowerShell
Cmdlet Get-SPVisioExternalData Microsoft.SharePoint.PowerShell
Cmdlet Get-SPVisioPerformance Microsoft.SharePoint.PowerShell
Cmdlet Get-SPVisioSafeDataProvider Microsoft.SharePoint.PowerShell
Cmdlet Get-SPVisioServiceApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPVisioServiceApplicationProxy Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWeb Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWebApplication Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWebApplicationAppDomain Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWebApplicationHttpThrottlingMonitor Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWebPartPack Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWebTemplate Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWOPIBinding Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWOPISuppressionSetting Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWOPIZone Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWorkflowConfig Microsoft.SharePoint.PowerShell
Cmdlet Get-SPWorkflowServiceApplicationProxy Microsoft.SharePoint.PowerShell
Cmdlet Get-Tpm TrustedPlatformModule
Cmdlet Get-TpmEndorsementKeyInfo TrustedPlatformModule
Cmdlet Get-TpmSupportedFeature TrustedPlatformModule
Cmdlet Get-TraceSource Microsoft.PowerShell.Utility
Cmdlet Get-Transaction Microsoft.PowerShell.Management
Cmdlet Get-TroubleshootingPack TroubleshootingPack
Cmdlet Get-TypeData Microsoft.PowerShell.Utility
Cmdlet Get-UICulture Microsoft.PowerShell.Utility
Cmdlet Get-Unique Microsoft.PowerShell.Utility
Cmdlet Get-Variable Microsoft.PowerShell.Utility
Cmdlet Get-WebAppDomain WebAdministration
Cmdlet Get-WebApplication WebAdministration
Cmdlet Get-WebApplicationMonitoringStatus Microsoft.MonitoringAgent.Pow…
Cmdlet Get-WebAppPoolState WebAdministration
Cmdlet Get-WebBinding WebAdministration
Cmdlet Get-WebCentralCertProvider WebAdministration
Cmdlet Get-WebConfigFile WebAdministration
Cmdlet Get-WebConfiguration WebAdministration
Cmdlet Get-WebConfigurationBackup WebAdministration
Cmdlet Get-WebConfigurationLocation WebAdministration
Cmdlet Get-WebConfigurationLock WebAdministration
Cmdlet Get-WebConfigurationProperty WebAdministration
Cmdlet Get-WebFilePath WebAdministration
Cmdlet Get-WebGlobalModule WebAdministration
Cmdlet Get-WebHandler WebAdministration
Cmdlet Get-WebItemState WebAdministration
Cmdlet Get-WebManagedModule WebAdministration
Cmdlet Get-WebRequest WebAdministration
Cmdlet Get-Website WebAdministration
Cmdlet Get-WebsiteState WebAdministration
Cmdlet Get-WebURL WebAdministration
Cmdlet Get-WebVirtualDirectory WebAdministration
Cmdlet Get-WheaMemoryPolicy Whea
Cmdlet Get-WIMBootEntry Dism
Cmdlet Get-WinAcceptLanguageFromLanguageListOptOut International
Cmdlet Get-WinCultureFromLanguageListOptOut International
Cmdlet Get-WinDefaultInputMethodOverride International
Cmdlet Get-WindowsDriver Dism
Cmdlet Get-WindowsEdition Dism
Cmdlet Get-WindowsErrorReporting WindowsErrorReporting
Cmdlet Get-WindowsImage Dism
Cmdlet Get-WindowsImageContent Dism
Cmdlet Get-WindowsOptionalFeature Dism
Cmdlet Get-WindowsPackage Dism
Cmdlet Get-WindowsSearchSetting WindowsSearch
Cmdlet Get-WinEvent Microsoft.PowerShell.Diagnostics
Cmdlet Get-WinHomeLocation International
Cmdlet Get-WinLanguageBarOption International
Cmdlet Get-WinSystemLocale International
Cmdlet Get-WinUILanguageOverride International
Cmdlet Get-WinUserLanguageList International
Cmdlet Get-WmiObject Microsoft.PowerShell.Management
Cmdlet Get-WSManCredSSP Microsoft.WSMan.Management
Cmdlet Get-WSManInstance Microsoft.WSMan.Management

“Unable to render the data. If the problem persists, contact your web server administrator.” error in SharePoint 2016 BCS

Created an external list SharePoint 2016 using business data connectivity services, configured secure store target application and created external list in SharePoint.
The external list displayed this error message with a correlation ID.

“Unable to render the data. If the problem persists, contact your web server administrator.”

unable-to-render-the-data-if-the-problem-persists-contact-your-web-server-administrator

ULS Log viewer found this message in the logs:

Error while executing web part: Microsoft.BusinessData.Infrastructure.BdcException: The shim execution failed unexpectedly – Unable to obtain the application proxy for the context.. —> Microsoft.Office.SecureStoreService.Server.SecureStoreServiceException: Unable to obtain the application proxy for the context.

Solution:

The web application is not associated with the secure store service application.

  • Go to SharePoint Central Administration site
  • Application management >> Click on Configure service application associations under Service Applications.
  • select the web application in which your site exist, Check the “Application proxy group” column >> Make sure the BDC and secure store service applications check boxes checked.

service-application-association-sharepoint-2016

Retrive account password powershell

Content databases contain orphaned Apps SharePoint 2013

SharePoint Health Analyzer rule “Content databases contain orphaned Apps.”

Some situation content database may become corrupted. The corrupted database may contain orphaned apps. Orphaned apps are not accessible, which causes unnecessary resource and license consumption and may result in failures in SharePoint upgrade.

Solution:

Remove app for SharePoint instances from a SharePoint 2013 site.

A user must have the Manage Web site permission to remove an app for SharePoint. By default, this permission is only available to users with the Full Control permission level or who are in the site Owners group.

To remove an app from a SharePoint site

  1. Verify that the user account that is performing this procedure is a member of the Site owners group.
  2. On the site, on the Settings menu, click View Site Contents.
    In the Apps section, point to the app that you want to remove, click …, and then 3. click Remove.
  3. Click OK to confirm that you want to remove the app.

To remove an app by using Windows PowerShell

Verify that you have the following memberships:

a. securityadmin fixed server role on the SQL Server instance.
b. db_owner fixed database role on all databases that are to be updated.
c. Administrators group on the server on which you are running the Windows PowerShell cmdlets.
d. Site Owners group on the site collection to which you want to install the app.

An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 15 Products cmdlets.

On the Start screen, click SharePoint 2013 Management Shell.

type the following commands, and press ENTER after each one:

$instances = Get-SPAppInstance -Web
#Gets all apps installed to the subsite you specify.

$instance = $instances | where {$_.Title -eq ”}
#Sets the $instance variable to the app with the title you supply.

Uninstall-SPAppInstance -Identity $instance
#Uninstalls the app from the subsite.

is the path site collection or subsite that contains the app.
is the title of the app you want to remove.

At the question “Are you sure you want to perform this action?”,
type Y to uninstall the app.

Locate and remove app instances in all locations

An app for SharePoint in the App Catalog is available for users to install.Users can install apps for SharePoint on many sites.

Below two Windows PowerShell scripts can be used to find all locations for a specific app and then uninstall all instances from every location.

First script to locate all instances of a specific app in a SharePoint environment. Then use the second script to uninstall all instances of the app from the SharePoint environment.

To locate specific apps by using Windows PowerShell (save as script and run script)

Verify that you have the following memberships:

a. securityadmin fixed server role on the SQL Server instance.
b. db_owner fixed database role on all databases that are to be updated.
c. Administrators group on the server on which you are running Windows PowerShell cmdlets.

An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 2013 cmdlets

1. save the below script as “Get-AppInstances.ps1”

This Windows PowerShell script gets all app instances from your SharePoint 2013 farm for a specified App ID on a specified web application. You specify the App ID and the web application URL and the script will remove all of the instances of the App for all webs in that web application.

param(
[Parameter(Mandatory=$true)] [Guid] $productId,
[Parameter(Mandatory=$true)] [String] $webAppUrl
)

function GetAllInstances($productId = $null, $webAppUrl = $null)
{
$outAppName = “”;
$sites = Get-SPSite -WebApplication $webAppUrl
$outWebs = @()
foreach($site in $sites){
if($site.AdministrationSiteType -ne “None”){
continue;
}
$webs = Get-SPWeb -site $site
foreach($web in $webs) {
$appinstances = Get-SPAppInstance -Web $web
foreach($instance in $appinstances) {
if($productId -eq $instance.App.ProductId) {
if ($outAppName -eq “”) {
$outAppName = $instance.Title;
}
$outWebs += $web;
}
}
}
}
return ($outAppName,$outWebs)
}
Write-Host “This script will search all the sites in the webAppUrl for installed instances of the App.”
$confirm = Read-Host “This can take a while. Proceed? (y/n)”
if($confirm -ne “y”){
Exit
}

$global:appName = $null;
$global:webs = $null;

{
$returnvalue = GetAllInstances -productId $productId -webAppUrl $webAppUrl;
$global:appName = $returnvalue[0];
$global:webs = $returnvalue[1];
}
);

$count = $global:webs.Count;
if($count -gt 0){
Write-Host “App Name:” $global:appName;
Write-Host “Product Id: $productId”;
Write-Host “Number of instances: $count”;
Write-Host “”;
Write-Host “Urls:”;

foreach($web in $global:webs) {
Write-Host $web.Url;
}
}
else {
Write-Host “No instances of the App with Product Id $productId found.”;
}
return;

  1. Now Open “SharePoint 2013 Management Shell”
  2. Change to the directory where you saved the file.

  3. At the Windows PowerShell command prompt, type the following command:

./ Get-AppInstances.ps1 -productId -webAppUrl

is the GUID ID of the App
and is the full URL of the web application.

To uninstall specific apps from all locations by using Windows PowerShell (save as script and run script)

1. Verify that you have the following memberships:

a. securityadmin fixed server role on the SQL Server instance.
b. db_owner fixed database role on all databases that are to be updated.
c. Administrators group on the server on which you are running Windows PowerShell cmdlets.

An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 2013 cmdlets

2. save the below script as “Remove-App.ps1”

This Windows PowerShell script removes all app instances from your SharePoint 2013 farm for a specified App ID on a specified web application. You specify the App ID and the web application URL and the script will remove all of the instances of the App for all webs in that web application.

param(
[Parameter(Mandatory=$true)] [Guid] $productId,
[Parameter(Mandatory=$true)] [String] $webAppUrl
)

function RemoveInstances($productId = $null, $webAppUrl = $null)
{
$outAppName = “”;
$sites = Get-SPSite -WebApplication $webAppUrl
$outWebs = @()
foreach($site in $sites){
if($site.AdministrationSiteType -ne “None”){
continue;
}
$webs = Get-SPWeb -site $site
foreach($web in $webs) {
$appinstances = Get-SPAppInstance -Web $web
foreach($instance in $appinstances) {
if($productId -eq $instance.App.ProductId) {
if ($outAppName -eq “”) {
$outAppName = $instance.Title;
}
$outWebs += $web;
Write-Host “Uninstalling from” $web.Url;
Uninstall-SPAppInstance -Identity $instance -confirm:$false
}
}
}
}
return ($outAppName,$outWebs)
}

$confirm = Read-Host “This will uninstall all instances of the App and is irreversible. Proceed? (y/n)”
if($confirm -ne “y”){
Exit
}

$global:appName = $null;
$global:webs = $null;

{
$returnvalue = RemoveInstances -productId $productId -webAppUrl $webAppUrl;
$global:appName = $returnvalue[0];
$global:webs = $returnvalue[1];
}
);

$count = $global:webs.Count;
if($count -gt 0){
Write-Host “All the instances of the following App have been uninstalled:”;
Write-Host “App Name:” $global:appName;
Write-Host “Product Id: $productId”;
Write-Host “Number of instances: $count”;
Write-Host “”;
Write-Host “Urls:”;

foreach($web in $global:webs) {
Write-Host $web.Url;
}
}
else {
Write-Host “No instances of the App with Product Id $productId found.”;
}
return;

  1. Open SharePoint 2013 Management Shell
  • Change to the directory where you saved the file.

  • At the Windows PowerShell command prompt, type the following command:

  • ./ Remove-App.ps1 -productId -webAppUrl

    is the GUID ID of the App
    is the full URL of the web application.

    If the issue still persists like as below

    If you have an orphaned app in the initialized state on a site and you delete the site, Health Analyzer reports that there’s an error and the auto-fix doesn’t work.”

    Apply CU November 2016 which will 100% resolve the issue

    SharePoint Server 2013 (KB3127933)
    SharePoint Foundation 2013 (KB3127930)