Monthly Archives: April 2020

VIDEO – PowerShell PNP to parse InfoPath XML Attachments

Wanted to share quick tutorial on how to parse InfoPath attachment XML.    Source Form Library contains XML with Base64 encoded attachments which we can parse into local TEMP folder and then upload to destination Document Library. Extract filename and file content for each InfoPath attachment XML node.  Save into subfolders and match original file naming.  Helpful for Office 365 migration and scenarios where InfoPath client is no longer available and users prefer to view attachments directly.

Video, screenshots, and source code below. 

Cheers shades_smile

GitHub Repo

Video

Screenshots

SNAGHTML46f8607

image

image

image

image

What’s in that patch? Apr 2020

NOTE – PDF format updated to include both SharePoint 2013, 2016, and 2019 notes. Ever wondered what fixes are inside of a given CU?   Please see attached PDF with full detail. I wanted a new format for easy reading.   Show management and make the business case for why downtime should be taken to apply CUs.  Also posted at https://sharepointupdates.com/ If you found this helpful, please leave a comment.    shades_smile_thumb_thumb_thumb_thumb[2]

Download

What’s in that patch – Apr 2020.PDF

What’s in that patch? Mar 2020

NOTE – PDF format updated to include both SharePoint 2013, 2016, and 2019 notes. Ever wondered what fixes are inside of a given CU?   Please see attached PDF with full detail. I wanted a new format for easy reading.   Show management and make the business case for why downtime should be taken to apply CUs.  Also posted at https://sharepointupdates.com/ If you found this helpful, please leave a comment.    shades_smile_thumb_thumb_thumb_thumb[2]

Download

What’s in that patch – Mar 2020.PDF

VIDEO – F12 Trick to Peek at AngularJS Scope

Wanted to share trick for peeking into AngularJS scope with F12 tools and DOM selector.   After selecting any HTML DOM element you can “peek” into the “$scope” with variables available at that level.   No special browser extension or plug-ins needed.   If debugging AngularJS frequently check out Batarang for more advanced browser F12 tools.  For a quick check be sure to memorize “angular.element($0).scope()” for typing into console.   Realize that Angular (2+) has superseded AngularJS 1x.   However, many AngularJS applications continue to need support.   Tricks like this make that work easy.

Cheers shades_smile

Code

angular.element($0).scope()

Video

References

FIXED – Azure Deployment failed (Exceed vCores for SQL Managed Instance)

Recently encountered error below when deploying a new SharePoint Server 2019 Small Farm High Availability (HA) with SQL Managed Instance.

Root cause was Azure Region.   Selected “US North Central” which doesn’t offer that feature as of today (04/19/2020).   Selecting different region resolved.

Below is a quick reference table showing which US Azure data centers offer SQL Managed Instance, for planning future deployment.   Cheers shades_smile

Supported Data Centers

image

Error

{“code”:”DeploymentFailed”,”message”:”At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.”,”details”:[{“code”:”Conflict”,”message”:”{\r\n \”status\”: \”Failed\”,\r\n \”error\”: {\r\n \”code\”: \”ResourceDeploymentFailure\”,\r\n \”message\”: \”The resource operation completed with terminal provisioning state ‘Failed’.\”,\r\n \”details\”: [\r\n {\r\n \”code\”: \”ProvisioningDisabled\”,\r\n \”message\”: \”The deployment request failed because it would exceed total number of vCores (8) and/or subnets (1), which is above the allowance for your subscription: max vCores: 0, max number of subnets 0. Please send the support request to extend the quota using Azure portal: http://aka.ms/sql-mi-obtain-larger-quota \”\r\n }\r\n ]\r\n }\r\n}”}]}

Screenshots

image

image

Context Diagrams

Cloud SQL Server options: SQL server on IaaS, or SaaS SQL database in the cloud.

key features

high availability

migration

References

Reboot SharePoint Farm

Quick code snippet to share with you guys for rebooting the full SharePoint farm.   Invoke remote restart command to all peer machines with any valid SharePoint role, then reboot local machine last.   NOTE – SQL not included but can be with adjusting the filter.  Cheers. shades_smile

Code

Add-PSSnapIn "Microsoft.SharePoint.PowerShell"
$local = $env:COMPUTERNAME
$localFQDN = $env:COMPUTERNAME + "." + $env:USERDNSDOMAIN
$targets = Get-SPServer |? {$_.Role -ne "Invalid"} |? {$_.Address -ne $local -and $_.Address -ne $localFQDN} | Select Address
$targets |% {Write-Host "Rebooting $($_)"; Restart-Computer $_ -Force}
Restart-Computer -Force

Download

SPRebootFarm.ps1

VIDEO – Protect WebAPI data endpoint with ADAL (Azure AD)

Wanted to record brief demo of how to protect WebAPI data endpoint with ADAL (Azure Active Directory) Authentication Library.   Azure Portal enables us to register custom SPA (Single Page Application) for secure API calls to backend REST data sources.   OAuth Bearer HTTP headers are applied to provide security with JWT tokens (JSON Web Token).   Video shows all steps from Azure Portal registration to F12 validation of REST data calls.

Cheers  shades_smile

Video

Screenshots

image

image

image

image

image

image

image

image

Code


References

Return to Top ▲Return to Top ▲