Facebook
From Walloping Zebra, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 210
  1. Set-AzureRmVMExtension `
  2.     -ResourceGroupName "Zajecia" `
  3.     -ExtensionName "CreateFile" `
  4.     -VMName "WinVm1" `
  5.     -Publisher Microsoft.Compute `
  6.     -ExtensionType CustomScriptExtension `
  7.     -TypeHandlerVersion 1.8 `
  8.     -SettingString '{"commandToExecute":"powershell Add-WindowsFeature Web-Server; powershell Add-Content -Path \"C:\\inetpub\\wwwroot\\Default2.htm\" -Value $($env:computername)"}' `
  9.     -Location westeurope
  10.