Skip to content

Instantly share code, notes, and snippets.

Created October 18, 2017 02:43
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>\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>\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