From 135aec5b633247979bff1a8e4e2517bfe9a5c502 Mon Sep 17 00:00:00 2001 From: Jamie D Date: Thu, 2 Jun 2016 10:53:25 +0100 Subject: [PATCH 1/5] Added parameter switch for Office version --- .../10-ExampleDeploySilentWithVersion.ps1 | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Office-ProPlus-Deployment/Deploy-OfficeClickToRun/10-ExampleDeploySilentWithVersion.ps1 diff --git a/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/10-ExampleDeploySilentWithVersion.ps1 b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/10-ExampleDeploySilentWithVersion.ps1 new file mode 100644 index 000000000..5896265ea --- /dev/null +++ b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/10-ExampleDeploySilentWithVersion.ps1 @@ -0,0 +1,33 @@ +# Office ProPlus Click-To-Run Deployment Script example +# +# This script demonstrates how utilize the scripts in OfficeDev/Office-IT-Pro-Deployment-Scripts repository together to create +# Office ProPlus Click-To-Run deployment script that will be adaptive to the configuration of the computer it is run from + +param([Parameter(Mandatory=$false)][string]$OfficeVersion = "Office2016") + +Process { + $scriptPath = "." + + if ($PSScriptRoot) { + $scriptPath = $PSScriptRoot + } else { + $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition + } + +#Importing all required functions +. $scriptPath\Generate-ODTConfigurationXML.ps1 +. $scriptPath\Edit-OfficeConfigurationFile.ps1 +. $scriptPath\Install-OfficeClickToRun.ps1 + +$targetFilePath = "$env:temp\configuration.xml" + +#This example will create an Office Deployment Tool (ODT) configuration file and include all of the Languages currently in use on the computer +#from which the script is run. It will then remove the Version attribute from the XML to ensure the installation gets the latest version +#when updating an existing install and then it will initiate a install + +#This script additionally sets the "AcceptEULA" to "True" and the display "Level" to "None" so the install is silent. + +Generate-ODTConfigurationXml -Languages AllInUseLanguages -TargetFilePath $targetFilePath | Set-ODTAdd -Version 15.1.2.3 | Set-ODTDisplay -AcceptEULA $true -Level None | Install-OfficeClickToRun -OfficeVersion $OfficeVersion + +# Configuration.xml file for Click-to-Run for Office 365 products reference. https://technet.microsoft.com/en-us/library/JJ219426.aspx +} \ No newline at end of file From b1e508b400b8d1b873486fd5435ad282f2d4e6f1 Mon Sep 17 00:00:00 2001 From: Jamie D Date: Thu, 2 Jun 2016 14:57:54 +0100 Subject: [PATCH 2/5] Update 10-ExampleDeploySilentWithVersion.ps1 --- .../10-ExampleDeploySilentWithVersion.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/10-ExampleDeploySilentWithVersion.ps1 b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/10-ExampleDeploySilentWithVersion.ps1 index 5896265ea..57f965bc5 100644 --- a/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/10-ExampleDeploySilentWithVersion.ps1 +++ b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/10-ExampleDeploySilentWithVersion.ps1 @@ -27,7 +27,7 @@ $targetFilePath = "$env:temp\configuration.xml" #This script additionally sets the "AcceptEULA" to "True" and the display "Level" to "None" so the install is silent. -Generate-ODTConfigurationXml -Languages AllInUseLanguages -TargetFilePath $targetFilePath | Set-ODTAdd -Version 15.1.2.3 | Set-ODTDisplay -AcceptEULA $true -Level None | Install-OfficeClickToRun -OfficeVersion $OfficeVersion +Generate-ODTConfigurationXml -Languages AllInUseLanguages -TargetFilePath $targetFilePath | Set-ODTAdd -Version $NULL | Set-ODTDisplay -AcceptEULA $true -Level None | Install-OfficeClickToRun -OfficeVersion $OfficeVersion # Configuration.xml file for Click-to-Run for Office 365 products reference. https://technet.microsoft.com/en-us/library/JJ219426.aspx -} \ No newline at end of file +} From c7078604eecdd330d553e35305a0d29367939c45 Mon Sep 17 00:00:00 2001 From: Jamie D Date: Thu, 2 Jun 2016 19:43:39 +0100 Subject: [PATCH 3/5] Add files via upload --- .../CreateO365AzureVM.ps1 | 25 ++ .../Deploy-OfficeClickToRun/azuredeploy.json | 272 ++++++++++++++++++ 2 files changed, 297 insertions(+) create mode 100644 Office-ProPlus-Deployment/Deploy-OfficeClickToRun/CreateO365AzureVM.ps1 create mode 100644 Office-ProPlus-Deployment/Deploy-OfficeClickToRun/azuredeploy.json diff --git a/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/CreateO365AzureVM.ps1 b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/CreateO365AzureVM.ps1 new file mode 100644 index 000000000..b09a59566 --- /dev/null +++ b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/CreateO365AzureVM.ps1 @@ -0,0 +1,25 @@ +cls +$RGName = "RG-o365-W10"; +$VMName = "jdwino365"; +$VMUsername = "jmd"; + +$ARMTemplate = "C:\Dump\O365 Testing\azuredeploy.json" +$DeployLocation = "West Europe" +$OfficeVersion = "Office2013"; #or Office2016 + +# 1. Login +#Login-AzureRmAccount + +#2. Create a resource group +New-AzureRmResourceGroup -Name $RGName -Location $DeployLocation -Force + +#3. Create resources +$sw = [system.diagnostics.stopwatch]::startNew() +New-AzureRmResourceGroupDeployment -ResourceGroupName $RGName -TemplateFile $ARMTemplate -vmName $VMName ` + -vmAdminUserName $VMUsername -dnsLabelPrefix $VMName -vmVisualStudioVersion VS-2015-Comm-AzureSDK-2.9-W10T-Win10-N ` + -officeVersion "Office2013" -Mode Complete -Force | Out-Null +$sw | Format-List -Property * + +#4. Get the RDP file +Get-AzureRmRemoteDesktopFile -ResourceGroupName $RGName -Name $VMName -Launch -Verbose -Debug + diff --git a/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/azuredeploy.json b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/azuredeploy.json new file mode 100644 index 000000000..bb44f7e38 --- /dev/null +++ b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/azuredeploy.json @@ -0,0 +1,272 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.1", + "parameters": { + "storageType": { + "type": "string", + "defaultValue": "Premium_LRS", + "allowedValues": [ + "Premium_LRS", + "Standard_LRS" + ], + "metadata": { + "description": "Which type of storage you want to use" + } + }, + "vmName": { + "type": "string", + "metadata": { + "description": "Local name for the VM can be whatever you want" + } + }, + "vmAdminUserName": { + "type": "string", + "metadata": { + "description": "VM admin user name" + } + }, + "vmAdminPassword": { + "type": "securestring", + "metadata": { + "description": "VM admin password. The supplied password must be between 8-123 characters long and must satisfy at least 3 of password complexity requirements from the following: 1) Contains an uppercase character 2) Contains a lowercase character 3) Contains a numeric digit 4) Contains a special character." + } + }, + "vmSize": { + "type": "string", + "metadata": { + "description": "Desired Size of the VM. Any valid option accepted but if you choose premium storage type you must choose a DS class VM size." + }, + "defaultValue": "Standard_DS2" + }, + "vmVisualStudioVersion": { + "type": "string", + "defaultValue": "VS-2015-Ent-VSU2-AzureSDK-29-W10T-N-x64", + "allowedValues": [ + "VS-2015-Comm-AzureSDK-2.9-W10T-Win10-N", + "VS-2015-Comm-AzureSDK-2.9-WS2012R2", + "VS-2015-Comm-VSU1-AzureSDK-2.8-W10T-N-x64", + "VS-2015-Comm-VSU2-AzureSDK-29-W10T-N-x64", + "VS-2015-Comm-VSU2-AzureSDK-29-WS2012R2", + "VS-2015-Community-AzureSDK-2.7-Cordova-Win8.1-N-x64", + "VS-2015-Community-AzureSDK-2.7-W10T-Win10-N", + "VS-2015-Community-AzureSDK-2.7-WS2012R2", + "VS-2015-Ent-AzureSDK-2.8-Cordova-Win8.1-N-x64", + "VS-2015-Ent-AzureSDK-29-W10T-Win10-N", + "VS-2015-Ent-VSU2-AzureSDK-29-W10T-N-x64", + "VS-2015-Ent-VSU2-AzureSDK-29-WS2012R2", + "VS-2015-Enterprise-AzureSDK-2.7-Cordova-Win8.1-N-x64", + "VS-2015-Enterprise-AzureSDK-2.7-W10T-Win10-N", + "VS-2015-Enterprise-AzureSDK-2.7-WS2012R2", + "VS-2015-Pro-AzureSDK-2.8-Cordova-Win8.1-N-x64", + "VS-2015-Professional-AzureSDK-2.7-Cordova-Win8.1-N-x64", + "VS-2015-Professional-AzureSDK-2.7-W10T-Win10-N" + ], + "metadata": { + "description": "Which version of Visual Studio you would like to deploy" + } + }, + "dnsLabelPrefix": { + "type": "string", + "metadata": { + "description": "DNS Label for the Public IP. Must be lowercase. It should match with the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$ or it will raise an error." + } + }, + "officeVersion": { + "type": "string", + "defaultValue": "Office2016", + "allowedValues": [ + "Office2016", + "Office2013" + ], + "metadata": { + "description": "Which version of Office would you would like to deploy" + } + }, + "setupOfficeScriptFileName": { + "type": "string", + "defaultValue": "10-ExampleDeploySilentWithVersion.ps1", + "metadata": { + "description": "PowerShell script name to execute" + } + } + }, + "variables": { + "storageName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", + "vnet01Prefix": "10.0.0.0/16", + "vnet01Subnet1Name": "Subnet-1", + "vnet01Subnet1Prefix": "10.0.0.0/24", + "vmImagePublisher": "MicrosoftVisualStudio", + "vmImageOffer": "VisualStudio", + "vmOSDiskName": "VMOSDisk", + "vmVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'Vnet01')]", + "vmSubnetRef": "[concat(variables('VMVnetID'), '/subnets/', variables('Vnet01Subnet1Name'))]", + "vmStorageAccountContainerName": "vhds", + "vmNicName": "[concat(parameters('VMName'), 'NetworkInterface')]", + "vmIP01Name": "VMIP01" + }, + "resources": [ + { + "name": "[variables('storageName')]", + "type": "Microsoft.Storage/storageAccounts", + "location": "[resourceGroup().location]", + "apiVersion": "2015-06-15", + "dependsOn": [ ], + "tags": { + "displayName": "Storage01" + }, + "properties": { + "accountType": "[parameters('storageType')]" + } + }, + { + "name": "VNet01", + "type": "Microsoft.Network/virtualNetworks", + "location": "[resourceGroup().location]", + "apiVersion": "2015-06-15", + "dependsOn": [ ], + "tags": { + "displayName": "VNet01" + }, + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('vnet01Prefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('vnet01Subnet1Name')]", + "properties": { + "addressPrefix": "[variables('vnet01Subnet1Prefix')]" + } + } + ] + } + }, + { + "name": "[variables('vmNicName')]", + "type": "Microsoft.Network/networkInterfaces", + "location": "[resourceGroup().location]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", + "[concat('Microsoft.Network/publicIPAddresses/', variables('vmIP01Name'))]" + ], + "tags": { + "displayName": "VMNic01" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "subnet": { + "id": "[variables('vmSubnetRef')]" + }, + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('vmIP01Name'))]" + } + } + } + ] + } + }, + { + "name": "[parameters('vmName')]", + "type": "Microsoft.Compute/virtualMachines", + "location": "[resourceGroup().location]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', variables('storageName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('vmNicName'))]" + ], + "tags": { + "displayName": "VM01" + }, + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "osProfile": { + "computername": "[parameters('vmName')]", + "adminUsername": "[parameters('vmAdminUsername')]", + "adminPassword": "[parameters('vmAdminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[variables('vmImagePublisher')]", + "offer": "[variables('vmImageOffer')]", + "sku": "[parameters('vmVisualStudioVersion')]", + "version": "latest" + }, + "osDisk": { + "name": "VMOSDisk", + "vhd": { + "uri": "[concat('http://', variables('storageName'), '.blob.core.windows.net/', variables('vmStorageAccountContainerName'), '/', variables('vmOSDiskName'), '.vhd')]" + }, + "caching": "ReadWrite", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNicName'))]" + } + ] + } + }, + "resources": [ + { + "name": "SetupOffice", + "type": "extensions", + "location": "[resourceGroup().location]", + "apiVersion": "2015-06-15", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" + ], + "tags": { + "displayName": "SetupOffice" + }, + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.4", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[concat('https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/', parameters('setupOfficeScriptFileName'))]", + "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/DefaultConfiguration.xml", + "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2013Setup.exe", + "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2016Setup.exe", + "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Edit-OfficeConfigurationFile.ps1", + "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Generate-ODTConfigurationXML.ps1", + "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Install-OfficeClickToRun.ps1" + ], + "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ', parameters('setupOfficeScriptFileName'),' -OfficeVersion ', parameters('officeVersion'))]" + } + } + } + ] + }, + { + "name": "[variables('vmIP01Name')]", + "type": "Microsoft.Network/publicIPAddresses", + "location": "[resourceGroup().location]", + "apiVersion": "2015-06-15", + "dependsOn": [ ], + "tags": { + "displayName": "VMIP01" + }, + "properties": { + "publicIPAllocationMethod": "Dynamic", + "dnsSettings": { + "domainNameLabel": "[parameters('dnsLabelPrefix')]" + } + } + } + ], + "outputs": { } + } + From 79e9d779608e9a20410b032cec333ae242f56699 Mon Sep 17 00:00:00 2001 From: Jamie D Date: Tue, 9 Aug 2016 09:08:35 +0100 Subject: [PATCH 4/5] Not required --- .../CreateO365AzureVM.ps1 | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 Office-ProPlus-Deployment/Deploy-OfficeClickToRun/CreateO365AzureVM.ps1 diff --git a/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/CreateO365AzureVM.ps1 b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/CreateO365AzureVM.ps1 deleted file mode 100644 index b09a59566..000000000 --- a/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/CreateO365AzureVM.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -cls -$RGName = "RG-o365-W10"; -$VMName = "jdwino365"; -$VMUsername = "jmd"; - -$ARMTemplate = "C:\Dump\O365 Testing\azuredeploy.json" -$DeployLocation = "West Europe" -$OfficeVersion = "Office2013"; #or Office2016 - -# 1. Login -#Login-AzureRmAccount - -#2. Create a resource group -New-AzureRmResourceGroup -Name $RGName -Location $DeployLocation -Force - -#3. Create resources -$sw = [system.diagnostics.stopwatch]::startNew() -New-AzureRmResourceGroupDeployment -ResourceGroupName $RGName -TemplateFile $ARMTemplate -vmName $VMName ` - -vmAdminUserName $VMUsername -dnsLabelPrefix $VMName -vmVisualStudioVersion VS-2015-Comm-AzureSDK-2.9-W10T-Win10-N ` - -officeVersion "Office2013" -Mode Complete -Force | Out-Null -$sw | Format-List -Property * - -#4. Get the RDP file -Get-AzureRmRemoteDesktopFile -ResourceGroupName $RGName -Name $VMName -Launch -Verbose -Debug - From 8a971115492198584c41fe99c3f4b6f80d7c0829 Mon Sep 17 00:00:00 2001 From: Jamie D Date: Tue, 9 Aug 2016 09:09:25 +0100 Subject: [PATCH 5/5] Updated inline with best practices --- .../Deploy-OfficeClickToRun/azuredeploy.json | 115 ++++++------------ 1 file changed, 36 insertions(+), 79 deletions(-) diff --git a/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/azuredeploy.json b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/azuredeploy.json index bb44f7e38..968a25a8c 100644 --- a/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/azuredeploy.json +++ b/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/azuredeploy.json @@ -2,23 +2,6 @@ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.1", "parameters": { - "storageType": { - "type": "string", - "defaultValue": "Premium_LRS", - "allowedValues": [ - "Premium_LRS", - "Standard_LRS" - ], - "metadata": { - "description": "Which type of storage you want to use" - } - }, - "vmName": { - "type": "string", - "metadata": { - "description": "Local name for the VM can be whatever you want" - } - }, "vmAdminUserName": { "type": "string", "metadata": { @@ -31,38 +14,16 @@ "description": "VM admin password. The supplied password must be between 8-123 characters long and must satisfy at least 3 of password complexity requirements from the following: 1) Contains an uppercase character 2) Contains a lowercase character 3) Contains a numeric digit 4) Contains a special character." } }, - "vmSize": { - "type": "string", - "metadata": { - "description": "Desired Size of the VM. Any valid option accepted but if you choose premium storage type you must choose a DS class VM size." - }, - "defaultValue": "Standard_DS2" - }, - "vmVisualStudioVersion": { + "vmOSVersion": { "type": "string", - "defaultValue": "VS-2015-Ent-VSU2-AzureSDK-29-W10T-N-x64", + "defaultValue": "10-Enterprise-N", "allowedValues": [ - "VS-2015-Comm-AzureSDK-2.9-W10T-Win10-N", - "VS-2015-Comm-AzureSDK-2.9-WS2012R2", - "VS-2015-Comm-VSU1-AzureSDK-2.8-W10T-N-x64", - "VS-2015-Comm-VSU2-AzureSDK-29-W10T-N-x64", - "VS-2015-Comm-VSU2-AzureSDK-29-WS2012R2", - "VS-2015-Community-AzureSDK-2.7-Cordova-Win8.1-N-x64", - "VS-2015-Community-AzureSDK-2.7-W10T-Win10-N", - "VS-2015-Community-AzureSDK-2.7-WS2012R2", - "VS-2015-Ent-AzureSDK-2.8-Cordova-Win8.1-N-x64", - "VS-2015-Ent-AzureSDK-29-W10T-Win10-N", - "VS-2015-Ent-VSU2-AzureSDK-29-W10T-N-x64", - "VS-2015-Ent-VSU2-AzureSDK-29-WS2012R2", - "VS-2015-Enterprise-AzureSDK-2.7-Cordova-Win8.1-N-x64", - "VS-2015-Enterprise-AzureSDK-2.7-W10T-Win10-N", - "VS-2015-Enterprise-AzureSDK-2.7-WS2012R2", - "VS-2015-Pro-AzureSDK-2.8-Cordova-Win8.1-N-x64", - "VS-2015-Professional-AzureSDK-2.7-Cordova-Win8.1-N-x64", - "VS-2015-Professional-AzureSDK-2.7-W10T-Win10-N" + "10-Enterprise-N", + "7.0-Enterprise-N", + "8.1-Enterprise-N" ], "metadata": { - "description": "Which version of Visual Studio you would like to deploy" + "description": "Which version of Windows would like to deploy" } }, "dnsLabelPrefix": { @@ -81,14 +42,7 @@ "metadata": { "description": "Which version of Office would you would like to deploy" } - }, - "setupOfficeScriptFileName": { - "type": "string", - "defaultValue": "10-ExampleDeploySilentWithVersion.ps1", - "metadata": { - "description": "PowerShell script name to execute" - } - } + } }, "variables": { "storageName": "[concat(uniquestring(resourceGroup().id), 'standardsa')]", @@ -96,34 +50,38 @@ "vnet01Subnet1Name": "Subnet-1", "vnet01Subnet1Prefix": "10.0.0.0/24", "vmImagePublisher": "MicrosoftVisualStudio", - "vmImageOffer": "VisualStudio", + "vmImageOffer": "Windows", "vmOSDiskName": "VMOSDisk", "vmVnetID": "[resourceId('Microsoft.Network/virtualNetworks', 'Vnet01')]", "vmSubnetRef": "[concat(variables('VMVnetID'), '/subnets/', variables('Vnet01Subnet1Name'))]", "vmStorageAccountContainerName": "vhds", - "vmNicName": "[concat(parameters('VMName'), 'NetworkInterface')]", - "vmIP01Name": "VMIP01" + "vmNicName": "[concat(variables('VMName'), 'NetworkInterface')]", + "vmIP01Name": "VMIP01", + "vmName": "O365VM", + "storageType": "Premium_LRS", + "vmSize": "Standard_DS2", + "setupOfficeScriptUri": "https://raw.githubusercontent.com/daltskin/azure-quickstart-templates/patch-7/visual-studio-dev-vm-O365/scripts/", + "setupOfficeScriptFileName": "DeployO365SilentWithVersion.ps1", + "location" : "[resourceGroup().location]" }, "resources": [ { "name": "[variables('storageName')]", "type": "Microsoft.Storage/storageAccounts", - "location": "[resourceGroup().location]", + "location": "[variables('location')]", "apiVersion": "2015-06-15", - "dependsOn": [ ], "tags": { "displayName": "Storage01" }, "properties": { - "accountType": "[parameters('storageType')]" + "accountType": "[variables('storageType')]" } }, { "name": "VNet01", "type": "Microsoft.Network/virtualNetworks", - "location": "[resourceGroup().location]", + "location": "[variables('location')]", "apiVersion": "2015-06-15", - "dependsOn": [ ], "tags": { "displayName": "VNet01" }, @@ -146,7 +104,7 @@ { "name": "[variables('vmNicName')]", "type": "Microsoft.Network/networkInterfaces", - "location": "[resourceGroup().location]", + "location": "[variables('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Network/virtualNetworks/', 'Vnet01')]", @@ -173,9 +131,9 @@ } }, { - "name": "[parameters('vmName')]", + "name": "[variables('vmName')]", "type": "Microsoft.Compute/virtualMachines", - "location": "[resourceGroup().location]", + "location": "[variables('location')]", "apiVersion": "2015-06-15", "dependsOn": [ "[concat('Microsoft.Storage/storageAccounts/', variables('storageName'))]", @@ -186,10 +144,10 @@ }, "properties": { "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" + "vmSize": "[variables('vmSize')]" }, "osProfile": { - "computername": "[parameters('vmName')]", + "computerName": "[variables('vmName')]", "adminUsername": "[parameters('vmAdminUsername')]", "adminPassword": "[parameters('vmAdminPassword')]" }, @@ -197,7 +155,7 @@ "imageReference": { "publisher": "[variables('vmImagePublisher')]", "offer": "[variables('vmImageOffer')]", - "sku": "[parameters('vmVisualStudioVersion')]", + "sku": "[parameters('vmOSVersion')]", "version": "latest" }, "osDisk": { @@ -221,10 +179,10 @@ { "name": "SetupOffice", "type": "extensions", - "location": "[resourceGroup().location]", + "location": "[variables('location')]", "apiVersion": "2015-06-15", "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]" + "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" ], "tags": { "displayName": "SetupOffice" @@ -236,15 +194,15 @@ "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ - "[concat('https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/', parameters('setupOfficeScriptFileName'))]", - "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/DefaultConfiguration.xml", - "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2013Setup.exe", - "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2016Setup.exe", - "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Edit-OfficeConfigurationFile.ps1", - "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Generate-ODTConfigurationXML.ps1", - "https://raw.githubusercontent.com/daltskin/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Install-OfficeClickToRun.ps1" + "[concat(variables('setupOfficeScriptUri'), variables('setupOfficeScriptFileName'))]", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/DefaultConfiguration.xml", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2013Setup.exe", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Office2016Setup.exe", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Edit-OfficeConfigurationFile.ps1", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Generate-ODTConfigurationXML.ps1", + "https://raw.githubusercontent.com/officedev/Office-IT-Pro-Deployment-Scripts/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/Install-OfficeClickToRun.ps1" ], - "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ', parameters('setupOfficeScriptFileName'),' -OfficeVersion ', parameters('officeVersion'))]" + "commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ', variables('setupOfficeScriptFileName'),' -OfficeVersion ', parameters('officeVersion'))]" } } } @@ -253,9 +211,8 @@ { "name": "[variables('vmIP01Name')]", "type": "Microsoft.Network/publicIPAddresses", - "location": "[resourceGroup().location]", + "location": "[variables('location')]", "apiVersion": "2015-06-15", - "dependsOn": [ ], "tags": { "displayName": "VMIP01" },