We had an incident this morning when a mail database was showing healthy, but was not allowing connection from users.
(As it was showing healthy it did not failover to an alternate server).
We have resolved the problem as of now.
Although I am trying to find a way to monitor if the same thing happens again in the future.
So is there a powershell command to check the database for this specific occurrence OR
Maybe a powershell command that can check user connectivity to an exchange database.
PowerShell isn't really a monitoring system; you'd be far better served by using actual monitoring tools. In the MS space, for example, there's SCOM and OMS. SImply running a PowerShell script over and over to check connectivity isn't very performance-friendly, and no, I'm not aware of a command specifically for the situation you describe (there aren't any "monitoring" commands).
You can try test-outlookconnectivity command as a script along with the email option. schedule this script to run every couple of hours and send the output if it has a login failure or whatever error conditions you might require