In this blog I will talk about a simple PnP PowerShell script which adds Child Terms under each term following the same hierarchy in SharePoint Taxonomy / Metadata.
Note that the same script can be used in SharePoint Online, 2013, 2016 or 2019.
You can refer to below hierarchical structure:
Term Group (Region names) –> Term Set (Region) –> Countries –> Customer –>Mine
In this example I want to add a new term called “Mine missing” under each customer, so instead of doing it manually I will use a script to add Mine missing under each Customer for each country.
Connect-PnPOnline -url <<site url >>
#Here I have used term guid for Asia Pacific to point to a Term
$ParentTerm = Get-PnPTerm -Identity <<term guid>> -TermSet "Regions" -TermGroup "Region names" -IncludeChildTerms -Recursive
$countryterm = $ParentTerm.Terms
foreach($term in $countryterm)
$addterms = $term.Terms
foreach($addedterm in $addterms)
$ChildTerm = $addedterm.CreateTerm("Mine Missing", 1033, (New-Guid))
A comprehensive solution showcasing packaging, solution deployment, provisioning and SPFx web parts to inspire and guide developers, business users and SharePoint Admins to create solutions on similar lines.
Why you should have a look at this?
This has been created by best people in this field (SharePoint, Microsoft 365) which means that code, design and relevance of the web parts are extremely good, all the web parts can be used in your tenant as is. You can learn and create your own ways to
Coding guidelines, standards
Build modern portals
How to get started?
If you want to install everything at one shot the steps are simple. I suggest to have a look first install it on development tenant and not the Production tenant, as it will upload lot of SPFx solutions and make changes so best is that you review it in a developer tenant. Based on your understanding you can plan to deploy it in Production.
Prerequisites: There are some preparation steps which you need to before you install it as follows
Account used to deploy this solution should be a tenant administrator
Works with English tenants, all solutions are in English
Connect-PnPOnline -Url https://tenant-admin.sharepoint.com/ -PnPO365ManagementShell , this will open a window in browser for device login in which you should enter a code specified, make it is succcessful.
Till then you can deploy individual apps in SharePoint 2019 farm and use the apps. Following apps will work in SharePoint 2019 as well
To deploy the apps you can copy the package from source code you downloaded before from this location “sp-starter-kit-master\source\<<solution-name>>\sharepoint\solution” and upload it to App Catalog of your farm.
There is no need to build the solution and can be directly deployed but in case you face issues you can build it using
gulp bundle --ship
gulp package-solution --ship
Once deployed you can add it on a page, in this case I am showing Tiles app.
This issue might occcur in SharePoint on premise versions 2013, 2016 and 2019.
Images do not load properly or load with full size that is without rendition. This can happen if Blob Cache is corrupted on one of the Web Front end or web front ends are not synced between each other.
The default max size for an image when using Image Renditions is 40 mega pixels. Should you want to modify this value you will need to add the imageRenditionMaxSourcePixels parameter. For example: <BlobCache location="C:\BlobCache\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" imageRenditionMaxSourcePixels="100000000" enabled="true" />
Error message: I was not able to identify an error message but users complained that intranet page seems weird and images are displaying over text and etc
How to fix:
Try flushing blob cache with below PowerShell command , this will not recycle the IIS so you can do it during day as well but always good to do it outside office hours.
2. It is not necessary that above will fix the issue, in our case we identified that this did not fix the issue because cache was not getting updated in one of the web front end and time stamp was quite old.
How can you check if it is old and it’s not getting updated?
Visit the folder location of Blob cache on Web front end and each web app will have it’s own folder, check last modified date, you can also compare with other web front ends.
If your issue as explained below then do like this but make sure you have web front end outside of load balancer or you are doing in outside of office hours.
Disable blob cache temporarily: You can make the flag false in web.config file of the IIS which has issues, the line in web.conifg looks like below
Before you start reading this I would like to mention that steps mentioned here are to create a Virtual Machine in Azure for demo, development or labs purpose.
I decided to write this blog as I faced some difficulties while installing SharePoint 2019 on Azure Virtual Machine, I never faced these while installing it on Physical machines or company provided Virtual Machines.
Click on the menu and select “Virtual Machines” and then click Add from top
2. Once you get to the page you will have lots of tabs to filled in, I have highlighted few fields which are required and needs to be filled in, rest of it can be left as is.
Important field which we need to select is “Image” that is we need a Windows Server etc, for easy installation I will be selecting a Windows server with SQL Server 2016 already installed in it so that we don’t have to do that manually.
3. Select “Browse all public and private images” and search for SQL server 2016 and select Standard SP 2 version, for size I recommend 4 CPU and 16 GB memory else the server runs very slow as SQL and SharePoint both are running on the same server.
4. Next step is to create an Admin account so pick a name and password which you can remember. After that you can click “Review + Create”, although there are lot of other things which can be filled in but sake of simplicity I will just leave them as is.
5. Once on the Review tab, click “Create” to create the Virtual Machine. It will start the deployment process and might take 10 minutes. You can check the progress while it deploys.
6. After creation you can check the Virtual Machine in the list, click on the name to access it.
7. Click on the name and you will get to a window as show below, to connect to the machine we should RDP it, so click Connect and chose RDP. It will download a file which can be used to connect to machine using the Admin account you have created. This finishes step for creating Virtual Machine.
Add domain servcies to Virtual Machine
Initially I had thought that this steps is not needed but it does not work if Virtual Machine is not connected to a domain, you will get an error at the end of SharePoint 2019 installation that is Search Service Application will not be created successfully. You may get errors like below
The SDDL string contains an invalid sid or a sid that cannot be translated.Parameter name: sddlFormSystem.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated.Parameter name: sddlForm at System.Security.AccessControl.RawSecurityDescriptor.BinaryFormFromSddlForm(String sddlForm) at System.Security.AccessControl.RawSecurityDescriptor..ctor(String sddlForm) at
Errors were encountered during the configuration of the Search Service Application. System.ArgumentException: The SDDL string contains an invalid sid or a sid that cannot be translated. Parameter name: sddlForm at System.Security.AccessControl.RawSecurityDescriptor.BinaryFormFromSddlForm(String sddlForm) at Microsoft.SharePoint.Win32.SPNetApi32.CreateFileShareWithSecurity(String name, String description, String path, String sddl) at Microsoft.Office.Server.Search.Admi.nistration.AnalyticsAdministration.CreateAnalyticsUNCShare(String dirParentLocation, String shareName) at Microsoft.Office.Server.Search.Administration.AnalyticsAdministration.ProvisionAnalyticsShare(SearchServiceApplication serviceApplication) at Microsoft.Office.Server.Search.Administration.AnalyticsAdministration.CreateDefaultStoreLocation(SearchServiceApplication serviceApplication) at Microsoft.Office.Server.Search.Administration.AnalyticsAdministration.ProvisionRawEventStore(SearchServiceApplication serviceApplication) at Microsoft.Office.Server.Search.Administration.AnalyticsServiceAdministration.Provision() at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.Provision() at Microsoft.Office.Server.Search.Administration.SearchAdminUtils.UpdateIgnoreSPUpdatedConcurrencyException(String description, SearchAdminUtilsUpdateDelegate updateDelegate, SearchAdminUtilsRefreshObjectDelegate refreshObjectDelegate) at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.CreateSearchApp() at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.ProvisionSearchServiceApplication() at Microsoft.Office.Server.Search.Administration.SearchConfigurationJobDefinition.ExecuteTimerJob()
Once that is done you have got rid of other error which will come as now you will be using a domain account and not local account to install SharePoint 2019.
The specified user “username” is a local account. Local accounts should only be used in standalone mode.
Check SQL Server settings :
Open SQL Server Management Studio which should be installed already as we had got server with SQL server already installed.
The account which will install SharePoint 2019 should have required access like below, this account is same as what you had created while creatin Virtual Machine. You can find it under Logins and make sure you have selected “dbcreator” and “securityadmin”. This will make sure the account has correct access to create databases while installing SharePoint 2019.
3. Another thing we need to do is to make sure the account which you updated above has name as “domain\username”, initially it will have name as “computername\username”, since we when we created Virtual Machine with SQL server there was no domain it will remain as is. If you miss this step then you will have issues while creating Search Service Application. So remember to change name as suggested by right clicking and rename. Error message while installing SharePoint 2019 will be like below
The service application “Search Service Application” could not be created because of the following error: System.Data.SqlClient.SqlException (0x80131904): Windows NT user or group
Once downloaded first step is to install pre-requisites, make sure you have an internet connection else it will not work. Click on “Pre-Requisites”, you will the installation happening
4. Once that is done successfully double click “setup” to installing SharePoint 2019, it will start the installation, check pictures below to understand the steps, in the step 2 make sure you use the same account you had created before with format as “domain\username”, in step 3 select “Single Farm”.
Once the above steps are done a IE window will open to configure further, you can chose to perform rest of the steps manually or run the wizard, I chose to run wizard.
So this should finish your SharePoint 2019 installation and you are ready to use it.