I have a client system that is running a mirrored database. I have written a VBScript that returns various items on the system status as a "quick check" sort of app. I want to add the mirror status as part of the return of this script. I know the T-SQL statement to return mirroring status is:

SELECT * FROM sys.database_mirroring;

Has anyone done anything like this, and perhaps you can advise?