Tag Archives: SharePoint 2013

Query remote User Profile with PowerShell and REST API

The below code leverage SharePoint 2013 REST /_api/ to get User Profile detail remotely.   WebClient issues the HTTP GET and saves XML response.   Parsing XML gives full profile detail which can be exported or saved with other functions.   Hope this helps!  shades_smile

 

NOTE – Remember to replace “sharepoint2013” with target farm DNS and “domain\” with Active Directory domain.

 

function getRemoteUserProfile ($user) {
	# Config
	$url = "http://sharepoint2013/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='domain\$user'"
	$file = "c:\temp\response.html"
	
	# WebClient
	$wc = New-Object System.Net.WebClient
	$wc.UseDefaultCredentials = $true
	$wc.Proxy.Credentials = $wc.Credentials
	$wc.DownloadFile($url, $file)
	# Parse
	$x = Get-Content $file
	$upp = $x.entry.content.properties.UserProfileProperties
	$costcenter = ($upp.element |? {$_.Key -eq "costcenter"}).Value
	$division = ($upp.element |? {$_.Key -eq "division"}).Value
	$department = ($upp.element |? {$_.Key -eq "department"}).Value
	# Display
	$obj = New-Object –Type PSObject –Prop @{'User'=$user;'costcenter'=$costcenter;'division'=$division;'department'=$department}
	return $obj
}
# Main
getRemoteUserProfile "sptest1"
getRemoteUserProfile "sptest2"
getRemoteUserProfile "sptest3"

SharePoint 2013 Feature GUID Reference

Below is a table with 410 out of the box features.  Each is an instance of the Microsoft.SharePoint.Administration.SPFeatureDefinition class.   Hopefully this reference will be useful if needing to map a Feature GUID from an error message back to a friendly name.  Enjoy!  shades_smile

 

DisplayNameId
AbuseReportsListc6a92dbf-6441-4b8b-882f-8d97cb12c83a
AccessRequestsa0f12ee4-9b60-4ba4-81f6-75724f4ca973
AccSrvApplication1cc4b32c-299b-41aa-9770-67715ea05f25
AccSrvMSysAso29ea7495-fca1-4dc6-8ac1-500c247a036e
AccSrvRestrictedLista4d4ee2c-a6cb-4191-ab0a-21bb5bde92fb
AccSrvShellbcf89eb7-bca1-4468-bdb4-ca27f61a2292
AccSrvSolutionGallery744b5fd3-3b09-4da6-9bd1-de18315b045d
AccSrvSolutionGalleryStaplerd5ff2d2c-8571-4c3c-87bc-779111979811
AccSrvUserTemplate1a8251a0-47ab-453d-95d4-07d7ca4f8166
AccSrvUSysAppLog28101b19-b896-44f4-9264-db028f307a62
AccSvcAddAccessAppd2b9ec23-526b-42c5-87b6-852bd83e0364
AccSvcAddAccessAppStapling3d7415e4-61ba-4669-8d78-213d374d9825
AccSvcApplication5094e988-524b-446c-b2f6-040b5be46297
AccSvcShell7ffd6d57-4b10-4edb-ac26-c2cfbf8173ab
AddDashboardd250636f-0a26-4019-8425-a5232d592c09
AdminLinksfead7313-ae6d-45dd-8260-13b563cb4c71
AdminReportCoreb8f36433-367d-49f3-ae11-f7d76b51d251
AdminReportCorePushdown55312854-855b-4088-b09d-c5efe0fbf9d2
AnnouncementsList00bfea71-d1ce-42de-9c63-a44004ce0104
AppLockdown23330bdb-b83e-4e09-8770-8155aa5e87fd
AppRegistrationfdc6383e-3f1d-4599-8b7c-c515e99cbf18
AppRequestsList334dfc83-8655-48a1-b79d-68b7f6c63222
AssetLibrary4bcccd62-dcaf-46dc-a7d4-e38277ef33f4
AutohostedAppLicensingfa7cefd8-5595-4d68-84fa-fe2d9e693de7
AutohostedAppLicensingStapling013a0db9-1607-4c42-8f71-08d821d395c2
BaseSiteb21b090c-c796-4b0f-ac0f-7ef1659c20ae
BaseSiteStapling97a2485f-ef4b-401f-9167-fa4fe177c6f6
BaseWeb99fe402e-89a0-45aa-9163-85342e865dc8
BaseWebApplication4f56f9fa-51a0-420c-b707-63ecbb494db1
BasicWebParts00bfea71-1c5e-4a24-b310-ba51c3eb7a57
BcsEvents60c8481d-4b54-4853-ab9f-ed7e1c21d7e4
BDR3f59333f-4ce1-406d-8a97-9ecb0ff0337f
BICenterDashboardsLibf979e4dc-1852-4f26-ab92-d1b2a190afc9
BICenterDataConnections3d8210e9-1e89-4f12-98ef-643995339ed4
BICenterDataconnectionsLib26676156-91a0-49f7-87aa-37b1d5f0c4d0
BICenterDataConnectionsListInstancea64c4402-7037-4476-a290-84cfd56ca01d
BICenterFeatureStapler3a027b18-36e4-4005-9473-dd73e6756a73
BICenterPPSContentPagesa354e6b3-6015-4744-bdc2-2fc1e4769e65
BICenterPPSNavigationLinkfaf31b50-880a-4e4f-a21b-597f6b4d6478
BICenterPPSWorkspaceListInstancef9c216ad-35c7-4538-abb8-8ec631a5dff7
BICenterSampleData3992d4ab-fa9e-4791-9158-5ee32178e88a
BizAppsCTypes43f41342-1a37-4372-8ca0-b44d881e4434
BizAppsFields5a979115-6b71-45a5-9881-cdc872051a69
BizAppsListTemplates065c78be-5231-477e-a972-14177cc5b3c7
BizAppsSiteTemplates4248e21f-a816-4c88-8cab-79d82201da7b
BlogContent0d1c50f7-0309-431c-adfb-b777d5473a65
BlogHomePagee4639bb7-6e95-4e2f-b562-03b832dd4793
BlogSiteTemplatefaf00902-6bab-4583-bd02-84db191801d8
BulkWorkflowaeef8777-70c0-429f-8a13-f12db47a6d47
BulkWorkflowTimerJobd992aeca-3802-483a-ab40-6c9376300b61
CallTrackList239650e3-ee0b-44a0-a22a-48292402b8d8
CategoriesListd32700c7-9ec5-45e6-9c89-ea703efca1df
CirculationLista568770a-50ba-4052-ab48-37d8029b3f47
CmisProducer1fce0577-1f58-4fc2-a996-6c4bcf59eeed
CollaborationMailbox502a2d54-6102-4757-aaa0-a90586106368
CollaborationMailboxFarm3a11d8ef-641e-4c79-b4d9-be3b17f9607c
CommunityPortal2b03956c-9271-4d1c-868a-07df2971ed30
CommunitySite961d6a9c-4388-4cf2-9733-38ee8c89afd4
ContactsList00bfea71-7e6d-4186-9ba8-c047ac750105
ContentDeploymentSourcecd1a49b0-c067-4fdd-adfe-69e6f5022c1a
ContentFollowing7890e045-6c96-48d8-96e7-6a1d63737d71
ContentFollowingLista34e5458-8d20-4c0d-b137-e1390f5824a1
ContentFollowingStaplinge1580c3c-c510-453b-be15-35feb0ddb1a5
ContentLightup0f121a23-c6bc-400f-87e4-e6bbddf6916d
ContentTypeHub9a447926-5937-44cb-857a-d3829301c73b
ContentTypePublishdd903064-c9d8-4718-b4e7-8ab9bd039fff
ContentTypeSettingsfead7313-4b9e-4632-80a2-ff00a2d83297
ContentTypeSyndication34339dc9-dec4-4256-b44a-b30ff2991a64
CorporateCatalog0ac11793-9c2f-4cac-8f22-33f93fac18f2
CorporateCuratedGallerySettingsf8bea737-255e-4758-ab82-e34bb46f5828
CrossFarmSitePermissionsa5aedf1a-12e5-46b4-8348-544386d5312d
CrossSiteCollectionPublishing151d22d9-95a8-4904-a0a3-22e4db85d1e0
ctypes695b6570-a48b-4a8e-8ea5-26ea7fc1d162
CustomList00bfea71-de22-43b2-a848-c05709900100
DataConnectionLibrary00bfea71-dbd7-4f72-b8cb-da7ac0440130
DataConnectionLibraryStaplingcdfa39c6-6413-4508-bccf-bf30368472b3
DataSourceLibrary00bfea71-f381-423d-b9d1-da7a54c50110
DeploymentLinksca2543e6-29a1-40c1-bba9-bd8510a4c17b
Developere374875e-06b6-11e0-b0fa-57f5dfd72085
DiscussionsList00bfea71-6a49-43fa-b535-d15c05500108
DMContentTypeSettings1ec2c859-e9cb-4d79-9b2b-ea8df09ede22
DocIdb50e3104-6812-424f-a011-cc90e6327318
docmarketplace184c82e7-7eb1-4384-8e8c-62720ef397a0
docmarketplacesafecontrols5690f1a0-22b6-4262-b1c2-74f505bc0670
docmarketplacesampledata1dfd85c5-feff-489f-a71f-9322f8b13902
DocumentLibrary00bfea71-e717-4e80-aa17-d0c71b360101
DocumentManagement3a4ce811-6fe0-4e97-a6ae-675470282cf2
DocumentRouting7ad5272a-2694-4349-953e-ea5ef290e97c
DocumentRoutingResources0c8a9a47-22a9-4798-82f1-00e62a96006e
DocumentSet3bae86a2-776d-499d-9db8-fa4cdc7884f8
DownloadFromOfficeDotComa140a1ac-e757-465d-94d4-2ca25ab2c662
EDiscoveryCaseResourcese8c02a2a-9010-4f98-af88-6668d59f91a7
EDiscoveryConsole250042b9-1aad-4b56-a8a6-69d9fe1c8c2c
EduAdminLinks03509cfb-8b2f-4f46-a4c9-8316d1e62a4b
EduAdminPagesc1b78fe6-9110-42e8-87cb-5bd1c8ab278a
EduCommunitybf76fc2c-e6c9-11df-b52f-cb00e0d72085
EduCommunityCustomSiteActions739ec067-2b57-463e-a986-354be77bb828
EduCommunitySite2e030413-c4ff-41a4-8ee0-f6688950b34a
EduCourseCommunitya16e895c-e61a-11df-8f6e-103edfd72085
EduCourseCommunitySite824a259f-2cce-4006-96cd-20c806ee9cfd
EduDashboard5025492c-dae2-4c00-8f34-cd08f7c7c294
EduFarmWebApplicationcb869762-c694-439e-8d05-cf5ca066f271
EduInstitutionAdmin41bfb21c-0447-4c97-bc62-0b07bec262a1
EduInstitutionSiteCollection978513c0-1e6c-4efb-b12e-7698963bfd05
EduMembershipUIbd012a1f-c69b-4a13-b6a4-f8bc3e59760e
EduMySiteCommunityabf1a85c-e91a-11df-bf2e-f7acdfd72085
EduMySiteHost932f5bb1-e815-4c14-8917-c2bae32f70fe
EduSearchDisplayTemplates8d75610e-5ff9-4cd1-aefc-8b926f2af771
EduShared08585e12-4762-4cc9-842a-a8d7b074bdb7
EduStudyGroupCommunitya46935c3-545f-4c15-a2fd-3a19b62d8a02
EduUserCache7f52c29e-736d-11e0-80b8-9edd4724019b
EduWebApplication7de489aa-2e4a-46ff-88f0-d1b5a9d43709
EMailRoutingd44a1358-e800-47e8-8180-adf2d0f77543
EmailTemplates397942ec-14bf-490e-a983-95b87d0d29d1
EnableAppSideLoadingae3a1339-61f5-4f8f-81a7-abd2da956a7d
EnhancedHtmlEditing81ebc0d6-8fb2-4e3f-b2f8-062640037398
EnhancedTheming068bc832-4951-11dc-8314-0800200c9a66
EnterpriseWiki76d688ad-c16e-4cec-9b71-7b7f0d79b9cd
EnterpriseWikiLayoutsa942a218-fa43-4d11-9d85-c01e3e3a37cb
EventsList00bfea71-ec85-4903-972d-ebe475780106
ExcelServere4e6a041-bc5b-45cb-beab-885a27079f74
ExcelServerEditb3da33d0-5e51-4694-99ce-705a3ac80dc5
ExcelServerSite3cb475e7-4e87-45eb-a1f3-db96ad7cf313
ExcelServerWebPart4c42ab64-55af-4c7c-986a-ac216a6e0c0e
ExcelServerWebPartStaplerc6ac73de-1936-47a4-bdff-19a6fc3ba490
ExchangeSync5f68444a-0131-4bb0-b013-454d925681a2
ExchangeSyncSiteSubscription7cd95467-1777-4b6b-903e-89e253edc1f7
ExpirationWorkflowc85e5759-f323-4efb-b548-443d2216efb5
ExternalList00bfea71-9549-43f8-b978-e47e54a10600
ExternalSubscription5b10d113-2d0d-43bd-a2fd-f8bc879f5abd
FacilityList58160a6b-4396-4d6e-867c-65381fb5fbc9
FastCentralAdminHelpCollection38969baa-3590-4635-81a4-2049d982adfa
FastEndUserHelpCollection6e8f2b8d-d765-4e69-84ea-5702574c11d6
FastFarmFeatureActivationd2d98dc8-c7e9-46ec-80a5-b38f039c16be
FCGroupsList08386d3d-7cc0-486b-a730-3b4cfe1b5509
FeaturePushdown0125140f-7123-4657-b70a-db9aa1f209e5
fieldsca7bd552-10b1-4563-85b9-5ed1d39c962a
FollowingContenta7a2793e-67cd-4dc1-9fd0-43f61581207a
GanttTasksList00bfea71-513d-4ca0-96c2-6a47775c0119
GBWProvision6e8a2add-ed09-4592-978e-8fa71e6f117c
GBWWebParts3d25bd73-7cd4-4425-b8fb-8899977f73de
GettingStarted4aec7207-0d02-4f4f-aa07-b370199cd0c7
GettingStartedWithAppCatalogSite4ddc5942-98b0-4d70-9f7f-17acfec010e5
GlobalWebParts319d8f70-eb3a-4b44-9c79-2087a87799d6
GridList00bfea71-3a1d-41d3-a0ee-651d11570120
GroupWork9c03e124-eef7-4dc6-b5eb-86ccd207cb87
HelpLibrary071de60d-4b02-4076-b001-b456e93146fe
HierarchyTasksListf9ce21f8-f437-4f7e-8bc6-946378c850f0
Hold9e56487c-795a-4077-9425-54a1ecb84282
HolidaysList9ad4c2d4-443b-4a94-8534-49a23f20ba3c
HtmlDesigna4c654e4-a8da-4db3-897c-a386048f7157
IfeDependentApps7877bbf6-30f5-4f58-99d9-a0cc787c1300
IMEDicList1c6a572c-1b58-49ab-b5db-75caf50692e6
InPlaceRecordsda2e115b-07e4-49d9-bb2c-35e93bb9fca9
ipfsAdminLinksa10b6aa4-135d-4598-88d1-8d4ff5691d13
IPFSAdminWeb750b8e49-5213-4816-9fa2-082900c0201a
IPFSSiteFeaturesc88c4ff1-dbf5-4649-ad9f-c6c426ebcbf5
IPFSTenantFormsConfig15845762-4ec4-4606-8993-1c0512a98680
IPFSTenantWebProxyConfig3c577815-7658-4d4f-a347-cfbb370700a7
IPFSWebFeaturesa0e5a010-1329-49d4-9e09-f280cdbed37d
IssuesList00bfea71-5932-4f9c-ad71-1557e5751100
IssueTrackingWorkflowfde5d850-671e-4143-950a-87b473922dc7
ItemFormRecommendations39d18bbf-6e0f-4321-8f16-4e3b51212393
LegacyDocumentLibrary6e53dd27-98f2-4ae5-85a0-e9a8ef4aa6df
LegacyWorkflowsc845ed8d-9ce5-448c-bd3e-ea71350ce45b
LinksList00bfea71-2062-426c-90bf-714c59600103
ListTargetingfc33ba3b-7919-4d7e-b791-c6aeccf8f851
LocalSiteDirectoryControl14aafd3a-fcb9-4bb7-9ad7-d8e36b663bbd
LocalSiteDirectoryMetaData8f15b342-80b1-4508-8641-0751e2b55ca6
LocalSiteDirectorySettingsLinke978b1a6-8de7-49d0-8600-09a250354e14
LocationBasedPolicy063c26fa-3ccc-4180-8a84-b6f98e991df3
MaintenanceLogs8c6f9096-388d-4eed-96ff-698b3ec46fc4
ManageUserProfileServiceApplicationc59dbaa9-fa01-495d-aaa3-3c02cc2ee8ff
MasterSiteDirectoryControl8a663fe0-9d9c-45c7-8297-66365ad50427
MBrowserRedirectd95c97f3-e528-4da2-ae9f-32b3535fbb59
MBrowserRedirectStapling2dd8788b-0e6b-4893-b4c0-73523ac261b1
MDSFeature87294c72-f260-42f3-a41b-981a2ffce37a
MediaWebPart5b79b49a-2da6-4161-95bd-7375c1995ef9
MembershipList947afd14-0ea1-46c6-be97-dea1bf6f5bae
MetaDataNav7201d6a4-a5d3-49a1-8c19-19c4bac6e668
MobileEwaFarm5a020a4f-c449-4a65-b07d-f2cc2d8778dd
MobileExcelWebAccesse995e28b-9ba8-4668-9933-cf5c146d7a9f
MobilityRedirectf41cc668-37e5-4743-b4a8-74d1db3fd8a4
MonitoredApps345ff4f9-f706-41e1-92bc-3f0ec2d9f6ea
MonitoredAppsUI1b811cfe-8c78-4982-aad7-e5c112e397d1
MossChart875d1044-c0cf-4244-8865-d2a0039c2a49
MpsWebParts39dd29fb-b6f5-4697-b526-4d38de4893e5
MruDocsWebPart1eb6a0c1-5f08-4672-b96f-16845c2448c6
MySite69cc9662-d373-47fc-9449-f18d11ff732c
MySiteBlog863da2ac-3873-4930-8498-752886210911
MySiteCleanup0faf7d1b-95b1-4053-b4e2-19fd5c9bbc88
MySiteDocumentLibrarye9c0ff81-d821-4771-8b4c-246aa7e5e9eb
MySiteHost49571cd1-b6a1-43a3-bf75-955acc79c8d8
MySiteHostPictureLibrary5ede0a86-c772-4f1d-a120-72e734b3400c
MySiteInstantiationQueues65b53aaf-4754-46d7-bb5b-7ed4cf5564e1
MySiteLayouts6928b0e5-5707-46a1-ae16-d6e52522d52b
MySiteMasterfb01ca75-b306-4fc2-ab27-b4814bf823d1
MySiteMicroBlogea23650b-0340-4708-b465-441a41c37af7
MySiteMicroBlogCtrldfa42479-9531-4baf-8873-fc65b22c9bd4
MySiteNavigation6adff05c-d581-4c05-a6b9-920f15ec6fd9
MySitePersonalSitef661430e-c155-438e-a7c6-c68648f1b119
MySiteQuickLaunch034947cc-c424-47cd-a8d1-6014f0e36925
MySiteSocialDeploymentb2741073-a92b-4836-b1d8-d5e9d73679bb
MySiteStorageDeployment0ee1129f-a2f3-41a9-9e9c-c7ee619a8c33
MySiteUnifiedNavigation41baa678-ad62-41ef-87e6-62c8917fc0ad
MySiteUnifiedQuickLauncheaa41f18-8e4a-4894-baee-60a87f026e42
MyTasksDashboard89d1184c-8191-4303-a430-7a24291531c9
MyTasksDashboardCustomRedirect04a98ac6-82d5-4e01-80ea-c0b7d9699d94
MyTasksDashboardStapling4cc8aab8-5af0-45d7-a170-169ea583866e
Nauplius.SharePoint.BlobCache_Nauplius BlobCache Settings808b09d0-1a36-488c-b40c-e08569d5a00b
Navigation89e0306d-453b-4ec5-8d68-42067cdbf98e
NavigationProperties541f5f57-c847-4e16-b59a-b31e90e6f9ea
NoCodeWorkflowLibrary00bfea71-f600-43f6-a895-40c0de7b0117
ObaProfilePages683df0c0-20b7-4852-87a3-378945158fab
ObaProfilePagesTenantStapling90c6c1e5-3719-4c52-9f36-34a97df596f7
ObaSimpleSolutiond250636f-0a26-4019-8425-a5232d592c01
ObaStaplef9cb1a2a-d285-465a-a160-7e3e95af1fdd
OfficeExtensionCatalog61e874cd-3ac3-4531-8628-28c3acb78279
OfficeWebApps0c504a5c-bcea-4376-b05e-cbca5ced7b4f
OffWFCommonc9c9515d-e4e2-4001-9050-74f980f93160
OnenoteServerViewing3d433d02-cf49-4975-81b4-aede31e16edf
OpenInClient8a4b8de2-6fd8-41e9-923c-c7c3c00f8295
OrganizationsClaimHierarchyProvider9b0293a7-8942-46b0-8b78-49d29a9edd53
OSearchBasicFeaturebc29e863-ae07-4674-bd83-2c6d0aa5623f
OSearchCentralAdminLinksc922c106-7d0a-4377-a668-7f13d52cb80f
OSearchEnhancedFeature4750c984-7721-4feb-be61-c660c6190d43
OSearchHealthReportse792e296-5d7f-47c7-9dfa-52eae2104c3b
OSearchHealthReportsPushdown09fe98f3-3324-4747-97e5-916a28a0c6c0
OSearchPortalAdminLinksedf48246-e4ee-4638-9eed-ef3d0aee7597
OsrvLinks068f8656-bea6-4d60-a5fa-7f077f8f5c20
OssNavigation10bdac29-a21a-47d9-9dff-90c7cae1301e
OSSSearchEndUserHelpFeature03b0a3dc-93dd-4c68-943e-7ec56e65ed4d
OSSSearchSearchCenterUrlFeature7acfcb9d-8e8f-4979-af7e-8aed7e95245e
OSSSearchSearchCenterUrlSiteFeature7ac8cc56-d28e-41f5-ad04-d95109eb987a
PageConverters14173c38-5e2d-4887-8134-60f9df889bad
PersonalizationSiteed5e77f7-c7b1-4961-a659-0de93080fa36
PhonePNSubscriber41e1d4bf-b1a2-47f7-ab80-d5d6cbba3092
PictureLibrary00bfea71-52d4-45b3-b544-b1c71b620109
PortalLayouts5f3b0127-2f1d-4cfd-8dd2-85ad1fb00bfc
PPSDatasourceLib5d220570-df17-405e-b42d-994237d60ebf
PPSMonDatasourceCtype05891451-f0c4-4d4e-81b1-0dabd840bad4
PPSRibbonae31cd14-a866-4834-891a-97c9d37662a2
PPSSiteCollectionMastera1cb5b7f-e5e9-421b-915f-bf519b0760ef
PPSSiteMaster0b07a7f4-8bb8-4ec0-a31b-115732b9584d
PPSSiteStapling8472208f-5a01-4683-8119-3cea50bea072
PPSWebPartsee9dbf20-1758-401e-a169-7db0a6bbccb2
PPSWorkspaceCtypef45834c7-54f6-48db-b7e4-a35fa470fc9b
PPSWorkspaceList481333e1-a246-4d89-afab-d18c6fe344ce
PremiumSearchVerticals9e99f7d7-08e9-455c-b3aa-fc71b9210027
PremiumSite8581a8a7-cf16-4770-ac54-260265ddb0b2
PremiumSiteStaplinga573867a-37ca-49dc-86b0-7d033a7ed2c8
PremiumWeb0806d127-06e6-447a-980e-2e90b03101b8
PremiumWebApplication0ea1c3b6-6ac0-44aa-9f3f-05e8dbe6d70b
Preservationbfc789aa-87ba-4d79-afc7-0c7e45dae01a
ProductCatalogListTemplatedd926489-fc66-47a6-ba00-ce0e959c9b41
ProductCatalogResources409d2feb-3afb-4642-9462-f7f426a0f3e9
ProfileSynchaf847aa9-beb6-41d4-8306-78e41af9ce25
ProjectBasedPolicy2fcd5f8a-26b7-4a6a-9755-918566dba90a
ProjectDiscovery4446ee9b-227c-4f1a-897d-d78ecdd6a824
ProjectFunctionalitye2f2bb18-891d-4812-97df-c265afdba297
PromotedLinksList192efa95-e50c-475e-87ab-361cede5dd7f
Publishing22a9ef51-737b-4ff2-9346-694633fe4416
PublishingLayoutsd3f51be2-38a8-4e44-ba84-940d35be1566
PublishingMobile57cc6207-aebf-426e-9ece-45946ea82e4a
PublishingPrerequisitesa392da98-270b-4e85-9769-04c0fde267aa
PublishingResourcesaebc918d-b20f-4a11-a1db-9ed84d79c87e
PublishingSitef6924d36-2fa8-4f0b-b16d-06b7250180fa
PublishingStapling001f4bd7-746d-403b-aa09-a6cc43de7942
PublishingTimerJobs20477d83-8bdb-414e-964b-080637f7d99b
PublishingWeb94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb
QueryBasedPreservationd9742165-b024-4713-8653-851573b9dfbd
Ratings915c240e-a6cc-49b8-8b2c-0bff8b553ed3
RecordResources5bccb9a4-b903-4fd1-8620-b795fa33c9ba
RecordsCentere0a45587-1069-46bd-bf05-8c8db8620b08
RecordsManagement6d127338-5e7d-4391-8f62-a11e43b1d404
RecordsManagementTenantAdminb5ef96cb-d714-41da-b66c-ce3517034c21
RecordsManagementTenantAdminStapling8c54e5d3-4635-4dff-a533-19fe999435dc
RedirectPageContentTypeBinding306936fd-9806-4478-80d1-7e397bfa6474
RelatedLinksScopeSettingsLinke8734bb6-be8e-48a1-b036-5a40ff0b8a81
ReportAndDataSearchb9455243-e547-41f0-80c1-d5f6ce6a19e5
ReportCenterSampleDatac5d947d6-b0a2-4e07-9929-8e54f5a9fff9
Reporting7094bd89-2cfe-490a-8c7e-fbace37b4a34
ReportListTemplate2510d73f-7109-4ccc-8a1c-314894deeb3a
ReportsAndDataCTypese0a9f213-54f5-4a5a-81d5-f5f3dbe48977
ReportsAndDataFields365356ee-6c88-4cf1-92b8-fa94a8b8c118
ReportsAndDataListTemplatesb435069a-e096-46e0-ae30-899daca4b304
ReviewPublishingSPDa44d2aa3-affc-4d58-8db4-f4a3af053188
ReviewPublishingSPD103319f5f68e-1b92-4a02-b04d-61810ead0409
ReviewWorkflows02464c6a-9d07-4f30-ba04-e9035cf54392
ReviewWorkflowsSPDb5934f65-a844-4e67-82e5-92f66aafe912
ReviewWorkflowsSPD10333bc0c1e1-b7d5-4e82-afd7-9f7e59b60409
RollupPageLayouts588b23d5-8e23-4b1b-9fe3-2f2f62965f2d
RollupPagesdffaae84-60ee-413a-9600-1cf431cf0560
ScheduleList636287a7-7f62-4a6e-9fcc-081f4672cbf8
SearchAdminWebPartsc65861fa-b025-4634-ab26-22a23e49808f
SearchAndProcess1dbf6063-d809-45ea-9203-d3ba4a64f86d
SearchCenterFiles6077b605-67b9-4937-aeb6-1d41e8f5af3b
SearchCenterLiteFiles073232a0-1868-4323-a144-50de99c70efc
SearchCenterLiteUpgradefbbd1168-3b17-4f29-acb4-ef2d34c54cfb
SearchCenterUpgrade372b999f-0807-4427-82dc-7756ae73cb74
SearchConfigContentType48a243cb-7b16-4b5a-b1b5-07b809b43f47
SearchConfigFields41dfb393-9eb6-4fe4-af77-28e4afce8cdc
SearchConfigListacb15743-f07b-4c83-8af3-ffcfdf354965
SearchConfigListTemplatee47705ec-268d-4c41-aa4e-0d8727985ebc
SearchConfigTenantStapler9fb35ca8-824b-49e6-a6c5-cba4366444ab
SearchDrivenContent592ccb4a-9304-49ab-aab1-66638198bb58
SearchEngineOptimization17415b1d-5339-42f9-a10b-3fef756b84d1
SearchExtensions5eac763d-fbf5-4d6f-a76b-eded7dd7b0a5
SearchMaster9c0834e1-ba47-4d49-812b-7d4fb6fea211
SearchServerWizardFeaturee09cefae-2ada-4a1d-aee6-8a8398215905
SearchTaxonomyRefinementWebParts67ae7d04-6731-42dd-abe1-ba2a5eaa3b48
SearchTaxonomyRefinementWebPartsHtml8c34f59f-8dfb-4a39-9a08-7497237e3dc4
SearchTemplatesandResources8b2c6bcb-c47f-4f17-8127-f8eae47a44dd
SearchWebPartseaf6a128-0482-4f71-9a2f-b1c650680e77
SearchWebPartsStapler922ed989-6eb4-4f5e-a32e-27f31f93abfa
SharedServicesf324259d-393d-4305-aa48-36e8d9a7a0d6
ShareWithEveryone10f73b29-5779-46b3-85a8-4817a6e9a6c2
ShareWithEveryoneStapling87866a72-efcf-4993-b5b0-769776b5283f
SignaturesWorkflow6c09612b-46af-4b2f-8dfc-59185c962a29
SignaturesWorkflowSPDc4773de6-ba70-4583-b751-2a7b1dc67e3a
SignaturesWorkflowSPD1033a42f749f-8633-48b7-9b22-403b40190409
SiteAssets98d11606-9a9b-4f44-b4c2-72d72f867da9
SiteFeed15a572c6-e545-4d32-897a-bab6f5846e18
SiteFeedController5153156a-63af-4fac-b557-91bd8c315432
SiteFeedStapling6301cbb8-9396-45d1-811a-757567d35e91
SiteHelp57ff23fc-ec05-4dd8-b7ed-d93faa7c795d
SiteNotebookf151bb39-7c3b-414f-bb36-6bf18872052f
SiteServicesAddinsb21c5a20-095f-4de2-8935-5efde5110ab3
SiteSettingsfead7313-4b9e-4632-80a2-98a2a2d83297
SitesLista311bf68-c990-4da3-89b3-88989a3d7721
SiteStatusBar001f4bd7-746d-403b-aa09-a6cc43de7999
SiteUpgradeb63ef52c-1e99-455f-8511-6a706567740f
SkuUpgradeLinks937f97e9-d7b4-473d-af17-b03951b2c66b
SlideLibrary0be49fe9-9bc9-409d-abf9-702753bd878d
SlideLibraryActivation65d96c6b-649a-4169-bf1d-b96505c60375
SmallBusinessWebsite48c33d5d-acff-4400-a684-351c2beda865
SocialDataStorefa8379c9-791a-4fb0-812e-d0cfcac809c8
SocialRibbonControl756d8a58-4e24-4288-b981-65dc93f9c4e5
SocialSite4326e7fc-f35a-4b0f-927c-36264b0a4cf0
SPAppAnalyticsUploaderJobabf42bbb-cd9b-4313-803b-6f4a7bd4898f
SpellChecking612d671e-f53d-4701-96da-c3a4ee00fdc5
SPSBlogd97ded76-7647-4b1e-b868-2af51872e1b3
SPSBlogStapling6d503bb6-027e-44ea-b54c-a53eac3dfed8
SPSDisco713a65a1-2bc7-4e62-9446-1d0b56a8bf7f
SPSearchFeature2ac1da39-c101-475c-8601-122bc36e3d67
SRPProfileAdminc43a587e-195b-4d29-aba8-ebb22b48eb1a
SSSvcAdmin35f680d4-b0de-4818-8373-ee0fca092526
StapledWorkflowsee21b29b-b0d0-42c6-baff-c97fd91786e6
SurveysList00bfea71-eb8a-40b1-80c7-506be7590102
TaskListNewsFeedff13819a-a9ac-46fb-8163-9d53357ef98d
TasksList00bfea71-a83e-497e-9ba0-7a5c597d0107
TaxonomyFeatureStapler415780bf-f710-4e2c-b7b0-b463c7992ef0
TaxonomyFieldAdded73ef14b1-13a9-416b-a9b5-ececa2b0604c
TaxonomyTenantAdmin7d12c4c3-2321-42e8-8fb6-5295a849ed08
TaxonomyTenantAdminStapler8fb893d6-93ee-4763-a046-54f9e640368d
TaxonomyTimerJobs48ac883d-e32e-4fd6-8499-3408add91b53
TeamCollab00bfea71-4ea5-48d4-a4ad-7ea5c011abe5
TemplateDiscoveryff48f7e6-2fa1-428d-9a15-ab154762043d
TenantAdminBDC0a0b2e8f-e48e-4367-923b-33bb86c1b398
TenantAdminBDCStaplingb5d169c9-12db-4084-b68d-eef9273bd898
TenantAdminDeploymentLinks99f380b4-e1aa-4db0-92a4-32b15e35b317
TenantAdminLinks98311581-29c5-40e8-9347-bd5732f0cb3e
TenantAdminSecureStoreb738400a-f08a-443d-96fa-a852d0356bba
TenantAdminSecureStoreStapling6361e2a8-3bc4-4ca4-abbb-3dfbb727acd7
TenantProfileAdmin32ff5455-8967-469a-b486-f8eaf0d902f9
TenantProfileAdminStapling3d4ea296-0b35-4a08-b2bf-f0a8cabd1d7f
TenantSearchAdmin983521d7-9c04-4db0-abdc-f7078fc0b040
TenantSearchAdminStapling08ee8de1-8135-4ef9-87cb-a4944f542ba3
TimecardListd5191a77-fa2d-4801-9baf-9f4205c9e9d2
TopicPageLayouts742d4c0e-303b-41d7-8015-aad1dfd54cbd
TopicPages5ebe1445-5910-4c6e-ac27-da2e93b60f48
Translation4e7276bc-e7ab-4951-9c4b-a74d44205c32
TranslationTimerJobsd085b8dc-9205-48a4-96ea-b40782abba02
TranslationWorkflowc6561405-ea03-40a9-a57f-f25472942a22
TransMgmtFunc82e2ea42-39e2-4b27-8631-ed54c1cfc491
TransMgmtLib29d85c25-170c-4df9-a641-12db0b9d4130
UPAClaimProvider5709886f-13cc-4ffc-bfdc-ec8ab7f77191
UpgradeOnlyFile2fa4db13-4109-4a1d-b47c-c7991d4cc934
UserMigratorf0deabbb-b0f6-46ba-8e16-ff3b44461aeb
UserProfileUserSettingsProvider0867298a-70e0-425f-85df-7f8bd9e06f15
V2VPublishedLinksf63b7696-9afc-4e51-9dfd-3111015e9a60
V2VPublishingLayouts2fbbe552-72ac-11dc-8314-0800200c9a66
VideoAndRichMedia6e1e5426-2ebd-4871-8027-c5ca86371ead
ViewFormPagesLockDown7c637b23-06c4-472d-9a9a-7c175762c5c4
VisioProcessRepository7e0aabee-b92b-4368-8742-21ab16453d01
VisioProcessRepositoryContentTypes12e4f16b-8b04-42d2-90f2-aef1cc0b65d9
VisioProcessRepositoryContentTypesUsb1f70691-6170-4cae-bc2e-4f7011a74faa
VisioProcessRepositoryFeatureStapling7e0aabee-b92b-4368-8742-21ab16453d00
VisioProcessRepositoryUs7e0aabee-b92b-4368-8742-21ab16453d02
VisioServer5fe8e789-d1b7-44b3-b634-419c531cfdca
VisioWebAccess9fec40ea-a949-407d-be09-6cba26470a0c
WAWhatsPopularWebPart8e947bf0-fe40-4dff-be3d-a8b88112ade6
WebPageLibrary00bfea71-c796-4402-9f2f-0eb9a6e71b18
WebPartAdderGroups2ed1c45e-a73b-4779-ae81-1524e4de467a
WhatsNewListd7670c9c-1c29-4f44-8691-584001968a74
WhereaboutsList9c2ef9dc-f733-432e-be1c-2e79957ea27b
WikiPageHomePage00bfea71-d8fe-4fec-8dad-01c19a6e4053
WikiWelcome8c6a6980-c3d9-440e-944c-77f93bc65a7e
WordServerViewing1663ee19-e6ab-4d47-be1b-adeb27cfd9d2
WorkflowAppOnlyPolicyManagerec918931-c874-4033-bd09-4f36b2e31fef
WorkflowHistoryList00bfea71-4ea5-48d4-a4ad-305cf7030140
WorkflowProcessList00bfea71-2d77-4a75-9fca-76516689e21a
Workflows0af5989a-3aea-4519-8ab0-85d91abe39ff
WorkflowServiceStapler8b82e40f-2001-4f0e-9ce3-0b27d1866dff
WorkflowServiceStore2c63df2b-ceab-42c6-aeff-b3968162d4b1
WorkflowTask57311b7a-9afd-4ff0-866e-9393ad6647b1
XmlFormLibrary00bfea71-1e1d-4562-b56a-f05371bb0115
XmlSitemap77fc9e13-e99a-4bd3-9438-a3f69670ed97

