Azure Office PowerShell

Download the Microsoft Azure, Cloud and Enterprise Symbol / Icon set with PowerShell

The Microsoft Azure, Cloud and Enterprise Symbol / Icon Set package is available as a free download from Microsoft (version 5.6.2019) and includes icons for almost all Azure services and Microsoft cloud related technologies currently available.

These icons, mostly .svg or .png , come in handy when making visual representations in Azure related architectural designs or when making project documentation for a customer. I, myself also use them when making training or speaker content to give it all a more professional look.

To automate the download and installation process of this useful package, I wrote the below PowerShell script which does all of the following:

  • Download the Microsoft_Cloud_AI_Azure_Service_Icon_Set_2019_05_08_2.zip file
  • Extract the ZIP file to the My Shapes folder (depending on the Visio version the My Shapes folder is the default-working folder for Visio and it is created during the installation of Visio. If not, you can always create it manually).
  • Delete the ZIP file after extraction.

Things to keep in mind

  • The script will exit if the My Shapes folder does not exist, the advice I would give is to install Microsoft Visio first before using the Symbol /Icon package.
  • The script will exit if the Symbols package v5.6.2019 already exists in the My Shapes folder.
  • The symbol package itself is supported on the following Operating Systems (OS): Windows 10, Windows 7, Windows 8 and Windows 8.1
  • The symbol set supports a variety of applications, including Microsoft Visio, Word and PowerPoint.
  • You should remove any previous versions of the symbol set so you can avoid duplicate and deprecated symbols.
  • The latest download comes with mostly .svg files, along with some .png and Visio stencils (.vss).

PowerShell script

<#
.SYNOPSIS

A script used to download the Microsoft Azure Cloud and AI Symbol / Icon Set - SVG 

.DESCRIPTION

A script used to download the Microsoft Azure Cloud and AI Symbol / Icon Set - SVG (version 5.6.2019). The downloaded ZIP file (Microsoft_Cloud_AI_Azure_Service_Icon_Set_2019_05_08_2.zip)
will be extraced to the Microsoft_Cloud_AI_Azure_Service_Icon_Set_2019_05_08_2 folder in the My Shapes folder. After extraction the ZIP file will be 
deleted.

.NOTES

Filename:       Download_Microsoft_Azure_and_Cloud_Symbol_Icon_Set_v5.6.2019.ps1
Created:        27/08/2019
Last modified:  09/09/2019
Author:         Wim Matthyssen
PowerShell:     5.1
Version:        2.1
Action:         Change variables were needed to fit your needs
Disclaimer:     This script is provided "As IS" with no warranties.

.EXAMPLE

.\Download_Microsoft_Azure_and_Cloud_Symbol_Icon_Set_v5.6.2019.ps1

.LINK

https://tinyurl.com/y3wmsh7o
#>

## Variables

$myDocuments = [environment]::getfolderpath("mydocuments")
$myShapesFolder = $myDocuments + "\My Shapes"
$myShapesValidPath = Test-Path $myShapesFolder
$zipName = "Microsoft_Cloud_AI_Azure_Service_Icon_Set_2019_05_08_2.zip"
$azureIconUrl = "https://download.microsoft.com/download/1/7/1/171DA19A-5477-4F50-B354-4ABAF28502A6/{0}" -f $zipName 
$azureIconZip = "{0}\{1}" -f $myShapesfolder,$zipName
$azureIconFolder = $myShapesFolder + "\Microsoft_Cloud_AI_Azure_Service_Icon_Set_2019_05_08_2"
$azureIconValidPath = Test-Path $azureIconFolder
$writeEmptyLine = "`n"
$writeSeperator = " - "
$time = Get-Date -UFormat "%A %m/%d/%Y %R"
$foregroundColor1 = "Yellow"
$foregroundColor2 = "Red"

##-------------------------------------------------------------------------------------------------------------------------------------------------------

## Test if the My Shapes folder exists, if not exit the script

If ($myShapesValidPath -eq $True){Write-Host ($writeEmptyLine + "The My Shapes folder exists, script wil go on" + $writeSeperator + $time)`
-foregroundcolor $foregroundColor1 $writeEmptyLine
}Else{
Write-Host ($writeEmptyLine + "# Please install Microsoft Visio, this script will exit in 5 seconds" + $writeSeperator + $time)`
-foregroundcolor $foregroundColor2 $writeEmptyLine
Start-Sleep -s 5
stop-process -Id $PID}

##-------------------------------------------------------------------------------------------------------------------------------------------------------

