While the Microsoft 365 admin center GUIs are decent, there are many Microsoft 365 management tasks that are better suited for PowerShell. However, before you can start scripting, you must first establish a connection to your Microsoft 365 tenant.
Filtering what objects are synced to Azure AD is a common request and there are many instances where filtering by OU just doesn't cut it. One option is to filter users by their UPN suffix so that only users with the public FQDN as their UPN suffix are synced to Azure AD.
Sometimes you need to replicate changes between your on-premise Active Directory and Azure, but don't want to wait for the next scheduled sync. In these cases, the ADSync PowerShell module provides a very easy way to force synchronization.