Guest User

Untitled

a guest
Jul 25th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. os_profile {
  2. computer_name = "server-name"
  3. admin_username = "${var.vm_username}"
  4. admin_password = "${var.vm_password}"
  5. custom_data = <<EOF
  6. <powershell>
  7. winrm quickconfig -q
  8. winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
  9. winrm set winrm/config '@{MaxTimeoutms="1800000"}'
  10. winrm set winrm/config/service '@{AllowUnencrypted="true"}'
  11. winrm set winrm/config/service/auth '@{Basic="true"}'
  12.  
  13. netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
  14. netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
  15.  
  16. net stop winrm
  17. sc.exe config winrm start=auto
  18. net start winrm
  19. </powershell>
  20. EOF
  21. }
  22.  
  23.  
  24.  
  25. os_profile_windows_config {
  26. provision_vm_agent = true
  27. winrm {
  28. protocol="http"
  29. }
  30. }
Add Comment
Please, Sign In to add comment