It really depends on what you need to do on a regular basis. I have been using this to deploy my custom DSC resources to my Azure virtual machines. To copy files to Azure VM, you can use PowerShell Remoting. Downloading the files and copying them to module path. If you have PowerShell v3 installed on the remote machine, configuring it for PowerShell Remoting is easy. If you’re not using PowerShell to automate your local servers, you’re crazy, but the good news is it’s getting easier and easier to administer Azure from PowerShell as well.

This is the final step. In the previous section, I had already showed you how to read the contents of a public Azure storage container and how to prepare the blob names so that we can use that to create the necessary folder structure. This is the final step. I have so many other scripts in that container but it simply does not make sense to copy them to the modules folder. There are a couple of different cases you want to copy files to Azure virtual machines. Companies around the globe are using Microsoft Azure Infrastructure-as-a-Service (IaaS) and deploying cloud-based virtual machines (VMs), yet getting data in and out of a Microsoft Azure VM is not as easy as it might look.For years, IT Admins have become accustomed to using Windows Explorer to copy files from machines to servers, but in the era of cloud computing, it isn’t that simple. Once we have the name of file blob in the container, we need to convert it to the format the file system will understand. There are different places you can copy the DSC resources to. In this article, I will show one of the use cases for the Custom Script Extension.

In fact, if you search for New-AzureStorageContext and put it inside quotes so you only get exactly that, you won’t even see the blog from Microsoft that I linked above until the fourth entry, let alone documentation.

This is great news. He blogs at http://www.ravichaganti.com/blog and you can follow him on Twitter @ravikanth. Configure Remote machine for PowerShell Remoting. Most of the examples I could track down were for API calls through C#. So, in the above script, I am removing /DSCResources/ from the blob file name. In an earlier article, I showed you how to use this extension. Also, you need to extract the recent wave of DSC resources from PowerShell team to C:. First of all, I will show you the code that is used to copy the DSC resources to a storage container.

You can certainly use one of the Azure storage explorers out there to achieve this. So, at the end of this script execution, we will have all the DSC resources copied to the Azure VM at the specified module location. Sorry, your blog cannot share posts by email. Fully managed intelligent database services. Easily copy multiple files by using Copy-Item “That is OK, but I specifically want to copy my pictures, and I do not want to type a bunch of names. In the above code, we just iterate through the local folder and convert each file name to the format we need for the Azure blob. […] Using PowerShell to move files to Azure Storage (posted June 3) […], Using PowerShell to move files to Azure Storage…, Thank you for submitting this cool story – Trackback from WindowsAzureRocks…, “If you’re not using PowerShell to automate your local servers, you’re crazy”.

Well, it really depends on what you need to do.

But I just keep plugging away since it is the “must scripting language to learn” and MS releases Azure updates that cannot be manipulated any other way. Copy-Item -Path C:\fso\20110314.log -Destination c:\fsox\mylog.log.