Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$net1 = new-object -ComObject WScript.Network
$net2 = new-object -ComObject Shell.Application
 
$net1.RemoveNetworkDrive("m:", $True, $True)
Start-Sleep -Seconds 2
$net1.MapNetworkDrive("m:", "\\<StorageAccountName>.file.core.windows.net\music", $true, "<StorageAccountName>", "<StorageAccountKey>")
$net2.NameSpace('m:').Self.Name = "Drive 1 Label"
$net1.RemoveNetworkDrive("n:", $True, $True)
Start-Sleep -Seconds 2
$net1.MapNetworkDrive("n:", "\\<StorageAccountName>.file.core.windows.net\music", $false, "<StorageAccountName>", "<StorageAccountKey>")
$net2.NameSpace('n:').Self.Name = "Drive 2 Label"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment