Keep in mind that these methods are for activating Office 365 on a local machine. If you're looking to activate Office 365 for a large organization, you may need to use more advanced activation methods, such as using the Office Deployment Tool (ODT) or Microsoft Endpoint Manager (MEM).

slmgr /ato

You can use the following command to activate Office 365 using CMD:

In 2022, Microsoft introduced changes to the Office 365 activation process. The company now recommends using the (formerly Office 365 ProPlus) activation method, which uses a combination of Azure Active Directory (Azure AD) and the Microsoft 365 activation server.