How to do a SharePoint PnPonline connect with PowerShell 7

If you want to do a connection to SharePoint Online with a PowerShell script. You will need to make a connecting user and a certificate for logon. The legacy function with plain text user/password does not work anymore.

The PowerShell CMD-let SharePoint Online PnP has been beprecated and is replaced with PnP PowerShell. Do the following to confirm right installed CMD-let

To check if you have the right version of PowerShell. You will need at least PowerShell 7.3

1 $PSVersionTable.PSVersion

Get all installed SharePoint Online PnP PowerShell Modules

1 Get-module -ListAvailable *pnp*

If both or PnP Classic is installed

1 Uninstall-Module PnP.PowerShell -AllVersions -Confirm:$False

2 Uninstall-Module SharePointPnPPowerShellOnline -AllVersions -Confirm:$False

Some versions of PowerShell need to change the TLS to version 1.2 for uninstall and install to work

1 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Install the latest version of PnP.PowerShell. Choose install option Yes to All

1 Set-ExecutionPolicy RemoteSigned

2 Install-Module PnP.PowerShell

You have now installed the new Module

To make a connection to SharePoint Online you will need a global account to your Tenant and some information.

Make a folder for your certs at the local computer “c:\mycertificates”. Do not use spaces or local characters for the folder name. Register the account.

$result = Register-PnPEntraIDApp -ApplicationName “[MySharePointAppName]” -Tenant [TenantName].onmicrosoft.com -OutPath c:\mycertificates -Interactive
$result

Sign in with your Admin account and the script will return a client ID on success. Store the client ID for feature use. You will receive two certificates in your certificate folder.

To make a connection to SharePoint

Connect-PnPOnline [TenantName].sharepoint.com/sites/[folder] -ClientId [ClientIDNo] -Tenant [TenantName].onmicrosoft.com -CertificatePath “C:\mycertificates\[MySharePointAppName].pfx”

Outlook IMAP sync error 0x800CCC0E after installing KB5018410 (11/10/22)

Last wednesday, the 11th of October 2022, Microsoft released the KB5018410 update. After installing the update, Outlook that is connected to IMAP mailboxes started reporting error 0x800CCC0E.

The workaround is to uninstall the KB5018410 update:

  1. Go to the Control panel and search for update history.
  2. If KB5018410 is present as an installed update, click on Uninstall updates on top of the screen
  3. Find KB5018410 in the updates list, mark it and click on Uninstall above the list
  4. The uninstall will take several minutes and requires the computer to reboot

After uninstalling KB5018410 Outlook IMAP sync will start working again.

L2TP VPN fails after january 11, 2022 update

Microsoft January 11, 2022 update breaks L2TP VPN [solution]

Microsoft update KB5009543 breaks L2TP VPN functionality causing error message “The L2TP connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer“. Investigating the log shows error 789 for rasclient.

A temporary solution is to uninstall KB50009543. Run cmd as administrator and enter:

wusa /uninstall /kb:5009543

After reboot VPN will work again.

See also this article.

Microsoft Internet Explorer opens Edge

Microsoft is phasing out Internet Explorer and moves over to Edge. In order to facilitate that, some users experience that when they click on the Internet Explorer, it actually opens up Edge. In rare situations, the user might need Internet Explorer instead of Edge.

It is possible to override this.

  • Start Microsoft Edge and open edge://settings/defaultBrowser
  • Find the settings for “Let Internet Explorer open sites in Microsoft Edge” and set it to Never
  • Click on the Internet Explorer icon. Now MSIE should open.
Setting Edge to allow Internet Explorer

Installing Samsung Kies 3 on Windows 10 – error message “Side by side configuration is incorrect”

When trying to install Samsung Kies 3 on a Windows 10 machine, the error message “Side by side configuration is incorrect” was displayed.

The reason to this error is that the Visual C++ 2008 runtime is not installed.

To solve the problem you need to download and install Microsoft Visual C++ 2008.
Download it from these links (directly from Microsoft), install them and then retry the Kies installation:

 

 

No email or folders visible when using IMAP account with Outlook 2013 or Office 365

The problem seems to be caused by two updates from Microsoft; KB2837618 and KB2837643.

There is a simple solution though:

  • Right click on the affected account in the left pane and select IMAP Folders
  • Below the list of folders, uncheck the box for “When displaying hierarchy in Outlook, show only the subscribed folders.
  • Exit Outlook 2013 / Office 365 and restart it
  • At the next synchronization the folders and mail will (hopefully) be visible

Windows 10 desktop disappeared

A Windows 10 user contacted me because the desktop had disappeared.

The first thing to check is if Windows is in “Tablet mode” which disables the desktop.

  • Go to the Control panel
  • Search for “tablet” and click on “Table mode settings”
  • In the “When I sign in” change from “Use the apropriate mode for my hardware” to “Use desktop mode”
  • Log out and log back in again

If this doesn’t help the user profile might have become broken. In this case, the solution is (description below is just short notes taken from my memory):

  • Go to the Control panel and select accounts
  • Create a new account
  • Using a user with administrative rights, copy the content from the users folders like desktop, documents etc to the new user’s folder.
  • Log in using the new user

Microsoft Office 365 SSL certificate error in Outlook [solved]

Clients moving over to Office 365 who had purchased a valid SSL certificate for their mail server still got SSL certificate errors in Outlook and mobile clients. This was despite the mail service was equipped with a valid SSL certificate (not self signed, but issued by a real CA).

It turns out here that Outlook seems to investigate https root domain (i.e. the customer’s web site) for auto configuration before trying autodiscover.customerdomain.com. And if there is no valid SSL certificate installed on the customers web site, an error is displayed. This was verified by examining the customer’s web site logs where we could se repetitive accesses to /autodiscover/autodiscover.xml.

If only Outlook just would have ignored the SSL error and continued to the next method….

A simple solution was just to add a valid SSL certificate to the customer’s web site, and the problem was solved. That way Outlook didn’t get SSL certificate error when trying to retrieve the non-existing autoconfiguration information from the customer’s web site.