Incoming Email 2007 to 2013 Upgrade – Errors occurred processing message

After upgrading from SharePoint 2007 to 2013, I experienced a problem with receiving incoming emails on migrated sites from SP 2007.    ULS logs showed incoming email attempting to process EML files but then quickly failing with “Message ID:” but not the EML file name or alias.   After extensive testing we found that SPSite objects were “locked” for exceeding Sandbox Resource Points.   Toggling the “BitFlags” value allowed us to clear the “Resource Exceeded” and allow incoming email to process.

Also, we disabled a few Timer Jobs which calculate Sandbox Resource points (and were re-establishing the SPSite lock).    With both BitFlags cleared to “0” and timer jobs disabled everything ran smoothly.

 

ULS Failure

02/17/2015 16:46:12.69    OWSTIMER.EXE (0x0C54)    0x1C4C    SharePoint Foundation    E-Mail    6871    Information    The Incoming E-Mail service has completed a batch.  The elapsed time was 00:00:00.  The service processed 2 message(s) in total.  Errors occurred processing 2 message(s): Message ID:  Message ID:   

 

BitFlag.ps1

param($bitflag)
# Test input number and display full composition (each true/false flag)
$bitflag
(1..50) |% {$test = [Math]::Pow(2, $_); $found=($test -band $bitflag); 1 | select {$test},{$found}}

 

