I have created file share in azure and mapped it to Virtual Machine entitled VM_01.
I have used CmdKey command to persist the credentials.
C:\>cmdkey /add:<yourstorageaccountname>.file.core.windows.net
/user:<yourstorageaccountname>
/pass:<YourStorageAccountKeyWhichEndsIn==>
I am able to see shared drives when I logging to the virtual machine, but when other administrators logging to the same machine they do not see and access the shared drives!!
After spending time on internet, I found that The credentials persisted by CmdKey are available to the user who ran “CmdKey”. https://blogs.msdn.microsoft.com/windowsazurestorage/2014/05/26/persisting-connections-to-microsoft-azure-files/
So solution suggested was to use runas command and then use CmdKey command as follow
runas /user:<username> cmd.exe // This will open the command window
But, I have 100 of users!!! Do I have to run the bove command 100 times with different user names :( Do we have any alternative solutions?
Extract from MSDN but I am not getting what does it means!
If you create a new local user on your VM, and add that user to the administrators group, then you can run commands for that user in both elevated and non-elevated contexts. Connections are not shared between elevated and non-elevated contexts, so you may want to connect separately in each context by executing “net use”. However, the persisted credentials are shared, so you only need to run “CmdKey” in one of the contexts.