Hello, I want to run my powershell script dynamically with elevated privileges. For example, on the host, I want to run vagrant powershell -c "any command here". I know it can be done with provisioning with elevated privilege but I need to run it on after 10 minutes from machine is up. Is it possible ? I searched, googled but I could not found. On winrm-plugin documents supports it with vagrant winrm -c -e "<cmd>" but when I installed that plugin vagrant suggests to uninstall it. Could you help me about it ?
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/4227b10b-3ebf-49f4-b188-88bb2b9567cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Vagrant.configure(2) do |config| config.vm.box = "win10_1607" config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true config.winrm.guest_port = 5985 config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end config.vm.network "private_network", ip: "192.168.50.11"end$runElevatedScript = <<-SCRIPT$start = new-object System.Diagnostics.ProcessStartInfo$start.FileName = "some.exe"$start.Arguments = "--silent"$start.Verb = "runas"[Diagnostics.Process]::Start($start)SCRIPT
Vagrant.configure(2) do |config| config.vm.box = "win10_1607" config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true config.winrm.guest_port = 5985 config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end #Provision here config.vm.provision "myscriptname", type: "shell", inline: $runElevatedScript endVagrant.configure(2) do |config| config.vm.box = "win10_1607" config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true config.winrm.guest_port = 5985 config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end config.vm.network "private_network", ip: "192.168.50.11"end