## Test if the Microsoft_Cloud_AI_Azure_Service_Icon folder already exists in the My Shapes folder exists, if so exit the script

If ($azureIconValidPath -eq $True){Write-Host `
($writeEmptyLine + "The Microsoft_Cloud_AI_Azure_Service_Icon folder exists, script will exit in 5 seconds" + $writeSeperator + $time)`
-foregroundcolor $foregroundColor2 $writeEmptyLine
Start-Sleep -s 5
stop-process -Id $PID
}Else{
Write-Host ($writeEmptyLine + "# Checks completed, script will go on" + $writeSeperator + $time) -foregroundcolor $foregroundColor1 $writeEmptyLine}

##-------------------------------------------------------------------------------------------------------------------------------------------------------

## Download ZIP file and save to My Shapes folder

Import-Module BitsTransfer
Write-Host ($writeEmptyLine + "# Starting download" + $writeSeperator + $time) -foregroundcolor $foregroundColor1 $writeEmptyLine
Start-BitsTransfer -Source $azureIconUrl -Destination $myShapesFolder
Write-Host ($writeEmptyLine + "Download complete" + $writeSeperator + $time) -foregroundcolor $foregroundColor1 $writeEmptyLine

##-------------------------------------------------------------------------------------------------------------------------------------------------------

## Extract ZIP file 

Write-Host ($writeEmptyLine + "# Starting extraction" + $writeSeperator + $time)`
-foregroundcolor $foregroundColor1 $writeEmptyLine
Expand-Archive $azureIconZip -DestinationPath $azureIconFolder
Write-Host ($writeEmptyLine + "Extraction completed" + $writeSeperator + $time)`
-foregroundcolor $foregroundColor1 $writeEmptyLine

##-------------------------------------------------------------------------------------------------------------------------------------------------------

## Clean up ZIP file

Remove-Item $azureIconZip
Write-Host ($writeEmptyLine + "# Cleaned up extracted file" + $writeSeperator + $time)`
-foregroundcolor $foregroundColor1 $writeEmptyLine

##-------------------------------------------------------------------------------------------------------------------------------------------------------

## Exit PowerShell window 2 seconds after completion

Write-Host ($writeEmptyLine + "# Script completed, the PowerShell window will close in 2 seconds" + $writeSeperator + $time)`
-foregroundcolor $foregroundColor2 $writeEmptyLine
Start-Sleep 2 
stop-process -Id $PID 

##-------------------------------------------------------------------------------------------------------------------------------------------------------

To use the script copy and save the above as Download_Microsoft_Azure_and_Cloud_Symbol_Icon_Set_v5.6.2019.ps1 or download it from the TechNet Gallery. Afterwards run the script from within Windows Terminal or Windows PowerShell (or any other tool you prefer).

Use with Visio

To use these icons with Visio, open Visio and created a new Blank Drawing. Then just drag and drop the preferred .svg or .png file into the drawing area (most of the time you should adjust the size to your preference).

Another way to use a subset of these icons is by selecting More Shapes, choose Open Stencil and browse to your My Shapes folder.

Select the Microsoft_Cloud_AI_Azure_Service_Icon_Set_2019_05_08_2 folder, then select the _Flat Symbols folder and open any of the shown folders.

You can also do a simple search for all .vss files in the Microsoft_Cloud_AI_Azure_Service_Icon_Set_2019_05_08_2 folder.

Then double click on the .vss file to open all available icons in the Visio sidebar.

If you want to take a look at a specific .svg icon before importing it, you can always use the below SVG Viewer app which you can download for free from the Microsoft Store.

Use with Word

To use the .svg or .png files with Word, you need to open Word and create a new Blank document. Select Insert, choose Pictures and browse to your My Shapes folder. Open the Microsoft_Cloud_AI_Azure_Service_Icon_Set_2019_05_08_2 folder and look for the preferred .svg or .png file under any of the shown folders. If you prefer, you can also do a simply drag and drop.

If you ever want to use any icon you see on the Internet or in the Azure Portal itself, you can always use the Goolge Chrome extension Amazing Icon Downnloader from Matt LaGrandeur.

If you only want to use Azure icons in Visio stencil format (.vssx), I also recommend you to visit David Summers GitHub repo with his design resources for Azure https://github.com/David-Summers/Azure-Design

This concludes this blog post, have fun using all these Azure and Cloud icons to visual enhance the look of your architectural cloud designs or other documentation.

1 comment on “Download the Microsoft Azure, Cloud and Enterprise Symbol / Icon set with PowerShell

%d bloggers like this: