-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCreatingVDIGalleryExtension.json
109 lines (109 loc) · 3.34 KB
/
CreatingVDIGalleryExtension.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourcegroup().location]",
"metadata": {
"description": "Specifies the Location for the deployment."
}
},
"artifactsLocationUri": {
"type": "string",
"metadata": {
"description": "Specifies the shared access signature token which provides access to the base artifacts location."
}
},
"artifactsLocationSasToken": {
"type": "string",
"metadata": {
"description": "Token allowing for access of asset location"
}
},
"machineName": {
"type": "string",
"metadata": {
"description": "Specifies the name of this machine in Azure and on the network."
}
},
"domainName": {
"type": "string",
"metadata": {
"description": "Specifies the name of the Active Directory domain."
}
},
"domainControllerIp": {
"type": "string",
"metadata": {
"description": "Specifies the IP of a domain controller on the virtual network."
}
},
"adminUsername": {
"type": "string",
"metadata": {
"description": "The name of the administrator of the new VM and the domain. Exclusion list: 'admin','administrator"
}
},
"adminPassword": {
"type": "securestring",
"metadata": {
"description": "The password for the administrator account of the new VM and the domain"
}
},
"deliveryControllerFQDN": {
"type": "string",
"metadata": {
"description": "Specifies the name of the XenApp delivery controller on the virtual network."
}
},
"InstallerPath": {
"type": "string",
"metadata": {
"description": "Specifies the name of the XenApp delivery controller on the virtual network."
}
},
"CreateMasterImage": {
"type": "string",
"metadata": {
"description": "Specify wether VDI should be provisioned or Not."
},
"defaultValue": "false",
"allowedValues": [
"true",
"false"
]
}
},
"variables": {
"args": "[concat('-DeliveryController cloudconnector.xenapp.local -DomainName ' ,parameters('domainName') ,' -UserName ', parameters('adminUsername'), ' -Password ', parameters('adminPassword'), ' -setupLocation ', parameters('InstallerPath'), ' -CreateMasterImage ', parameters('CreateMasterImage'))]"
},
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('machineName'),'/configureController')]",
"apiVersion": "2015-06-15",
"tags": {
"displayName": "VdiConfiguration"
},
"location": "[parameters('location')]",
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.8",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(parameters('artifactsLocationUri'), '/Resources/VDICustomScript/VDICustomScript.ps1')]"
],
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -File .\\VDICustomScript.ps1 ', variables('args'))]"
},
"protectedSettings": {
"Items": {
"adminPassword": "[parameters('adminPassword')]"
}
}
}
}
]
}