Guest User

Untitled

a guest
Oct 8th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $settings = @{
  2. configurationArguments = @{
  3. registrationUrl = "https://ne-agentservice-prod-1.azure-automation.net/accounts/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
  4. }
  5. } | ConvertTo-Json -Compress
  6.  
  7. $protectedSettings = @{
  8. configurationArguments = @{
  9. registrationKey = @{
  10. userName = "NOT_USED"
  11. password = "/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=="
  12. }
  13. }
  14. } | ConvertTo-Json -Compress
  15.  
  16. Get-AzureRmVmss -ResourceGroupName $resourceGroupName -VMScaleSetName $VmSsName |
  17. Add-AzureRmVmssExtension -Name "DSC" -Publisher "Microsoft.Powershell" -Type "DSC" -TypeHandlerVersion "2.24" -Setting $settings -ProtectedSetting $protectedSettings |
  18. Update-AzureRmVmss
Add Comment
Please, Sign In to add comment