Category Archives: Software

PnP.PowerShell Release 1.3.0

Great news:

Added -Interactive login option to Connect-PnPOnline which is similar to -UseWebLogin but without the limitations of the latter. The -UseWebLogin is using cookie based authentication towards SharePoint and cannot access Graph tokens. Using -Interactive we use Azure AD Authentication and as a result we are able to acquire Graph tokens.

more changes:

Power Apps functions/code hints

Set(SharePointFormMode, “NewForm”); NewForm(formNew); Navigate(screenNew, ScreenTransition.None)

Set(SharePointFormMode, “EditForm”); EditForm(formEdit); Navigate(screenEdit, ScreenTransition.None)

Set(SharePointFormMode, “ViewForm”); ViewForm(formView); Navigate(screenView, ScreenTransition.None)

OnSave – If(SharePointFormMode=”CreateForm”, SubmitForm(CreateItemForm), If(SharePointFormMode=”EditForm”, SubmitForm(EditItemForm)))

OnCancel – If(SharePointFormMode=”CreateForm”, ResetForm(CreateItemForm), If(SharePointFormMode=”EditForm”, ResetForm(EditItemForm)))

Connect-PnPOnline with certificate stored in Azure Key Vault

Works (tested) for PowerShell 7 and PnP.PowerShell 1.3.0

# cert stored in KeyVault
$orgName = "orgname" # 
$tenant = "$"
$adminUrl = "https://$"
$clientID = "" # Client ID
$VaultName = 'AutomationVaultName'
$certName = 'CertificateName'
$secretSecureString = Get-AzKeyVaultSecret -VaultName $vaultName -Name $certName 
$secretPlainText = ConvertFrom-SecureString -AsPlainText -SecureString 
Connect-PnPOnline -Url $adminUrl -ClientId $clientID -CertificateBase64Encoded $secretPlainText -Tenant $tenant 

Based on:

VSCode and Dotnet Useful Commands

Dotnet (.net core, .net 5) useful commands:

dotnet --info
dotnet new sln
dotnet new webapi -o API
dotnet sln add APi
dotnet watch run
dotnet dev-certs https --trust
dotnet new gitignore

Visual Studio Code useful extensions:

  • C# from Microsoft
    (+ ^P assets)
  • C# Extensions from JosKreativ
  • Material Icon Theme from Philipp Kief

VS Code configuration:
– AutoSave
– Font Size
– Hide folders: Settings->Exclude “**/obj” “**/bin”
– Compact folders: Settings->”Compact folders”
– appsettings.Development.json: “Microsoft”: “Warning” -> “Microsoft”: “Information”
– launchSettings.json:
“launchBrowser”: true/false,

Git useful commands:

  • git init
  • create gitignore (dotnet new gitignore)
  • add appsettings.json to gitignore
  • [create git repo]
  • git commit -m “first commit”
  • git branch -M main
  • git remote add origin
  • git push -u origin main

PnP PowerShell 7.1 Parallel


Can I run something like

$items | ForEach-Object -Parallel {
    $listItem = Set-PnPListItem -List "LargeList" -Identity $_ -Values @{"Number" = $(Get-Random -Minimum 100 -Maximum 200 ) }

Unfortunately, no. Instead, use batching!

$batch = New-PnPBatch
1..100 | ForEach-Object{ Add-PnPListItem -List "ItemTest" -Values @{"Title"="Test Item Batched $_"} -Batch $batch }
Invoke-PnPBatch -Batch $batch

Batching in PnP PowerShell | PnP PowerShell

Long-running PowerShell Office 365 reports


PowerShell is our best friend when it comes to ad-hoc and/or scheduled reports in Microsoft 365. PnP team is doing great job providing more and more functionality with PnP PowerShell module for Office 365 SharePoint and Teams.

Small and medium business organizations are mostly good, but for large companies it might be a problem due to just huge amount of data stored in SharePoint. PowerShell reports on all users or all sites might run days… which is probably OK if you run this report once, but totally not acceptable if you need this report e.g. daily/weekly or on-demand.

How can we make heavy PowerShell scripts run faster?

Of course, you start with logic (algorithm) and leveraging full PowerShell functionality (e.g. PowerShell 7 parallelism or PnP batching).


What if you did everything, but it still takes too long? You need something like brute force – the closer your code runs to your tenant – the better.
What are the option?
– Automation account runbook (+workflow)
– Azure Function Apps
– Azure VM in the region closest to your Tenant

Automation account runbook (+workflow)

Seemed like a good option, but not something Microsoft promotes. Even opposite – automation accounts support only PowerShell 5 (not 7), no plug-ins for VS Code and recently there were messages on some retirement or smth.

Meantime, I tested it – and did not find any significant increasing in speed. In a nutshell, what is behind this service? Same windows machines running somewhere in Azure .


PnP PowerShell

SPO: Allow users to create modern pages

Microsoft: “Using modern pages in Microsoft SharePoint is a great way to share ideas using images, Office files, video, and more. Users can Add a page to a site quickly and easily, and modern pages look great on any device.
If you’re a global or SharePoint admin in Microsoft 365, you can allow or prevent users from creating modern pages. You can do this at the organization level by changing settings in the SharePoint admin center. If you allow the creation of site pages as the organization level, site owners can turn it on or off at the site level.

By default both
– Allow users to create new modern pages
– Allow commenting on modern pages
are turned on (enabled)

Tenant or SharePoint admin can find settings under
SharePoint Admin Center -> Settings -> Pages

How it looks like:

Site Pages are created under “Pages” Library.

Let us test it, with:
– (tenant-level) Allow users to create new modern pages: ON
– (tenant-level) Allow commenting on modern pages: ON
– web feature “Site Pages” – “Allows users to add new site pages to a site”: Activated

can create Pagecan edit pagecan Enable/Disable
page comments
can comment on Page
Full Control (Owner)YesYesYesYes
Edit (Member)YesYesYesYes
Read (Visitor)NoNoNoYes

There is a web feature “Site Pages” – “Allows users to add new site pages to a site”.
The feature is activated by default:

What if we disable this feature?
“New -> Page” has disappeared from “New” menu under “Site Contents” for Owners and Members…
From “Home” and “Pages” you still can see “New -> Page” options.
You can still create a new page from but if you try to create a page from Pages – “Sorry, something went wrong” “Cannot create a Site Page. Please have your administrator enable the required feature on this site.” :

Office 365 behavior, with:
– (tenant-level) Allow users to create new modern pages: ON
– (tenant-level) Allow commenting on modern pages: ON
– web feature “Site Pages” – “Allows users to add new site pages to a site”: Deactivated

can create Pagecan edit pagecan Enable/Disable
page comments
can comment on Page
Full Control (Owner)Yes,
but only from “Home”
not from “Site Contents” or “Pages”
Edit (Member)Yes,
but only from “Home”
not from “Site Contents” or “Pages”
Read (Visitor)NoNoNoYes

If we disable feature “Site Pages” – “Allows users to add new site pages to a site” on the root web – it does not affect subsites (subwebs).

Can we Activate/Deactivate the feature “Site Pages” using PowerShell?



– Microsoft “Allow users to create and comment modern pages

See also:
Allow commenting on modern pages

Microsoft Search: roadmap and announcements

(Old) SharePoint Search: content-centric (SharePoint Search Center)
(New) Modern Search: people-centric (Teams, Office, OneDrive, Delve etc.)

Office graph = codename for collective set of services and insights we generate on top of the infrastructure that fast office graph group developed 
= social Intel concepts (SharePoint home, Delve, OneDrive Discoverview) are derivatives of Office graph 

Microsoft Graph = API ( +universal search API)

Turing technology – understands you, answers your question e.g. hover over doc -> doc summary (based on “deep speed” AI model)
announcement at Ignite23-pages blog  

Modern Search: MS nailed the fundamentals, now start bringing it everywhere  – to Teams first, then SharePoint (Nov 2020).

Modern Search Customizations  – we’ll take the best from Classic SharePoint Search,
a lot will retire – investing in more flexibility  

PnP modern Search
– custom result pages, webparts, branding theme; filters, refiners, scoping control  ) 
– search layout designer – wysiwyg editor
pnp modern search – webparts (video)

Core idea behind Microsoft search is coherence 

Bill Baer:
People use search in a different ways 
1) you have organisations who have a well-established intranet built around set of governance controls, a very clean architecture and they want to build a search into that intranet scenario; that’s why a lot of SharePoint capabilities are going to come along with Microsoft search for that particular endpoint
2) then you have other people who live their day in teams

Shared search engine results page (developed once – transitioned everywhere)
Ctrl-F to search through teams (chats?) (contextual search)
Outlook search – more natural language
Image search (before eoy), + 
teams chats, outlook groups conversations, yammer conversation -> bing,, sharepoint
bookmarks (new promoted results)

Targeting bookmarks for the specific audience based on device/OS, region, security groups

SharePoint Search Admin Center -> will be migrated from SharePoint admin center to to Microsoft Search Admin Center transitioning (Search and Intelligence Admin Center) – long-running project custom dictionaries, spelling suggestions – will retire, (move to a graph-driven spellar) 

promoted results -> bookmarks 

Graph Connectors… Federation with Azure Cognitive Search

PowerBI search vertical

Standalone Search  – AAD identity – Graph connector – Ingest your data – use Search = in Windows 10,  ( e.g. for those who have their data in other productivity suite, have no intent to use m365, but want to search)

More info:

Current state of SharePoint Search and Microsoft Search scopes

Bill Baer on Search:

Microsoft Volume Licensing Programs

Корпоративные лицензии – это самый удобный для организаций способ лицензирования продуктов Microsoft.

Это именные, непередаваемые, неисключительные лицензии, которые выпускаются компанией Microsoft индивидуально для каждого клиента.
Поставляются в виде запечатанного конверта, в котором находится документ с указанием наименования компании-обладателя лицензии, списка лицензированных продуктов и других реквизитов. Срок поставки электронных ключей составляет 2-5 дней, лицензий в бумажном виде – 7-10 дней.

С практической точки зрения большую ценность представляет доступ к сайту VLSC – Volume Licensing Service Center. При покупке корпоративных лицензий Microsoft клиент получает доступ через этот сайт к дистрибутивам продуктов и их ключам. Доступ к сайту открывается обычно в течение 2-3 дней после покупки. Доступ к сайту VLSC сначала предоставляется сотруднику, который отвечает за лицензирование (например, системный администратор или юрист), позже он может предоставить доступ и другим сотрудникам организации.

По Корпоративным лицензиям можно купить только актуальную на текущий момент версию продукта (например, Windows 10, Windows Server 2019, SharePoint 2019), но корпоративная лицензия обычно включает право Downgrade, т.е. возможность пользоваться предыдущими версиями продукта.
Дистрибутивы и ключи к предыдущим версиям также доступны на VLSC.

Виды корпоративного лицензирования
Open License (OLP) – простой выкуп лицензий на конкретные продукты в собственность:
– Можно купить столько лицензий, сколько надо, но обычно не менее 5 шт. в первом закупе (в дальнейшем от 1 шт.)

Open Value (OV) – выкуп лицензий в собственность с оплатой в рассрочку на 3 года, равномерными платежами:
– Цена включает SA, но в дальнейшем SA покупать не обязательно ( т.е. в первые 3 года SA оплачено, далее – опция )
– Начальные затраты ниже, чем у OLP
– Есть скидки «за стандартизацию», т.е. при покупке лицензий на весь парк ПК – цены ниже

Open Value Subscription (OVS) – аренда лицензий с ежегодной оплатой (подписка на лицензии):
– Минимальные начальные затраты
– Право пользоваться всегда самыми последними версиями ПО ( т.е. SA всегда входит в цену )
– Можно увеличивать количество лицензий, уменьшать или отказываться от лицензий в зависимости от потребностей
– Оплата происходит раз в год – надо просто посчитать количество используемых лицензий и оплатить их. При этом, например, вновь купленные в течение года компьютеры тоже будут считаться лицензированными. Есть продукты по которым
– Возможен выкуп лицензий в постоянное пользование по истечении 3-х лет аренды
– Требуется “стандартизация”, т.е. лицензирование всех ПК ( Windows или CAL или Office )

SA – Software Assurance. Купив к продукту SA, клиент получает возможность использовать все новые версии продукта, выпускаемые в течение действия подписки. А также для некоторый продуктов ряд дополнительных преимуществ, таких как право на использование второй копии на личном домашнем компьютере, право использования ПО в виртуальной среде, право переноса лицензий в частное или публичное облако и т.п.
SA продаётся как подписка, т.е. на ограниченный срок (2-3года), который можно постоянно продлевать.

Open Licensing programs хорошо подходят организациям от 5 до 250 сотрудников.
Менее 5 сотрудников – проще купить “коробки” – box/retail версии продуктов.
Более 250 сотрудников – организация имеет право на EA – Enterprise Agreement.

Подробнее об Open Programs на сайте Microsoft:
What are the Microsoft Open Programs?

Какую помощь оказывают партнёры Microsoft по лицензированию:
Support Provided by Licensing Solution Partners