When running this with Azure PoweShell 1.5.1 I get an error that the parameter "key1" isn't valid. This is when the copy command is attempting to get the key for the RM storage account. I worked around this by getting the key manually and hard coding it into the powershell script.