PowerShell and Azure REST API

List Blob Encryption Status

As you write PowerShell scripts to automate management of your Azure environment, you may find limitations with the Azure SDK cmdlets.    For example, I recently enabled encryption on a customer’s storage account.   Since it only encrypts new blobs written, I wanted to provide a list of which blobs were encrypted and which were not.     The cmdlets do not provide the blob encryption status even though it is available via the Azure Rest API (i.e. the ServerEncrypted  property of the List Blobs operation).

I wrote a PowerShell script to make a request to list the blobs in a container and then display the blobs based upon encryption status (green for encrypted, red for not encrypted).

Here’s a breakdown of the script:

1. Set the Storage Account Name, Key and Container

$StorageAccount = <storage account name> 
$ContainerName = <container name> 
$Key = <access key>

2. Prepare the request

a. Create the string to sign

$date = [System.DateTime]::UtcNow.ToString("R")
$stringToSign = "GET`n`n`n`n`n`n`n`n`n`n`n`nx-ms-date:$date`nx-ms-version:2016-051`n/$StorageAccount/$ContainerName`ncomp:list`nrestype:container"

This string is for a list blobs operation using shared key authorization.  The format of the string is described here.

b. Create a hash object

 $sharedKey = [System.Convert]::FromBase64String($Key)
 $hasher = New-Object System.Security.Cryptography.HMACSHA256
 $hasher.Key = $sharedKey

c. Sign the string

 $signedSignature = [System.Convert]::ToBase64String($hasher.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($stringToSign)))

d. Create the headers

$authHeader = "SharedKey${StorageAccount}:$signedSignature" style="padding-left: 60px;">
$headers = @{"x-ms-date"=$date "x-ms-version"="2016-05-31" "Authorization"=$authHeader}

e. Create the URI

 $URI = "https://$StorageAccount.blob.core.windows.net/" + $ContainerName + "?restype=container&comp=list" 

3. Make the request

 Invoke-RestMethod -method GET -Uri $URI -Headers $headers -OutFile $FileName

4. Parse output to display encryption status

 foreach ($blob in $BlobList.EnumerationResults.Blobs.Blob) {
 if ($blob.Properties.ServerEncrypted -eq $False) {
 write-host $blob.Name -ForegroundColor Red }
 else {
 write-host $blob.Name -ForegroundColor green}
 }

Example output from the script:

output

Ken Channon
Principal
Cloud 9 Infosystems, Inc.

Posted in Uncategorized | Leave a comment

Microsoft Azure has overtaken AWS as public cloud provider of choice

A new survey of IT professionals shows Microsoft Azure has overtaken Amazon Web Services (AWS) as the public cloud provider of choice, although there is considerable overlap.

The survey was commissioned by Sumo Logic, a data analytics provider, and was performed by UBM Research. It surveyed 230 IT professionals from companies with 500 or more employees.

The survey found 80 percent of enterprises currently use or plan to use at least one public cloud provider, if not more. And given the figures, a large number are clearly using more than one. Around two-thirds (66 percent) of respondents said they use Azure while 55 percent said they use AWS. Salesforce App cloud comes in third at 28 percent, IBM fourth at 23 percent and Google is at 20 percent.

Read More

Posted in Uncategorized | Leave a comment

Microsoft Gaining Ground As Alternative To Amazon Web Services

Microsoft‘s (MSFT) Azure cloud computing platform is gaining ground as an alternative to Amazon.com‘s (AMZN) Amazon Web Services, one analyst says.

“Heavy investments from Microsoft now appear to be paying off this year, based on positive feedback from channel partners that were more skeptical of Azure six months ago,” Pacific Crest Securities analyst Brent Bracelin said in a report late Thursday. “One partner called 2017 ‘The Year of Azure’ based on increasing level of interest and activity.”

Bracelin reiterated his overweight rating on Microsoft stock with a price target of 70.

Microsoft was up 0.6%, near 65, in afternoon trading on the stock market today. The stock has formed a flat base over the last seven weeks with a buy point of 66.01.

Microsoft is doing especially well with large enterprise customers because it offers products that span on-premise and cloud environments, Bracelin said.

Are you getting the most out of IBD? Our Getting Started Guide can help!

