Hello,
It is possible to achieve the automation you described. But this may need a combination of scripting, Group Policy, and possibly PowerShell. You may visit PowerShell Gallery | Home or GitHub: Let’s build from here · GitHub to check if there's relevant script you need.
To map the share folder as a network device to the VM which user login, you could use GPO User Configuration -> Preferences -> Windows Settings -> Drive Maps
.
"Drive Maps" within "Windows Settings" allows admin to map network drives for users. It lets you create, modify, or delete mapped network drives on users' computers during logon or when the Group Policy is refreshed.
Regards,
Karlie