Author Archives: admin

SharePoint Online – Change timezone for all SPO Sites

Today i needed to change the TimeZone for a lot of sites, when searching online i found some other scripts but i found them too complicated and needed something easier to manage.

I combined and script some other script and came up with this:

# Define variable
$adminurl =
$timezone = "(UTC+01:00) Amsterdam, Berlijn, Bern, Rome, Stockholm, Wenen"

#Connect To SharePoint Online
$AdminCredentials = Get-Credential

#Connect To SharePoint Online
Connect-SPOService -Url $adminurl -Credential $AdminCredentials

#Get all Site Collections
$SitesCollection = Get-SPOSite -Limit ALL

#Change timezone for alle SPO Sites
ForEach($Site in $SitesCollection)
Write-host -f Yellow "Setting Timezone for Site Collection:"$Site.URL

Set-SPOnlineTimeZone -SiteURL $Site.URL -TimezoneName $timezone -cred $AdminCredentials


I hope it helps someone out..

Microsoft 365 – Force password reset not working for all users

I was asked to force a password reset for all users in the tenant.
This request was easy at first but for some reason not all users were forces to change their password.

What i did was connect to Microsoft Online via PowerShell and run the following commands;
Get an .csv file with all usernames and the date of the LastPasswordChangeTimeStamp variable, this might come in handy when troubleshooting.
Get-MsolUser -All | select DisplayName, LastPasswordChangeTimeStamp | Export-Csv C:\Temp\LastPasswordChangeTimeStamp.csv

Next i ran the below command, this should force all users to change their passwords.
Get-MsolUser -All | Set-MsolUserPassword -ForceChangePasswordOnly $true -ForceChangePassword $true

But now, for some reason it was not working for most of the users, I had to renew the RefreshToken for these users and from that moment they were getting the password change notification.
Set-MsolUser -UserPrincipalName –StsRefreshTokensValidFrom $RefreshTokensValidFrom

Let me know if this helped you!

SharePoint Online – Give permission to single user on all SharePoint Online sites

I was looking for a way to grant a single user permissions on all sharepoint sites without giving admin permissions.

In the end only a single PowerShell command was needed to accomplish this (apart from running ‘Connect-SPOService’)

Get-SPOSite | ForEach {Set-SPOUser -Site $_.Url -LoginName -IsSiteCollectionAdmin $true}
Where is the username you want to give the permissions to.

Error code; 0x80070005-0x000004dc-0x00000524 when trying to sent an email from shared mailbox

Recently a customer was getting the error code; 0x80070005-0x000004dc-0x00000524 when trying to email ‘sent as’ from a newly created shared mailbox.

After searching online I found a lot of potential solutions like;
– Make sure only Full Access and Full control are set as permissions, do not use sent on behalf aswell.
– Start Outlook in safemode
– Create a new Outlook profile
– Use the OWA

The only thing that worked was using the OWA, but then I saw that ‘Show in global addresslist’ was set to ‘No’. When I changed this to ‘Yes’ it was working again!

I hope this helpes you out and saves you some time.

Microsoft 365 – Create an organization library

Alot of posts have been written about the late-2019 rolled out feature to create organization library’s.

After playing around a bit I’ve decided to make a short manual on how to achieve these 2 types of library’s.

General info for this topic I used is:

There are two types of Organization asset types;
1. Office templates
2. Images

The name says it all, one is to use in the office tools, the ‘images’ one you can use to create a subset of images for all people to use while editing SPO pages for example.

To create any or both of these asset types open any SharePoint online site, this can either be a community or teamsite.
On this site create 2 new Document Librarys, by choosing, New -> Documentlibrary
You can decide the names yourself but you chould use someting like ‘Office Templates’ and ‘Default Images’.

Next step is to open PowerShell as administrator.
Make sure you have ‘SharePoint Online Management Shell’ installed. To download:

In PowerShell type;
Connect-SPOService -Url
For the Office Template library:
Add-SPOOrgAssetsLibrary -LibraryURL “ Templates” -OrgAssetType OfficeTemplateLibrary
For the Default Images library:
Add-SPOOrgAssetsLibrary -LibraryURL “ Images” -OrgAssetType ImageDocumentLibrary

Where Start is your sitename and Office Templates / Default Images are your newly created DocumentLibrary’s.
For the CDN messages you can choose ‘yes to all’, more information on this:

The Default Images library should be visible relatively quick, to check this open any SharePoint online site, and choose to edit the Site, browse for an image and you should see ‘Your organization’ listed in the left Menu.

For the Office Templates it’s a little different. Here is the catch, it seems Office 365 version 1908 is not supporting these SharePoint template settings, once you upgrade to version 2005 you will see the template folder immediately.
(To update to newest version make sure you tenants settings are on the curren-channel).
Or you can also run this in an elevated command prompt:
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration\ /v CDNBaseUrl if %errorlevel%==0 (goto SwitchChannel) else (goto End)
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v CDNBaseUrl /t REG_SZ /d "" /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v UpdateUrl /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v UpdateToVersion /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Updates /v UpdateToVersion /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\16.0\Common\OfficeUpdate\ /f

Let me know if this helped you out.

Windows 10 – Hide ‘Personal’ OneDrive from explorer window

When you or your client is using OneDrive for Business it might be hard to explain the difference between ‘OneDrive’ and ‘OneDrive for Business’ in the Explorer view, or you just want to remove it from the list.

To do this you have to make a change in the Windows registry.

# Windows+R type; regedit
# Browse to \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\
# Look for the Key with the value ‘OneDrive’ or ‘OneDrive – Personal’ it probally will be key {018D5C66-4533-4307-9B53-224DE2ED1FE6}.
# Now go to HKEY_CLASSES_ROOT\CLSID and find the {018D…} key, change the ‘System.IsPinnedToNameSpaceTree’ from 1 to 0.
# Save and your are done.

Windows 10 – Can’t open .heic files

Recently I came across some devices who can’t seem to open the new iPhone picture format .heic.

I found some sites stating that only Windows needs to be up to date 1903 or higher, but in some cases that still does not resolve this.
To resolve this you can install the ‘Video extensions from device manafacturer’ from the Microsoft store.

After installation you should be able to open the .heic files.

SharePoint Online Migration Tool – Scan File Failure:The item created time or modified time is not supported

When migrating to SharePoint Online / OneDrive for business, you could get the error:
Scan File Failure:The item created time or modified time is not supported

This seems because the file or folder doensnt have a (valid) creation date, in my case it had the value “4-3-1601 05:27:48”. To resolve this issue, the files need to get a valid creation / LastAccess date, to achieve this do the following:

# Open PowerShell and typ go to the folder with the files giving the error;
cd "c:\iterrors"

# Check the CreationTimme, LastAccessTim
Get-ChildItem -force | Select-Object Mode, Name, CreationTime, LastAccessTime, LastWriteTime | ft

# Get all files in the folder and change the CreationTime, LastAccessTime and LastWriteTime entry
$modifyfiles = Get-ChildItem -force | Where-Object {! $_.PSIsContainer}
foreach($object in $modifyfiles)
$object.CreationTime=("11/11/2019 12:00:00")
$object.LastAccessTime=("11/11/2019 12:01:00")
$object.LastWritetime=("11/11/2011 12:02:00")

Sharepoint Migration Tool – Invalid SharePoint Online list

When migrating on premises files to SharePoint Online / OneDrive for Business, Microsoft made a simple tool available ‘SharePoint Migration Tool’.

Sometimes you will get the ‘Invalid SharePoint Online List’ error like;
“Invalid SharePoint Online list ‘Documents'”,”ACTION_STOP”,”0x0201000D”

Thanks to Thomasssssss on this technet topic; i found the solution.

So to get this working do the following:

– If not already done, create a new migration in SharePoint Migration Tool and start the migration, when you get the ‘Invalid SharePoint Online list’ error, close the tool
– Go to C:\Users\%username%\AppData\Roaming\Microsoft\MigrationToolStorage\\Sessions\SE_RANDOMNUMBER\ and open the session.dat file with notepad.
– Search and replace every “_libraryName”:”Documents” with your local ‘libraryName’, in my case; “_libraryName”:”Documenten” and save the file.
– ReOpen SharePoint Migration Tool and resume the saved migration.

It should work now!