The migration of enterprise information technology from on-premise hardware to cloud-based services is still in the early innings, he said.

“While AWS has a multiyear lead in IaaS (infrastructure as a service), we see higher potential for Azure to become an upside lever for Microsoft this year and argue it has unparalleled product breadth across both applications and infrastructure within on-premise and public cloud environments,” Bracelin said.

Azure has an estimated $2.5 billion annual run rate. Microsoft’s overall commercial cloud business, which also includes Office 365 and Dynamics Online, is on a $14 billion run rate, he said.

Those figures are small compared with total annual tech spending, including communications, of $1.3 trillion, Bracelin said.

“The shift to cloud could be a decade-long tailwind for Microsoft, AWS and Google,” he said. Alphabet (GOOGL)-owned Google is a distant third in the cloud computing market.

Read More

 

Posted in Uncategorized | Leave a comment

The cloud comes through in crises, drones detect diseases and Cortana Intelligence elevates IoT — Weekend Reading, Feb. 3

 We may be in the chilly depths of February, but there’s no winter hibernation going on at Microsoft. Join us for an overview of some of the big happenings over the past week.

Posted in Uncategorized | Leave a comment

Microsoft breaks through in the Gartner Magic Quadrant for Business Intelligence and Analytics Platforms

Today I’m thrilled to share that for the second year in a row, Microsoft has been positioned furthest to the right for completeness of vision within the Leaders quadrant of Gartner’s 2017 Magic Quadrant for Business Intelligence and Analytics Platforms – the 10th consecutive year Microsoft has been positioned as a leader.

We’re humbled by this recognition for the innovation we’ve delivered with Microsoft Power BI in the past year, including significant growth in both the vision axis and execution axis since the 2016 report. But, more importantly, we’re encouraged by the progress we’ve made as a community in executing against the ambitious goal set when Power BI was made generally available only a short time ago in July 2015: Provide BI to more people than ever before, across all roles and disciplines within organizations.

Power BI is the modern business intelligence solution you can bet on. We will continue to deliver innovation and value with precision and speed. The mantra that drives us is “five minutes to wow” – our relentless focus to enable a user to sign up for Power BI within five seconds and get business value from the service within five minutes. Customers around the world are realizing this vision and capitalizing on the promise of self-service BI by making it a reality at massive scale.

Read More

Posted in Uncategorized | Leave a comment

Azure IP Advantage

Best-in-industry intellectual property protection

Across the globe, the shift to cloud computing is accelerating, impacting every industry and every person. As our customers move to the cloud, business risks are changing. One issue is the increased IP infringement risk associated with delivering software-based products and services in the cloud. To support our customers and to foster a community and business environment that values and protects innovation in the cloud, we created the Microsoft Azure IP Advantage program.

Read More

Posted in Uncategorized | Leave a comment

New in Azure Stream Analytics: Geospatial functions, Custom code and lots more!

Today, we are pleased to announce the roll-out of several compelling capabilities in Azure Stream Analytics. These include native support for geospatial functions, custom code with JavaScript, low latency dashboarding with Power BI and preview of Visual Studio integration and Job diagnostic logs. Additionally, effective today there will be no more ingress data throttling.

Starting today, customers can easily build solutions for scenarios such as connected cars, fleet management, and mobile asset tracking with tremendous ease using Azure Stream Analytics. Developers can now leverage powerful built-in geospatial functions in their stream-processing logic to define geographical areas, and evaluate incoming geospatial data for containment, proximity, overlap, and generate alerts or easily kick-off necessary workflows etc. These geospatial capabilities are in alignment with the GeoJSON specification.

We had more than 100 customers using these Geospatial capabilities in preview, including NASCAR. Established in 1947, NASCAR has grown to become the premier motorsports organization. Currently, NASCAR sanctions more than 1,200 races in more than 30 U.S. states, Canada, Mexico and Europe. NASCAR has been a pioneer in using geospatial capabilities in Azure Stream Analytics.

“We use real-time geospatial analytics with Azure Stream Analytics for analyzing race telemetry during and after the race,” said NASCAR’s Managing Director of Technology Development, Betsy Grider

Read More

Posted in Uncategorized | Leave a comment