Zend certified PHP/Magento developer

WSL: Is there a way to mount an external drive when it becomes available?

I am using Ubuntu with WSL with a zsh/bash shell. My host OS is Windows 10. I already figured out how to mount a Windows external drive:

$ sudo mkdir /mnt/d
$ sudo mount -t drvfs D: /mnt/d

I rarely plug this drive in, so I’d like to automatically mount it when I do. It’s fine if this occurs after I plug the drive in, then start a new WSL terminal.

I don’t want to put this command in a .bashrc type of file because having to type in my password every time I open a terminal would be more trouble than it’s worth, especially if 99% of the time, the command will fail anyway. Putting it in a bash script won’t help either, because I’d call it so infrequently, by the time I need to use it, I’ll forget I created it in the first place.

My question is, is there a way to automate a WSL mount command when a Windows external drive becomes available?