[AllSites].[dbo].[BitFlags]  Composition

Table   [AllSites]
Column  [BitFlags]

Failed Site have Decimal Value:      12582912
Failed Site have Hexadecimal Value:  0xC00000

V_SF_RESOURCEMAXSENT
V_SF_RESOURCEMAXLOCK

Details:
                      V_SF_WRITELOCK  0000000000000001    00000000000000000001     no
                       V_SF_READLOCK  0000000000000002    00000000000000000002     no
                 V_SF_FOUNDATIONLOCK  0000000000000004    00000000000000000004     no
                       V_SF_DISKLOCK  0000000000000008    00000000000000000008     no
                         V_SF_BWLOCK  0000000000000010    00000000000000000016     no
                 V_SF_NONPAYMENTLOCK  0000000000000020    00000000000000000032     no
                  V_SF_VIOLATIONLOCK  0000000000000040    00000000000000000064     no
                V_SF_DISKLOCKMSGSENT  0000000000000080    00000000000000000128     no
                  V_SF_BWLOCKMSGSENT  0000000000000100    00000000000000000256     no
                V_SF_USERLOCKMSGSENT  0000000000000200    00000000000000000512     no
                V_SF_DISKWARNINGSENT  0000000000000400    00000000000000001024     no
                  V_SF_BWWARNINGSENT  0000000000000800    00000000000000002048     no
                      V_SF_LARGESITE  0000000000001000    00000000000000004096     no
              V_SF_MAYHAVESITEALERTS  0000000000008000    00000000000000032768     no
                   V_SF_TRIMAUDITLOG  0000000000010000    00000000000000065536     no
                   V_SF_READONLYLOCK  0000000000020000    00000000000000131072     no
                     V_SF_PRESCANNED  0000000000040000    00000000000000262144     no
         V_SF_USERACCOUNTRESTRICTION  0000000000080000    00000000000000524288     no
          V_SF_USERSOLUTIONACTIVATED  0000000000100000    00000000000001048576     no
               V_SF_RESOURCEWARNSENT  0000000000200000    00000000000002097152     no
                V_SF_RESOURCEMAXSENT  0000000000400000    00000000000004194304    yes
                V_SF_RESOURCEMAXLOCK  0000000000800000    00000000000008388608    yes

