Posts

Showing posts from 2018

Azure - CLI 2.0(Latest) - Set up a Windows VM on Azure from MacOS

Image
Problem Definition How to set up a resource group, virtual machine, enable port 80 and finally delete the resource group using CLI 2.0. Prerequisites Azure portal subscription. Microsoft Remote desktop app installed on your MacOS. Azure CLI 2.0 installed on your mac. If its not please visit . Step by Step process Log-in There are more than 1 way to log in to Azure Portal using CLI 2.0 such as Interactive, Command Line, Log-in with specific tenant and Log-in with specific service. Easiest and most user friendly way to login is interactive where we use 'az login' command on Azure CLI and then follow the guided instructions to complete the process.                 Write az login on terminal window and hit enter Open your web browser and go to the given address and enter the code where asked and hit continue. Now you will asked to login with you portal credentials On your terminal win...

Azure - CLI 2.0(Latest) - Setup on MacOS

Image
Problem Definition How to use Azure commands using Command Line Interface on MacOS. Prerequisites You need to have homebrew set up on you Mac. Homebrew is a package manager which is very handy in order to get you what you need or you are missing. If you don't already have home brew on you Mac please user this   link and set up homebrew. Introduction to Azure CLI Azure CLI is Microsoft's cross-platform command line tool for managing resources in Azure. Azure CLI comes with capability of effectively managing and administering Azure resources from command line and build automation scripts using that. Version in question here is Azure CLI 2.0 . How can I set it up Please run a test in bash by typing " az " on your terminal. If you don't have Azure CLI on your Mac you will receive an error like the following: Now to set it up please type following in your command window. brew update && brew install azure-cli It will then tak...

Azure - Manage Blob Storage - Part #10 - Complete Example with Code

Problem Definition How to Manage a blob container using C# in Azure(Complete Code). Prerequisites Access to Azure Portal -  http://portal.azure.com Azure General Purpose Storage Account Microsoft Visual Studio(For this demo used Visual Studio Community for Mac) Use following code in your "BlobStorageContainer.cs" using   System ; using   System . Collections . Generic ; //Required for Azure using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Blob; namespace AzureWorkshop {     public class BlobStorageContainer     {         public CloudBlobContainer CloudBlobContainer         {             get;             set;         }         public BlobStorageContainer(string container...

Azure - Manage Blob Storage - Part #9 - Delete Blob Container using C#

Image
Problem Definition How to delete a blob container using C# in Azure. Prerequisites Access to Azure Portal -  http://portal.azure.com Azure General Purpose Storage Account Microsoft Visual Studio(For this demo used Visual Studio Community for Mac) Storage Account connection string as described in  Part #1 Complete Visual studio connectivity to Azure as described in  Part #1 Create a blob container as described in in  Part #2 Use following code to set up a new method in your class "BlobStorageContainer.cs" CloudBlobContainer will use the name that was passed to check if container exists or not. For block blob to be created container should be existing refer to  Part #2  to see how to create the container. How to call from "Program.cs" Results Program execution Azure confirmation Resources https://docs.microsoft.com/en-us/azure/storage/blobs/storage-...

Azure - Manage Blob Storage - Part #8 - Copy block blob sync with in an Existing Container using C#

Image
Problem Definition How to copy block blob aync using C# in Azure. Prerequisites Access to Azure Portal -  http://portal.azure.com Azure General Purpose Storage Account Microsoft Visual Studio(For this demo used Visual Studio Community for Mac) Storage Account connection string as described in  Part #1 Complete Visual studio connectivity to Azure as described in  Part #1 Create a block blob and upload a sample file as described in  Part #3 Use following code to set up a new method in your class "BlobStorageContainer.cs" CloudBlobContainer will use the name that was passed to check if container exists or not. For block blob to be created container should be existing refer to  Part #2  to see how to create the container. In order to list the content successfully make sure you have an item created inside the container, such as a block blob as created in  Part #3 How to call from "Program.cs" Re...

Azure - Manage Blob Storage - Part #7 - Add Metadata to an Existing Container using C#

Image
Problem Definition How to add Metadata to and Existing container using C# in Azure. Prerequisites Access to Azure Portal -  http://portal.azure.com Azure General Purpose Storage Account Microsoft Visual Studio(For this demo used Visual Studio Community for Mac) Storage Account connection string as described in  Part #1 Complete Visual studio connectivity to Azure as described in  Part #1 Create a blob container as described in in  Part #2 Use following code to set up a new method in your class "BlobStorageContainer.cs" CloudBlobContainer will use the name that was passed to check if container exists or not. For block blob to be created container should be existing refer to  Part #2  to see how to create the container. How to call from "Program.cs" Results Program execution Azure confirmation Resources https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-bl...

Azure - Manage Blob Storage - Part #6 - Display properties of an Existing Container using C#

Image
Problem Definition How to display container properties using C# in Azure. Prerequisites Access to Azure Portal -  http://portal.azure.com Azure General Purpose Storage Account Microsoft Visual Studio(For this demo used Visual Studio Community for Mac) Storage Account connection string as described in  Part #1 Complete Visual studio connectivity to Azure as described in  Part #1 Create a blob container as described in in  Part #2 Use following code to set up a new method in your class "BlobStorageContainer.cs" CloudBlobContainer will use the name that was passed to check if container exists or not. For block blob to be created container should be existing refer to  Part #2  to see how to create the container. How to call from "Program.cs" Results Program execution Resources https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-dotnet?tabs=macos

Azure - Manage Blob Storage - Part #5 - Create Folder Structure and upload a file to folder using an Existing Container using C#

Image
Problem Definition How to create directory structure and files using C# in Azure. Prerequisites Access to Azure Portal -  http://portal.azure.com Azure General Purpose Storage Account Microsoft Visual Studio(For this demo used Visual Studio Community for Mac) Storage Account connection string as described in  Part #1 Complete Visual studio connectivity to Azure as described in  Part #1 Create a blob container as described in in  Part #2 Use following code to set up a new method in your class "BlobStorageContainer.cs" CloudBlobContainer will use the name that was passed to check if container exists or not. For block blob to be created container should be existing refer to  Part #2  to see how to create the container. How to call from "Program.cs" Results Program execution Azure confirmation Resources https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-dotn...