I thought that was a good question, and figured the only way to find out is to do a bit of trial & error. So this blog entry is for Bill, who can read it as soon as he digs out from under the 7 feet feet of snow he’s gotten in the past month. Use Power. Shell to transfer a file. Log into a VM, attach the file share, and transfer the files between the VM and the desktop using the Windows Clipboard. Write an application that uses the storage client library to transfer files from the desktop to the file share. Use Az. Copy to transfer files between the desktop and the file share.
While writing this, I found that if I copy a file from one folder to another in Windows 8, it changes the Created Date to the desktop’s current date/time, and leaves the modified date “as is”. It shows the modified date in File Explorer. What’s weird about this is that it is really easy to have a file with a Created Date that comes long after the Modified Date. I mention this because there is a similar behavior in some of the following cases. For the purposes of these tests, I set the time on my desktop machine to be 5 minutes behind so I could discern between the desktop machine’s date/time and the VM’s date/time (which I am referring to as actual date/time). The tests were run on 2/9/2. Pacific Standard Time. Note: I tried to set the time difference to an hour, but when I did that, I got 4. Forbidden errors with every call to Azure Storage, so I guess they have some kind of check on the time difference of your computer against the real date/time. I’ve included the Power. Shell commands, C# code for using the storage client library, and Az. Copy commands, so you can replicate these tests if you want to and aren’t familiar with one of the methods. Using Power. Shell. Note: You may need to install the most recent version of the Azure Power. If those programs create the necessary registry entries when installed and therefore would show up in the Programs and Features (Add/Remove Programs) list. How to Know ClickOnce's Registry Uninstall Key before installing it. Duplicate entries in uninstall registry key when compiling list of installed software. Shell cmdlets from Git. Hub. At the time of this writing, it is 0. You can also use the Web Platform Installer, but I’m not a fan because there’s no telling what it will install along with whatever you asked for. Last time I used it to install the Azure cmdlets, it installed the newest version of the Azure Tools/SDK, which I wasn’t ready to install (2. If you go to the link above to Git. Hub, you can download the Windows Standalone version (it’s an msi) and install it. To find which version you have, you can run Power. Shell and type the following: > Get- Module Azure. I’m going to use the Power. Shell ISE so I can save my commands as a script in case I want to use them later. First I’m going to set up a couple of variables for storage account name and key. This makes it easy to just modify those fields and run the script for a different storage account. Then I’m going to create the context for the storage account. This tells which storage account to use when this variable is used in subsequent commands. It knows which storage account to use because I’m supplying the context I just defined. I’m naming my file share “contosofileshare”. I’m going to create a VM in Azure and RDP into it. If you don’t know how to create a VM in Azure, download the Fundamentals of Azure book from Microsoft Press (it’s free!) and go to the chapter on VM’s; it has follow- along instructions that show you how to create a VM. I get no royalties, so please don’t think I’m recommending the book for financial reasons!)After logging into the VM, I’m going to mount my file share. First I need a command prompt window. Click the windows button to go to the start screen, then just start typing “Command Window” to search for it, and click on it when it shows up on the right side.) I can use a NET USE command to attach the file share. The NET USE command looks like this: NETUSE z: \\storageaccountname. After this is done, you can type NET USE and it will show you all of the file shares available, and what drive letter they are mapped to. Now I can open file explorer and go see what’s on the Z drive. Back to Power. Shell, I’m going to upload a file called Chihuly. On the desktop, if I right- click on this file and look at its properties (Details): Created Date: 1. PM. Modified Date: 7/5/2. AM. Actual time: 2/9/2. PM. Desktop time: 2/9/2. PM. I’m going to upload the file and see what it looks like on the other side. The following command in Power. Shell uploads the file. Set- Azure. Storage. File. Content - Share $s - Source D: \. The date/time on the desktop machine is not used. Where does Azure get the Created Date and Modified Date – from a time server somewhere? From the server holding the storage? That’s the question. Now I’m going to download the file using Power. Shell and see what the date/time stamps are on the downloaded file. In this case, it sets the Created Date to the time on the local machine, but in some test cases, it set it to a few minutes before that. Where does it get the value for created date? Copy and Paste. Now I’m going to try the same thing with copy (desktop) and paste (vm). About the Uninstall Registry Key, Windows. Installer Value – Windows Installer MSI & Clickonce issues. MSI packages built using Visual Studio Setup and Deployment project create the following registry key. HKEY. Setting the Windows. Installer Registry key under HKEY.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
August 2017
Categories |