V_SF_HASSITESCOPEDUSERCUSTOMACTIONS  0000000001000000    00000000000016777216     no
  V_SF_UIVERSIONCONFIGURATIONENABLED  0000000002000000    00000000000033554432     no
             V_SF_SHAREBYLINKENABLED  0000000004000000    00000000000067108864     no
   V_SF_USERDEFINEDWORKFLOWSDISABLED  0000000010000000    00000000000268435456     no
   V_SF_HTTPSHOSTHEADERSITEURLSCHEME  0000000020000000    00000000000536870912     no
                         V_SF_UNUSED  0000000040000000    00000000001073741824     no
            V_SF_SHAREBYEMAILENABLED  0000000080000000    00000000002147483648     no

 

Disabled Timer Jobs

  • Solution Daily Resource Usage Update
  • Solution Resource Usage Log Processing
  • Solution Resource Usage Update

NOTE – All 3 timer job definitions above repeat per web application.   In our case, we disabled 6 = 3 jobs X 2 web apps.

get-sptimerjob |? {$_.name -eq "job-solution-daily-resource-usage" -or 
$_.name -eq "job-solution-resource-usage-update" -or 
$_.name -eq "job-solution-resource-usage-log"}
 | select name,displayname,IsDisabled,LastRunTime,schedule

