While you can easily check on your Office 365 licenses status and expiry date using the Admin Portal or directly via https://admin.microsoft.com/#/subscriptions , there’s also a way for you to check using the Powershell Here’s how you can do it. Preferably, you should run your Powershell as Administrator, then key in these commands

Microsoft
Office 365
Powershell
Technology