For years I have been getting mapped drives from WMI using Win32_NetworkConnection. Typical code looks like this in PowerShell:
Get-CimInstance -ClassName 'Win32_NetworkConnection' | Select LocalName, RemotePath
I have been using a product called ExpanDrive to map my cloud storage to drive letters. When I tried to view the drives with Win32_NetworkConnection, I had no results. There is an alternative, which picks up non-standard mappings, Win32_LogicalDisk. You can get all your network drive maps like this:
Get-CimInstance 'Win32_LogicalDisk' -Filter 'drivetype = 4' | select name, providername