Reference

SAAM – Site Asset App Model

Developers have more options in SharePoint 2013 than any version before.   App Model is center stage.  Understandably this has created some confusion and debate in the community.   I’d like to suggest another coding pattern to consider in addition to pure App Model which I call “Site Asset App Model.”

Long before SP2013 released, I would add jQuery “widgets” to pages in MOSS2007 and SP2010 with a Content Editor.  Upload HTML, CSS, and JS files.  Simple and effective.   Requires no special infrastructure changes.  This approach remains valid and has actually improved with advancements like :

  • JavaScript frameworks
  • Angular,  Knockout
  • HTML 5 browsers
  • REST /_api/ endpoints
  • ASP.Net WebAPI
  • Entity Framework
  • BreezeJS

I might not always use pure “App Model”, but I’m 100% sold on JavaScript front end development and the “from Bricks to Houses” philosophy (http://channel9.msdn.com/Events/SharePoint-Conference/2014/SPC404)    Call this whatever name you like, but JavaScript coding has advantages for both developers and administrators alike.    I suggest coding JS first, then fallback to C# wrapped in WebAPI over HTTP, and finally farm solution WSP as last resort.  

Please leave a comment if you found this helpful!   shades_smile

Diagram

image

image

How to Use

Configure

  • Create new folder in Site Assets
  • Map drive letter
  • Create HTML/JS/CSS files with local IDE (Visual Studio, Brackets, NotePad++, etc.)
  • Add page to SharePoint site
  • Add Content Editor to page. Set source Property to HTML location.

Debug

  • Edit source HTML/JS/JSS
  • Reload with browser
  • Press F12 to debug, set breakpoints, inspect DOM
  • NOTE – adding the JS statement “debugger;” can help raise a local browser event. That can be a nice trick to more easily create breakpoints in your editor instead of scrolling the same codebase again with F12. http://www.w3schools.com/js/js_debugging.asp

Admittedly there are drawbacks:

  • No Visual Studio F5 debug
  • No full package (.APP)
  • No Office365 store
  • No app-only principal (limited to current user permissions)
  • Hard to deploy multiple instances

However, there might be times when SAAM is preferred:

  • Working on SP2007/2010
  • Lacking SP2013 App Model infrastructure (Wildcard DNS, Service Apps, etc.)
  • Visual Studio not available (required for .APP package/deploy)
  • Non-SharePoint developers comfortable editing HTML/JS/CSS directly

Comparison Table

FeatureSP2013
“App Model”
Site Assets
App Model
(SAAM)
HTTP call host web without SP Request Executor ProxyNOYES
Support REST to External Content Types made in SharePoint DesignerNOYES
List and Library user data kept if app uninstalled (code upgrade)NOYES
Create standard Views for lists and libraries with App user dataNOYES
Works on SP2007 and 2010 older versionsNOYES
Restricted to “App Web” where many features disabledYESNO
Requires server infrastructure changesYESNO
* Claims authenticationYESNO
* Wildcard DNS on networkYESNO
* Service ApplicationsYESNO
* Additional SQL databases and service accountsYESNO
Requires security manifestYESNO
* Permissions plan to useYESNO
* Web service endpoint URLsYESNO
Able to publish and sell in Office 365 StoreYESNO
Able to use App Identity Security PrincipalYESNO

SP2013 “App Model”

Site Assets App Model (SAAM)

straight-jacket-costume

References

http://channel9.msdn.com/Events/Speakers/Scot-Hillier

  • ​”From bricks to houses” > wider view beyond “App Model” looking at all front end coding (JS/REST)

http://www.itunity.com/community/questions/view/question/id/1

  • ​Use SharePoint where it makes sense (components ready), but now able to include a wider menu of 3rd party technology choices.  
  • Non-Microsoft, Google, others, and a whole web of innovation beyond SP core.

http://blogs.msdn.com/b/amigan/archive/2012/12/10/part-2-introduction-to-sharepoint-2013-app-model.aspx

  • Detailed comparison table
  • Yes, some things cannot be done in “App Model”
  • Yes, farm solutions are still valid  (but as a last resort – try front end coding first)

http://sharepointpromag.com/blog/sharepoint-2013-s-cloud-app-model-it-s-what-you-wanted-all-along

  • ​And ultimately, it’s going to be moot. In multi-tenant environments such as Office 365, this is the only real option.
  • Office365 is the gold standard for low administrative effort.

IIS – no default pool recycle, set 1AM

Background

When SharePoint 2013 installs IIS application pools are created for content, service applications, central admin, and workflow.    Only the content pools appear to be given a daily recycle time.    However, I have noticed errors with Service Applications which can be fixed after recycling the pool.    Personally I prefer to recycle pools daily and ensure maximum stability.   Below is PowerShell code to accomplish that.   shades_smile

 

image

 

Symptoms

  • Excel Services Web Part error visible to end users –  “We don’t know what happened, but something went wrong.  Could you please try that again?”
  • WCF errors on eventlog
  • Slow or unresponsive HTTP endpoints with “.svc”

image

Resolution

Apply 1AM IIS daily recycle time to any SharePoint pools without a schedule.

PowerShell Code

# Bypass IIS Defaults
$exclude=@(".NET v2.0",".NET v2.0 Classic",".NET v4.5",".NET v4.5 Classic","Classic .NET AppPool","DefaultAppPool");
# Loop SharePoint pools
$pools = Get-ChildItem IIS:\AppPools;
foreach ($p in $pools) {
	if (!$exclude.contains($p.name)) {
		$pn = $p.Name;
		$s = $p.recycling.periodicRestart.schedule.collection.value;
		if (!$s) {
			# Missing recycle schedule.  Set 1AM daily
			Set-ItemProperty -Path "IIS:\AppPools\$pn" -Name Recycling.periodicRestart.schedule -Value @{value="01:00"}}
		}
	}
}

