Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Created October 31, 2016 13:06
Show Gist options
  • Save nivleshc/db9f5e438ee4a1ebb0735bdc79cf92c8 to your computer and use it in GitHub Desktop.
Save nivleshc/db9f5e438ee4a1ebb0735bdc79cf92c8 to your computer and use it in GitHub Desktop.
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('ADFS02VMName'),'/InstallADFS')]",
"apiVersion": "2015-05-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('ADFS02VMName'))]",
],
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.19",
"autoUpgradeMinorVersion": true,
"settings": {
"ModulesUrl": "[variables('InstallADFSPackageURL')]",
"ConfigurationFunction": "[variables('InstallADFSConfigurationFunction')]",
"Properties": {
"MachineName": "[parameters('ADFS02VMName')]",
"DomainName": "[parameters('domainName')]",
"AdminCreds": {
"UserName": "[parameters('adminUserName')]",
"Password": "PrivateSettingsRef:AdminPassword"
}
}
},
"protectedSettings": {
"Items": {
"AdminPassword": "[parameters('adminPassword')]"
}
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('ADFS02VMName'),'/AddToADFSFarm')]",
"apiVersion": "2015-05-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('ADFS02VMName'),'/extensions/InstallADFS')]"
],
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.4",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[variables('AddToADFSFarmScriptUrl')]"
],
"commandToExecute": "[concat('powershell.exe -file AddToADFSFarm.ps1',' -DomainName ',parameters('domainName'),' -PrimaryADFSServer ',parameters('ADFS01VMName'),' -AdfsSvcUsername ',parameters('AdfsSvcUsername'))]"
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment