Skip to content

Commit

Permalink
Fix 2022 sysprep provisioner cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
drewmullen authored Dec 5, 2024
1 parent c4f234e commit 677870f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/builders/ebs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,34 @@ build {
}
```

## Windows 2022 Sysprep Commands - For Amazon Windows AMIs Only

For Amazon Windows 2022 AMIs it is necessary to run Sysprep commands which can
be easily added to the provisioner section.

**HCL2**

```hcl
provisioner "powershell" {
inline = [
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' reset --block",
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' sysprep --shutdown --block"
]
}
```

**JSON**

```json
{
"type": "powershell",
"inline": [
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' reset --block",
"& 'C:/Program Files/Amazon/EC2Launch/ec2launch' sysprep --shutdown --block"
]
}
```


## Windows 2016 Sysprep Commands - For Amazon Windows AMIs Only

Expand Down

0 comments on commit 677870f

Please sign in to comment.