BreezeJS – Edit SQL table with < 100 lines of JS code [VIDEO]

With SharePoint 2013 and industry movement towards the cloud I’ve been exploring JavaScript as a primary way to develop rich applications.

One common challenge is data access.  

With C# I have years of experience with [System.Data] and can perform CRUD against SQL relational databases in my sleep.  Open connection, query, data adapter, fill DataTable, and voila!    Muscle memory. Second nature.  Tried and true methods.   However, in the new client side JS world I had no clue where to begin.

Enter Breeze.

 

People describe Breeze as “Entity Framework on the client in JavaScript” which sounds simple yet has profound implication for the developer.   CRUD operations, LINQ style query, navigating primary/foreign keys, input validation, caching, batch updates, and more.   That’s a lot to consider and new ideas take time to absorb.   Breeze could potentially replace:

  • ASP.Net (ASPX) web forms
  • ASCX user controls
  • InfoPath forms
  • SharePoint web parts
  • WCF 5.6 data services
  • OData
  • Classic WebAPI

 

I set out to code an example with a few goals:

  • Create simple SQL schema (two tables – parent/child – one to many)
  • Execute CRUD operations in JS against SQL  tables
  • Leverage JS plugins and NuGet “Install-Package” to load third party components
    • Install-Package breeze.webapi2.ef6
    • Install-Package breeze.angular
    • Install-Package angularjs.core
  • Little code as possible

The whole thing took less than 30 minutes and I edited video down to just 15.    I was impressed by how straightforward and easy the process was.   Breeze# in ASP.Net MVC for the back end WebAPI controller was nearly identical to the Breeze example code.   Add one C# method per entity (SQL table) and Breeze does the rest.  The JS front end took a little more time to understand but was also easy to apply.   Connect  Entity Manager to the Breeze URL and you’re ready for CRUD queries.    Amazing!     Given how easy Breeze is I would be hard pressed to use OData or manually created WebAPI controllers with C# code to query a database.   If you can use Breeze, then use it!    You’ll save lots of effort.

Please leave a comment if you found this helpful.   Thank you!  shades_smile

 

Watch Video

