Ok, thank you. 
It's completely fine for not sharing code. I also haven't shared you.  I 
will try that.

On Thursday, May 30, 2019 at 10:20:44 AM UTC+5:30, Shashank wrote:
>
> I can't share my entire json file , as it is part of my work and it may be 
> a violation of rights. I am using this for restarting. Can you try this?
>     {
>      "type": "powershell",
>      "execute_command": "powershell -executionpolicy bypass \"& { if 
> (Test-Path 
> variable:global:ProgressPreference){\\$ProgressPreference='SilentlyContinue'};.
>  
> {{.Vars}}; &'{{.Path}}'; exit \\$LastExitCode }\"",
>      "pause_before": "15m",
>      "inline": [
>        "echo \"Restart Computer\"; Start-Sleep 5; Restart-Computer -force"
>      ]
>    },
>
>
>
> On Wednesday, May 29, 2019 at 9:26:56 PM UTC+5:30, Deval Ganatra wrote:
>>
>> Hi all,
>> I am trying to create AMI for CIS benchmark hardening. Other things are 
>> working fine except windows-restart provisioner. As restart is necessary in 
>> windows to complete so many things, I am trying to restart instance before 
>> creating AMI. Can anyone help me with that?
>>
>
-- 

-- 
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/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/ffd8a7ec-6798-431c-b0b0-ee10feb2e3b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to