How to use Try, Catch, Finally in PowerShell

Errors in your PowerShell script can stop the execution of your script, but sometimes that is completely unnecessary. Try Catch blocks in PowerShell help you to handle those errors properly. Take the following example; You need to update the job titles of 20 employees. The … Read moreHow to use Try, Catch, Finally in PowerShell

Get MFA Status of Office 365 users with PowerShell

One of the reports that I really miss in the Microsoft 365 Admin Center is a clear overview of the MFA status of each user. MFA is a really important security measure to protect your tenant. To make sure that our users have configured MFA … Read moreGet MFA Status of Office 365 users with PowerShell

Find Email Addresses in Office 365 with PowerShell

Sometimes you need to find the user or a mailbox that is using a particular email address. Especially aliases are sometimes hard to find, and you don’t want to open each mailbox to check if it’s using the email address that you need. You can … Read moreFind Email Addresses in Office 365 with PowerShell

Connect to Exchange Online with PowerShell

Managing Exchange Online with PowerShell makes a lot of daily tasks a lot easier (and quicker). Not only for your daily tasks you may need PowerShell, but some settings in Exchange Online can only be changed with PowerShell. So how do you connect to Exchange … Read moreConnect to Exchange Online with PowerShell

Microsoft Teams Uninstall, Reinstall, and Cleanup Guide & Scripts

Microsoft Teams is not like your average program when it comes to installing and uninstall it. The problem with Microsoft Teams is that it’s installed for every user, in the user’s AppData (or program data sometimes). Besides that, we also have Microsoft Teams machine-wide installer, … Read moreMicrosoft Teams Uninstall, Reinstall, and Cleanup Guide & Scripts

Remove Empty Folders in SharePoint Online

After merging duplicate folders in SharePoint Online I needed to remove the empty folders. This is something we can do as well with PowerShell and PnP. The script will go through all folders recursively. If the folder is empty then it will delete it. If … Read moreRemove Empty Folders in SharePoint Online

Merge Duplicate folders in SharePoint with PowerShell

A reader of this blog reached out to me if I knew a way to merge duplicate folders in SharePoint Online. Users had already worked in the duplicate folders, so we not only needed to merge the folders but also preserve the last modified file. … Read moreMerge Duplicate folders in SharePoint with PowerShell

How to Enable Sharepoint External Sharing

One of the great advantages of SharePoint Online and OneDrive is that you can easily share your content internally and with external and guest users. External Sharing in SharePoint Online is turned off by default for all your SharePoint Sites. Now you may have noticed … Read moreHow to Enable Sharepoint External Sharing