[BreezeJS and WebAPI – Edit SQL table in JS with less than 100 lines of code]

 

Download Code

Download

http://spjeff.com/etc/Appraisal-Breeze-VS2013.zip

 

Screenshots

image

image

 

image

 

References

 

SharePoint 2013 upgrade QA with HTTP homepage checks

After upgrading it can be smart to run Quality Assurance checks.   Microsoft gives us Test-SPContentDatabase for post upgrade scanning.   I wanted to take that one step further and simulate user visits to every site homepage.   If the HTML response contains an error keyword then we’ll research those URLs further and dig into root cause.

If a SharePoint site homepage won’t load that creates a road block where users aren’t able to navigate Lists, Libraries, Settings, etc. to even troubleshooting the issue. 

By simulating HTTP visits to every site homepage we can increase upgrade quality with higher confidence that users can continue working uninterrupted.   Knowing that all homepages gave HTTP 200 with a clean page title is a great way to complete any upgrade.   Hope you found this helpful!     shades_smile

 

QA Checks

  1. Page title contains “error”
  2. Page HTML source contains “Correlation ID”
  3. Page HTML source contains “Microsoft.Office.DataParts” assembly name

 

CSV Output

image

 

Screenshots

1-14-2015 11-44-33 AM

3

 

Code

#declare functions
Function HttpQA($url, $type) {
	#create web request
	$res = Invoke-WebRequest $url -UseBasicParsing -UseDefaultCredentials
	#parse 
	$statuscode = $res.StatusCode
	$a = $res.Content.indexOf("<title>SharePoint 2013 | SPJeff - Page 2")
	$title = $res.Content.Substring($a+7,$b-$a-7).Trim().replace(([char]13).ToString(),"").replace(([char]10).ToString(),"")
	
	#parse Correlation ID
	$a = $res.Content.indexOf("Correlation ID:")
	if ($a -gt -1) {
		$corrpage = $res.Content.Substring($a+15,37).Trim().replace(([char]13).ToString(),"").replace(([char]10).ToString(),"")
	}
	
	#parse assembly name "Microsoft.Office.DataParts"
	$owc = $res.Content.indexOf("Microsoft.Office.DataParts")
	if ($owc -gt 0) {$owcfound = $true} else {$owcfound = $false}
	
	#HTTP headers
	$corrhead = $res.Headers["SPRequestGuid"]
	$sper = $res.Headers["SharePointError"]
	if ($sper) {$sperfound = $true} else {$sperfound = $false}
	
	#format output
	$f = $s.Url -replace("/","-")
	$global:coll += New-Object -TypeName PSObject -Prop (@{"Type"=$type;"URL"=$url;"HTTP"=$statuscode;"Title"=$title;"CorrelationIDPage"=$corrpage;"OWCFound"=$owcfound;"SharePointError"=$sperfound;"CorrelationIDHeader"=$corrhead});
}
#configuration
$sites = Get-SPSite -Limit All | Get-SPWeb -Limit All
$c = $sites.Count
$i = 0
$global:coll = @()
#loop each site
foreach ($s in $sites) {
	#display progress
	$i++
	$surl = $s.url
	Write-Progress -Activity "HTTP test " -Status $surl -PercentComplete (($i/$c)*100.0)
	
	#run HTTP tests
	HttpQA "$surl" "HomePage"
	HttpQA "$surl/_layouts/viewlsts.aspx" "Viewlsts"
}
#save results
$global:coll | Export-Csv http-qa.csv -NoTypeInformation

Wrap Test-SPContentDatabase with database name

 

While testing an upgrade to SharePoint 2013 I wanted to review missing server dependencies.   Test-SPContentDatabase does a great job.   However, it doesn’t output the SQL content database name.   That makes it hard to read output on a large farm with many content databases.   By leveraging a custom variable for database name we can augment output with an additional column showing the parent database name for each issue.    Hope you find this helpful!    shades_smile

 

Code

Get-SPDatabase |? {$_.Type -like 'Content*'} |% {$n=$_.Name; $_} | Test-SPContentDatabase | Select *,{$n}

 

References

SharePoint 2013 – App Model 3 Tier Diagram

I needed a quick reference to introduce developers with the SharePoint 2013 App Model. 

For traditional ASP.Net and Dot Net coders there is a wide philosophy gap to cross when considering new applications written mostly in front-end JavaScript, HTML, and CSS.   Instead of coding “in” SharePoint (to augment the core product) we now code “next to” SharePoint (with additive REST/JSON endpoints).  

The stability which comes from this approach is significant.  We wan to run on-premise SharePoint similar to how Microsoft operates Office 365.   No more SharePoint customization lost during patching.   No more late night WSP and IISRESET outages.   Code can be modified more fluidly and IE breakpoints can even be set at a single user’s desktop when troubleshooting.   Exciting and powerful tools – which require a new way of thinking.

Please fee free to download the poster I made below.   Hope you find it helpful!  shades_smile

 

12-27-2014 3-07-04 PM

NEW CodePlex project – SPUpgradeHelper

Today I am happy to announce https://spupgradehelper.codeplex.com/ is available for download.   This project aims to smooth the “double hop” upgrade from MOSS 2007 to SP2010 to SP 2013 by reading a CSV of database targets and automating the Cmdlets needed for a consistent, repeatable, high quality, and fast process.   Please leave a comment here or on CodePlex if you found this helpful.  Cheers!  shades_smile

 

Project Description

Migrating MOSS 2007 to SP 2013? This script takes a CSV of databases and runs upgrade Cmdlets in bulk (DB version/Mount/Dismount/Upgrade-SPSite/Claims auth)

Upgrading MOSS to SP2013 is a tedious process with many Cmdlets, especially if you have many databases. This script aims to help automate that process.

Given a CSV with SQL instance and content database names, this script offers Cmdlets to run upgrade steps across many databases all at once. No more TXT or XLS copy and paste madness. Simply populate the CSV, get familiar with UH* Cmdlets and upgrade with ease.

Key Features

  • Read CSV of databases
  • Load helper functions into memory
  • Enable admin to more easily run Cmdlets in bulk
  • Measure time duration for each step (# minutes)
  • Provide detailed LOG file of actions, result, and duration

Quick Start Guide

  • Extract “SPUpgradeHelper.ZIP” to any SharePoint machine in your farm
  • Run “SPUpgradeHelper.ps1” to load helper functions
  • Type in full path to your CSV file (i.e. “C:\TEMP\COLLAB.CSV”)

Function Names

  • UHCIaims – execute SPWebApplication function to upgrade Classic to Claims auth
  • UHCompatibiIity – execute Get-SPSite for “set” of databases to show GUI version (14/15)
  • UHDBVersion – execute TSQL for “set” of databases to show build number (12.0, 14.0, 15.0)
  • UHDismount – execute DisMount-SPContentDatabase for “set” of databases
  • UHMount – execute Mount-SPContentDatabase for “set” of databases
  • UHReadCSV – load CSV file into memory with upgrade “set”, SQL instance, and database names
  • UHUpgrade – execute Upgrade-SPSite for “set” of databases

NOTE – Upgrade “set” is meant for running parallel workstreams. For example, two servers with SP2010 and two servers with SP2013. That way overall upgrade can be expedited by running database set “A” through the first SP2010 and SP2013 server while database set “B” runs on the second server.

Microsoft Upgrade Process

Return to Top ▲Return to Top ▲