Does anyone have a handy way to get the full UNC (\\servername\) from a network mapped drive (X:\)?

Every method that I've tried on here and other sites seems to be deprecated.