Azure and Office 365 Archives - Page 11 of 11 - - Page 11

Category Archives: Azure and Office 365

Power BI with Azure SQL Data Warehouse

Prerequisite: Power BI Desktop Tool, Power BI Online Service, SSMS and SSDT Connecting Power BI Desktop Tool with Azure SQL Data Warehouse: With the new Azure SQL Data Warehouse Preview released in June 2015, we can connect to Power BI Online or Desktop tool and create stunning reports/dashboards to visualize and analyze your data. Before connecting with Power BI, we will first move few records in Azure SQL Data Warehouse from SQL Server in Azure VM using SSIS as shown below: Now we can connect to Azure SQL Data Warehouse from SQL Server and query table to view records inserted as shown below: Once data is loaded in Azure SQL Data Warehouse, we can now start creating reports and later publish it to Power BI Online. Find the steps given below to connect to Power BI Desktop tool:   Step 1: Open Desktop tool and click ‘Get Data’ from ribbon. Select ‘Microsoft Azure SQL Data Warehouse’ and click ‘Connect’   Step 2: Enter Server Name, Database and later credentials to connect to your Azure SQL Data Warehouse   Step 3: Once connected, you can select required tables. In our case it is ‘Projects’ and click load   Step 4: Design report and later save & publish it to Power BI Online   Step 5: You can pin visualizations to dashboard and also schedule refresh without the need for Power BI Personal Gateway   Direct Connectivity to Power BI Online from Azure SQL Data Warehouse: We can also directly load tables in Power BI Dataset using option ‘Open in Power BI’ available in Microsoft Azure as shown below:   Once you hit ‘Open in Power BI’, you will be taken to Power BI Online and details like server name and database name will be already provided by default. Later you need to just enter password for database and then you are good to go.   You can create reports from the imported dataset and pin visuals to dashboard similarly as in case of reports published from Power BI Desktop tool. Find the screen capture as shown below:   Since dataset is directly imported in Power BI connecting to Azure SQL Data Warehouse, the dataset is automatically refreshed at regular interval without the need to schedule refresh. Find image shown below:  

Share Story :

Developing Integration Solutions using Microsoft Azure BizTalk Services

Part 2 – Integrating Microsoft Dynamics CRM Online to Microsoft Azure Service Bus Queue. You can check part 1 here. Scope: To demonstrate the integration through Message-flow from Microsoft Dynamics CRM Online and Azure Service Bus Queue. Pre-requisite: Source: Microsoft Dynamics CRM Online Target: Microsoft Azure Service Bus Queue SDK for Dynamics CRM Online (plugin Registration Tool) Service Bus Explorer to view the message contents received from CRM in Azure SB Queue. Visual Studio to create Custom WCF Service to push the messages from CRM to SB Queue (alternate method) Background: In earlier Blog we had seen steps to Create Microsoft Azure BizTalk Services as well as Developing and Deploying BizTalk bridges on Azure. In this Blog we will see the steps to create Service End Point (Azure Aware Plugin) that will push messages in JSON (default) format whenever a new Account Name is created in CRM to Azure Service Bus. We can View the contents of this message in Azure SB Queue, using Service Bus Explorer Tool (URL for the tool https://code.msdn.microsoft.com/windowsazure/service-bus-explorer-f2abca5a). Alternately we can also create a custom WCF Web Service that will push the messages whenever a new record is created CRM (Entity- Accounts) STEP 01: Creating Azure Aware Plugin in CRM Download the Microsoft Dynamics CRM Software Development Kit (SDK) for CRM Online and on-premises CRM 2015 from URL http://www.microsoft.com/en-us/download/details.aspx?id=44567 After Download, Extract the same and go to Path \MicrosoftDynamicsCRM2015SDK\SDK\Tools\PluginRegistration, and launch the PluginRegistration.exe Select Create New Connection and enter the details for your CRM like Deployment Type as per your CRM, Online Region, User Name and Password and click on Login. You can create CRM Trail account if needed. In the Next Window of Service End Point Registration, provide details for the endpoint Please note in above screen the path is taken from Service Endpoint URL in Azure. For example URL is Then my path is TwoWayService/Demo. The Contract can be selected from dropdown Oneway, TwoWay, Queue, REST, TOPIC and PersistentQueue. After entering the details you need to click on Save & Configure ACS (Access Control Service) We will need below Information in this screen. Management Key Certificate File Issuer Name   Management Key: This key is obtained from Azure Portal. Login to Azure Portal and Create a ServiceBus and a Queue. Here the Service Bus is btscfsnamespace and btscfsqueue is a Queue in it. The Management Key is the Default Key found in the Connection Information for the Service Bus in the Azure Portal. After this you need to Register the Steps in Plugin Registration tool for the Service End point you recently created.   Certificate File: This certificate file is obtained from CRM under Customizations, under Developer Resources. Issuer Name : This is found as in above screen in CRM under Windows Azure Service Bus Issuer Certificate (crm.dynamics.com)   Select Save & Verify Authentication in the Service Endpoint Registration window and close the window after verification test is completed successfully. Step 02: Registering the Step in Plugin Registration Tool In the Message, mention the type of action like Create or Update or Delete etc. Then specify the Entity in CRM. In this case Entity is Account. Execution Mode will be Asynchronous.   Now that the Plugin registration and Step registration is completed. We can login to CRM and create new Account Name in account entity.   When a new Account Name is created, the Message is pushed by the plugin that we created earlier to Azure Service Bus Queue. You can view the Message using the service bus explorer tool. The message remains in the Queue as per the Time-To-Live settings in the Azure portal. After that if there is no further processing, the message gets moved to dead-letter queue. So we have pushed the messages from Account entity in CRM to Azure Service Bus Queue. Azure Service Bus Queue has many features as below FIFO Ordering guaranteed Transaction Support Automatic Dead Lettering Increasing Queue TTL (Max Unlimited) Poison Message Support Message Auto Forwarding WCF Integration Support Message Sessions supported Duplicate Detection functionality. Maximum Queue Size 1 GB to 80 GB Maximum Message Size 256 KB Maximum message by default is TTL 7 days Maximum No of Queues 10,000 (per service namespace, can be increased) Unlimited number of concurrent clients for REST based Maximum throughput upto 2000 Messages/seconds Average Latency 20-25 ms. Azure Service Bus Architecture combined with BizTalk Bridge solution deployed in Azure can provide integration solutions with scalable and monitoring capabilities at affordable cost. In the above steps, there was not coding involved due to SDK plugin registration tool. We can write the custom WCF service that will push the messages from CRM whenever a new Account is created, to Azure Service Bus Queue and then from there these messages can be picked up by BizTalk Service Bridge that listens for the incoming messages in the Queue and then process these messages to external end point or web service that can write the same in to other application or another CRM. We can track the status of these message processing in BizTalk service Tracking option. Creating the WCF service to Push the messages from CRM to Azure Service Bus Queue. Alternately we can write a custom code that will integrate the pre-defined entities and fields from CRM to other applications. Here we need Schema from Source and Target. To achieve this we need to host the WCF code and register the Assembly using the same plugin registration we used earlier. Describing the code for the same is beyond the scope of this blog. Please note the messages that we send to SB Queue through WCF service are by default in XML UTF -8 encoding, and this aspects needs to be handled while creating the processing steps in the Solutions that listens to this messages. In the next article we will have more insight in to the Messages flow in the Queues and the Processing inside the Azure BizTalk Bridges.  

Share Story :

Developing Integration Solutions using Microsoft Azure BizTalk Services

Part 1 – Creating Microsoft Azure BizTalk Services and Deploying Bridge. Scope: Creating Microsoft Azure BizTalk Services on Azure Portal Developing and Deploying BizTalk Bridge on Azure. Pre-requisite: Azure Subscription to create BizTalk Service. Visual Studio for Developing BizTalk Bridge solution. Windows Azure BizTalk Services SDK (including Microsoft BizTalk Adapter Pack and Microsoft WCF LOB Adapter SDK) .NET Framework 3.5.1 Features should be enabled .NET Framework 4.5 must be installed Background: Microsoft Azure is a cloud computing platform and infrastructure, created by Microsoft, for building, deploying and managing applications and services through a global network of Microsoft-managed and Microsoft partner hosted datacenters. The cloud services as offered as PaaS (Platform as a Service) and IaaS (Infrastructure as a Service). Step 1: Creating BizTalk Service Launch windows Azure portal through URL https://manage.windowsazure.com (You can create a Trial Subscription) Go to NEW option at the bottom of the page. Select APP SERVICES → BIZTALK SERVICE → CUSTOM CREATE This BizTalk Service Creation web form allows the creation of storage Account Tracking Databases. After successfully creating the BizTalk Service you get the BizTalk URL. ) On Clicking the Connection Information Button at the bottom of the page, you get Access Connection Information. This information you need to copy to a notepad to be used during deployment of the BizTalk Bridge solution on Azure. NAMESPACE DEFAULT OWNER DEFAULT KEY   Step 2: Developing the BizTalk Bridge Solution Launch Visual Studio 2012 and open a new project. Select BizTalk Service Template under folder located BizTalk Services in Visual C#. Please note BizTalk Services Templates are visible in Visual Studio 2012 only after you install the Windows Azure BizTalk Services SDK. (BizTalk Service Templates are not available in Visual Studio 2013 and 2015 even after installing the SDK) In the Visual Studio solution you need to specify 4 components. Sources Bridges (XML One way or XML Reply Request or Pass-Through bridge Destinations BizTalk Service URL Sources can be FTP / SFTP or Service Bus Queue or Subscription. Destinations have more options like FTP, FTPS, Service Bus Queue, Service end point, Blob Storage etc. Bridges can be XML one-way or Two way i.e. Reply Request and simple Pass Through Bridge. Right click anywhere in the empty space in the solution and select Properties. Enter the BizTalk Service URL (Example: https://cfsbtdemo.biztalk.windows.net). We get this URL when we create BizTalk Service in Azure portal. After placing the source, Bridge and Target blocks, connect them using connector under Bridge in toll box items. For complex solutions business logic and SCHEMA mapping between source and Target entities can be defined inside the bridges. Custom code can be written here.   Step 3: Deployment Save and Build the project and Right click and select deploy. Details like ACS Namespace and Issuer Name (Default – owner) and Shared Secret needs to be entered. ACS NameSpace is the Namespace we got earlier from Azure portal on clicking connection information for the BizTalk service. Shared Secret is the Key “Default Key “ Check the status in the Visual Studio output window for the deployed components. Please Note: Deployment Name needs to be Registered / created on https://biztalksvc12.portal.biztalk.windows.net/default.aspx before deploying your bridge. (You may need Silverlight on to be able to launch this end point URL). Provide the BizTalk Service Name as in Azure portal ACS Issuer name (Default is owner) ACS Issuer secret – This is Shared Secret key from BizTalk Service Connection Information in Azure portal. Once you deploy your bridge, it appears under BRIDGES in Microsoft Azure BizTalk services (MABS) Portal. Rest of the deployed codes appear under “RESOURCES”. If you are using bridge solution to route messages from Azure Service Bus Queue to Destinations like Web service end point, you can track them under Tracking Details. In the next article we will explore the integration between the Microsoft Dynamics CRM Online and Azure Service Bus queue. Azure servicebus Queue is one of the sources that Azure BizTalk Services can listen to for Integration requirements. Please note Azure Queues and Service Bus Queues are 2 different type of Queue offered by Microsoft Azure.  

Share Story :

Deploying ASP.NET Web Applications to Azure Web Apps

Azure Web Apps is a service provided by Microsoft Azure to host .Net, Java, PHP, Node.js, Python applications. We can host Web, Mobile, API as well as Logic Apps using Azure Web App Service. In this article we will look at how we can deploy an ASP.NET application on the App Service. Pre-requisites Active Azure Subscription Visual Studio 2013   A. Deploy ASP.Net Web applications by signing into Visual Studio Open Visual Studio and create a new ASP.Net Application. Check Host in the Cloud in the Select Template Menu and click on OK. Sign in to your Azure Account. Select the Service Plan for your application. After the application has been successfully created you can publish it to Azure using the Publish button. B. Deploy an already created ASP.Net Web Application on Azure Login to your Azure account and then select Web Apps->New->Quick Create. Enter a valid url for your web app and then click on Create Web App. Next click on your web app and then click on download publish profile. After downloading the Publishing profile go back to Visual Studio to import this profile and start the deployment. Inside Visual Studio right click on the project and click on publish. Click on import and then select the publishing profile file that we had downloaded and then click on Ok. Click on Publish and the deployment will begin. If the deployment is successful you can browse you website from the app service using the url you had used to create the web app on Azure.  

Share Story :

Setup custom domain and sub-domain name in Azure/GoDaddy Part -1

In this Blog we will walk-through how to add custom Domain/sub-domain in Azure web app with the help of GoDaddy. Problem Statement: We have a domain cloudfronts.in, purchased from GoDaddy and we want that it should point to website hosted on Azure. We have divided this blog in two different parts. Part 1: Add new custom Domain Part 2: Add new custom Sub-Domain Pre-Requisite: Azure Subscription with Web apps (Service administrator/Co-administrator) GoDaddy Account with new Domain (Admin) Next we need to follow the steps given below Steps 1: Login to your GoDaddy account with admin credentials and click on Manage domains. Steps 2: Click on domain name that you want to configure. In Our case we want to configure for cloudfronts.in. Double click on domain name and wait for new window. Step 3: Click on DNS Zone file and then edit option. Steps 4: We need some additional information from Azure web apps, that we will add in DNS configuration. Login to your Azure account and navigate to web site that you want to configure. Web site must be in share mode or standard mode to configure domain name. Change apps service plan pricing ties accordingly. Please refer following URL for more information http://azure.microsoft.com/en-in/pricing/details/app-service/ Navigate to Dashboard and click on Manage domains to add new custom domain name for your web site. Steps 5: Copy IP address of Azure web site. This information will need, when we add DNS record in GoDaddy. Steps 6:  Add new A(Address) record and point to IP Address with below configuration. Record Type: A (Host) Host: @ Point to: 192.198.15.14 (Azure website IP Address) If @ record in already present, then edit that record. Add new CName record with below configuration. Record Type: CNAME (Alias) Host: www Point to: cloudfrontsdev.azurewebsites.net (Domain Name of Azure website) Kindly edit this record if already present. Steps 7: Add CNAME(Alias) record that will point to Azure website. This information is required  by azure for verification purpose. Add two CNAME(Alias) record given in Image. Record Type: CNAME(Alias) Alias Name: awverify.www Points to Host Name: awverify.cloudfrontsdev.azurewebsites.net Record Type: CNAME(Alias) Alias Name: awverify Points to Host Name: awverify.cloudfrontsdev.azurewebsites.net Steps 8: Save all changes by clicking on Save Zone File. It might take 10-15 mins to update DNS entry. Steps 9: Add domain name in manage domain section(Azure) and click on ok. Reference https://azure.microsoft.com/en-in/documentation/articles/web-sites-custom-domain-name/  

Share Story :

Setting up a static IP address to Virtual Machine in Microsoft Azure – Part 1

The blog post will show you how we can assign a static IP address to one of the Microsoft Azure Virtual Machines, using Microsoft Azure Powershell. Assumptions: Create Virtual Machine and Virtual Network in Microsoft Azure.   Steps in Microsoft Azure Steps: Create a Virtual Machine named test and Virtual Network testing as shown below, where Internal IP Address of test is 10.0.0.5     Subnet-1 usable address rangeof 10.0.0.4 – 10.31.255.254 . The new static IP Address to be provided should fall in the usable range of address space.   Steps in Microsoft Azure Powershell Step 1: Run Microsoft Azure Powershell as Administration.   Step 2: Add your Microsoft Azure Account using the command Add-AzureAccount in Powershell. As shown in figure above it will ask the account details, I have selected my work account. Note: If at all this login control redirects to your personal account while doing in Work account, type Remove-AzureAccount in Powershell and enter and confirm the details. Once the account is added you can see that your account is added with the subscriptions present in your account. By the commands like Get-AzureVM you can see all the VM’s that are present in your account. Since I want to set a static IP Address to my test VM which is present in the testing virtual network with Internal IP Address of 10.0.0.5, I will get that VM in Powershell by the command Get-AzureVM –ServiceName sampleax –Name test, by this command we can view all the details associated with that particular VM with corresponding service name and VM name. All these details are shown in the diagram below.   Step 3: Set IP Address to Test VM Here by the command Get-AzureVM –ServiceName sampleax –Name test | AzureStaticVNetIP –IPAddress 10.0.0.6 | Update-AzureVM   As shown in figure above you can see the Succeeded message, this tells us that the corresponding IP is been set to the IP Address Provided in the command, here as 10.0.0.6.   Step 4: To check the changed IP Address Now to see whether the IP Address is been set type the command Get-AzureVM –ServiceName sampleax – Name test This command will show the details with related VM as shown below. In the highlighted box we can see the IP is been set.   We can also check the updated IP Address in Microsoft Azure as shown below that Internal IP is been now updated.  

Share Story :

Add Office 365 Azure Directory into Windows Azure Part 1

In this blog we walk-through adding office 365 AD in your Windows Azure account. Blog is divided in two different parts. Part 1: Add Office 365 Active Directory into Microsoft account. Part 2: Add Office 365 Active Directory into Organization account. Pre-Requisite: Azure Subscription to the Microsoft account (Service Administrator). Global admin user of Office 365. Next we need to follow the steps given below to add Office 365 Active directory. Login to azure account using Microsoft account. Navigate to Active Directory and click on new button. Select “use existing directory” option because we are adding office 365 Active directory. Now sign-in with your office 365 user (Global admin). Above process is little bit tedious because user need to sign-in and sign-out frequently. Limitation:  If Microsoft user email address and office 365 user email address is same then this process will get failed. Now you can see “A1 Tech solution” directory added to our Azure account. Add Azure subscription to Active directory. Select your AD from dropdown. Now you can see URL will be changed according to your Office 365 AD domain. Add co-administrator to your subscription. Note:  Each subscription can be associate with only one Active directory.  In order to add co-administrator we have to associate azure subscription with Active directory.  

Share Story :

Auto Start-Stop Azure VM using Azure Automation

Posted On July 13, 2015 by Posted in

Problem Statement We a have requirement, where we want to start Azure VM every morning 8.30am and stop VM at 6.30pm excluding Saturday and Sunday. Pre-Requisite Azure subscription Virtual Machine Azure Automation Installation Activate Azure Automation Activate Azure automation from preview portal. Navigate to following URL to activate Automation. https://account.windowsazure.com/PreviewFeatures Add Automation account Select automation and click on Create Provide proper account name and region   Connect to VM using automation Using Certificate Using Organization ID Part 1: Using Certificate Certificate Installation Open Windows run and type following command (inetmgr) Double click on Server certificate Create self-sign certificate (Top-Right corner) Provide useful name on select type personal. Now we required .cer and .pfx file for azure automation. Save .pfx file: Select path and type password. Password is required for uploading certificate on Azure. Save .cer file: Right click on AzureAutomation and click on view. Click on copy to file button. Upload certificate on Azure Upload .cer file Select .cer certificate from local machine. Upload .pfx file Navigate to Automation :- AutomationDemo(Account name) :- Assets Click on Add setting Click on Credential and provide credential name. This name we will used in Automation workflow as certificate name. Define connection for Automation Workflow Parameter:  Automation certificate name will be same as Certificate name. Refer below image. For Subscription ID refer below image. Now we have completed with installation. Next part is to create wokflow.   Add workflow for automation Create runbook under AutomationDemo account. We are creating runbook for auto start/stop VM. I have created runbook as StartVM under AutomationDemo account. After runbook is created, navigate to StartVM runbook. Kindly find sample code below workflow StartVM { param() #connection $MyConnection = “automationconnection” $MyCert = “automationcredential” # Get the Azure Automation Connection $Con = Get-AutomationConnection -Name $MyConnection if ($Con -eq $null) { Write-Output “Connection entered: $MyConnection does not exist in the automation service. Please create one `n” } else { $SubscriptionID = $Con.SubscriptionID $ManagementCertificate = $Con.AutomationCertificateName } # Get Certificate & print out its properties $Cert = Get-AutomationCertificate -Name $MyCert if ($Cert -eq $null) { Write-Output “Certificate entered: $MyCert does not exist in the automation service. Please create one `n” } else { $Thumbprint = $Cert.Thumbprint } #Set and Select the Azure Subscription Set-AzureSubscription ` -SubscriptionName “My Azure Subscription” ` -Certificate $Cert ` -SubscriptionId $SubscriptionID ` #Select Azure Subscription Select-AzureSubscription ` -SubscriptionName “My Azure Subscription” Write-Output “————————————————————————-” Write-Output “Starting the VM..” # Please type the name of your Domain Controllers inlinescript{ # function to get local time (example Convert UTC tome to Indian Time Zone) Function Get-LocalTime($UTCTime) { $strCurrentTimeZone = ‘India Standard Time’ $TZ = [System.TimeZoneInfo]::FindSystemTimeZoneById($strCurrentTimeZone) $LocalTime = [System.TimeZoneInfo]::ConvertTimeFromUtc($UTCTime, $TZ) Return $LocalTime } #convert date time to UTC time Zone $date = (Get-Date).ToUniversalTime() # call function to get local time $locatTime= Get-LocalTime($date) #get day of week eg. Friday $locatTimeDayOfWeek= ($locatTime).DayOfWeek #get current day of the date eg. if current date is 21 November 2014 09:55:18 then day will be 21 $localTimeDay= ($locatTime).Day #$locatTimeDayOfWeek #$localTimeDay #do not start VM on saturday and Sunday if($locatTimeDayOfWeek -ne “Saturday” -and $locatTimeDayOfWeek -ne “Sunday”) { #$sample = Get-AzureWinRMUri -ServiceName $Using:CloudServiceName -Name $Using:VMName $StartOutPut = Start-AzureVM -ServiceName “democf” -Name “democf” Write-Output $”Virtual Machine democf started.” Write-Output $StartOutPut } elseif($localTimeDay -le 7 -and $locatTimeDayOfWeek -eq “Saturday”) { $StartOutPut = Start-AzureVM -ServiceName “democf” -Name “democf” Write-Output $”Virtual Machine democf started.” Write-Output $StartOutPut } else{ Write-Output “Virtual Machine is not started, because today is not a working day.” } } } Changes in above code Replace VM name with your VM name. Example : Start-AzureVM -ServiceName “democf” -Name “democf” ServiceName : Cloud Service name where vm is located -Name : is actual VM name In our case cloud service name and vm name is same, it can be deferent for other cases. After above changes is completed click on save and test. Check whether code is running perfectly or not. VM will not be start if it is Saturday or Sunday (Requirement). Now we will automate this workflow using schedule Now this workflow will be run every day at 8.30am to auto start VM. Same code auto stop vm using workflow, with small changes. workflow StopVM { param() #connection $MyConnection = “automationconnection” $MyCert = “automationcredential” # Get the Azure Automation Connection $Con = Get-AutomationConnection -Name $MyConnection if ($Con -eq $null) { Write-Output “Connection entered: $MyConnection does not exist in the automation service. Please create one `n” } else { $SubscriptionID = $Con.SubscriptionID $ManagementCertificate = $Con.AutomationCertificateName } # Get Certificate & print out its properties $Cert = Get-AutomationCertificate -Name $MyCert if ($Cert -eq $null) { Write-Output “Certificate entered: $MyCert does not exist in the automation service. Please create one `n” } else { $Thumbprint = $Cert.Thumbprint } #Set and Select the Azure Subscription Set-AzureSubscription ` -SubscriptionName “My Azure Subscription” ` -Certificate $Cert ` -SubscriptionId $SubscriptionID ` #Select Azure Subscription Select-AzureSubscription ` -SubscriptionName “My Azure Subscription” Write-Output “————————————————————————-” Write-Output “Stoping the VM..” # Please type the name of your Domain Controllers inlinescript{ # function to get local time (example Convert UTC tome to Indian Time Zone) Function Get-LocalTime($UTCTime) { $strCurrentTimeZone = ‘India Standard Time’ $TZ = [System.TimeZoneInfo]::FindSystemTimeZoneById($strCurrentTimeZone) $LocalTime = [System.TimeZoneInfo]::ConvertTimeFromUtc($UTCTime, $TZ) Return $LocalTime } #convert date time to UTC time Zone $date = (Get-Date).ToUniversalTime() # call function to get local time $locatTime= Get-LocalTime($date) #get day of week eg. Friday $locatTimeDayOfWeek= ($locatTime).DayOfWeek #get current day of the date eg. if current date is 21 November 2014 09:55:18 then day will be 21 $localTimeDay= ($locatTime).Day #$locatTimeDayOfWeek #$localTimeDay #do not start VM on saturday and Sunday if($locatTimeDayOfWeek -ne “Saturday” -and $locatTimeDayOfWeek -ne “Sunday”) { #$StopOutPut = Start-AzureVM -ServiceName “mkadamvm” -Name $Using:test #$sample = Get-AzureWinRMUri -ServiceName $Using:CloudServiceName -Name $Using:VMName $StopOutPut = Stop-AzureVM -ServiceName “democf” -Name “democf” -Force Write-Output $”Virtual Machine democf Stopped.” Write-Output $StopOutPut } elseif($localTimeDay -le 7 -and $locatTimeDayOfWeek -eq “Saturday”) { $StopOutPut = Stop-AzureVM -ServiceName “democf” -Name “democf” -Force Write-Output $”Virtual Machine democf Stopped.” Write-Output $StartOutPut } else{ Write-Output “Virtual Machine is not started, because today is not a working day.” } } } References 1. http://clemmblog.azurewebsites.net/using-azure-automation-start-und-stop-virtual-machines-schedule/ 2. http://blogs.technet.com/b/keithmayer/archive/2014/04/04/step-by-step-getting-started-with-windows-azure-automation.aspx

Share Story :

UCC SAN SSL Certificate–GoDaddy/Azure

Introduction Adding sub-domain to UCC SSL 5 certificate and revoking existing SSL Certificate. Problem Statement: We have sub-domain called salesportal.mywebsite.com hosted on windows azure. Salesportal.mywebsite.com associated with SSL binding but that SSL is expired and we want to revoke that certificate and add it to UCC SSL 5 certificate from Go-daddy. => We have salesportal.mywesite.com hosted on windows azure. => SSL certificate purchase from Go-Daddy. In our case we want to remove standard certificate and add it to UCC 5 Certificate. Please follow below steps to revoke existing SSL and add it to New SSL certificate Installation To proceeds with SSL, first step is to download Open SSL. This is Open source software that will help us to create CSR request. Download Open SSL from following link: http://indy.fulgan.com/SSL/ Generate CSR Create CNF file for CSR For more detail visit following URL. http://azure.microsoft.com/en-in/documentation/articles/web-sites-configure-ssl-certificate/ Let’s understand how to apply SSL Certificate to multiple Domain. Download Sample code from http://azure.microsoft.com/en-in/documentation/articles/web-sites-configure-ssl-certificate/#bkmk_subjectaltname Example: # ————– BEGIN custom sancert.cnf —– HOME = . oid_section = new_oids [ new_oids ] [ req ] default_days = 730 distinguished_name = req_distinguished_name encrypt_key = no string_mask = nombstr req_extensions = v3_req # Extensions to add to certificate request [ req_distinguished_name ] countryName = Country Name (2 letter code) countryName_default = stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = localityName = Locality Name (eg, city) localityName_default = organizationalUnitName = Organizational Unit Name (eg, section) organizationalUnitName_default = organization = Organization Name organization__default= commonName = Your common name (eg, domain name) commonName_default = www.mydomain.com commonName_max = 64 [ v3_req ] subjectAltName=DNS:payments. mydomain.com, DNS:blog.mydomain.com # ————– END custom sancert.cnf —– Note: => subjectAltName contains sub domain name. It can also contains main domain name as well. Example. www.crmonline.com File start with # ————– BEGIN custom sancert.cnf —– Above example can be tricky Problem statement 1: We have UCC SSL 5 certificate connected to payments.mywebsite.com and its running. We are adding salesportal.mywebsite.com domain to UCC SSL 5 certificate. In that case your Common Name will be payments.mywebsite.com and subjectAltName will be salesportal.mywebsite.com. Note: common name need to add from console window and subjectAltName in the cnf file. Example: # ————– BEGIN custom sancert.cnf —– HOME = . oid_section = new_oids [ new_oids ] [ req ] default_days = 730 distinguished_name = req_distinguished_name encrypt_key = no string_mask = nombstr req_extensions = v3_req # Extensions to add to certificate request [ req_distinguished_name ] countryName = Country Name (2 letter code) countryName_default = stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = localityName = Locality Name (eg, city) localityName_default = organizationalUnitName = Organizational Unit Name (eg, section) organizationalUnitName_default = organization = Organization Name organization__default= commonName = Your common name (eg, domain name) commonName_default = www.mydomain.com commonName_max = 64 [ v3_req ] subjectAltName=DNS:salesportal.mywebsite.com, # ————– END custom sancert.cnf —– Problem Statement 2: We have UCC SSL 5 certificate connected to www.mywebsite.com and its running. We are adding salesportal.mywebsite.com domain to UCC SSL 5 certificate. In that case your Common Name will be www.mywebsite.com and subjectAltName will be salesportal.mywebsite.com. Please note: your common name you have to add from console window and subjectAltName in the cnf file. Example: # ————– BEGIN custom sancert.cnf —– HOME = . oid_section = new_oids [ new_oids ] [ req ] default_days = 730 distinguished_name = req_distinguished_name encrypt_key = no string_mask = nombstr req_extensions = v3_req # Extensions to add to certificate request [ req_distinguished_name ] countryName = Country Name (2 letter code) countryName_default = stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = localityName = Locality Name (eg, city) localityName_default = organizationalUnitName = Organizational Unit Name (eg, section) organizationalUnitName_default = organization = Organization Name organization__default= commonName = Your common name (eg, domain name) commonName_default = www.mydomain.com commonName_max = 64 [ v3_req ] subjectAltName=DNS:salesportal.mywebsite.com, # ————– END custom sancert.cnf —– CSR Generation Write following command in Open SSL Console window. req -new -nodes -keyout myserver.key -out server.csr -newkey rsa:2048 -config sancert.cnf Note: sancert.cnf is above sample. myserver.key file is used to generate .pfx file. Steps 1: => Please fill basic information like Country name, State etc. => I have entered common name like payments.mywebsite.com because first time UCC SSL certificate is associate with payments.mywebsite.com. => If you are first time creating csr request then common name will be www.mywebsite.com If you want to check your CSR request then open CSR file in notepad and copy all code paste in following website. https://www.sslshopper.com/csr-decoder.html Revoke Expired SSL Certificate (GoDaddy) Always it’s better to revoke SSL certificate after it is expired. Please refer following URL for more support. https://support.godaddy.com/help/article/4747/revoking-an-ssl-certificate?countrysite=in Login to GoDaddy account: 1. Click on SSL Certificate: 2. Click on manage You can see we have one sub-domain Standard SSL is expired and another sub-domain has standard UCC SSL 5 certificate. We are going to add expired sub domain to standard UCC SSL certificate. 3. Click view status of expired domain. 4. Click on conform after that following window will appeared. 5. Wait for few minutes and refresh page. Certificate is expired successfully. 6. Following is status of certificate Add Domain to UCC 5 Certificate Click on domain which has UCC 5 certificate. If you have just purchase UUC 5 certificate then open that certificate and paste csr request. (Which also include # ————– BEGIN custom sancert.cnf —–# and # ————– END custom sancert.cnf —–#). Then click on manage. To add domain to UCC 5 Certificate, first we need re key that certificate Copy and paste your CSR in a text box Then Click on submit changes that will submit your New CSR request to GoDaddy Verification window will appeared. Refresh this page, you can see new Domain is successfully added to this certificate. Install certificate to Azure Download certificate from GoDaddy => Select Server type IIS and download zip file. => Important file is .crt extension and Ignore other files contain in zip => Open OpenSSl and click run as administrator(Run as administrator is IMP) Type following command in command line pkcs12 -export -out salesportal.pfx -inkey myserver.key -in 889d0fa6641ee566.crt myserver.key is … Continue reading UCC SAN SSL Certificate–GoDaddy/Azure

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange