{"id":38975,"date":"2023-06-14T07:46:16","date_gmt":"2023-06-14T12:46:16","guid":{"rendered":"https:\/\/verticalagetechnologies.com\/?p=38975"},"modified":"2023-06-28T16:27:52","modified_gmt":"2023-06-28T21:27:52","slug":"azure-packer-powershell-creating-citrix-golden-images-part-1","status":"publish","type":"post","link":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1","title":{"rendered":"Azure, Packer, PowerShell: Creating Citrix Golden Images &#8211; Part #1"},"content":{"rendered":"\n<p>Yes, another boring post around creating Golden Images in Azure via Hashicorp Packer and PowerShell.  There are quite a few blog posts, GitHub repos, and examples of the quick and easy ways to automate this process.  So why create another blog?  The majority of examples I found out there were pretty simple, in the fact that they would spin up an Azure VM, install role\/feature (example: IIS) or download an application from chocolatey (example: notepad++) and seal everything up.  Maybe it&#8217;s just bad luck, but the images I usually see have a crap ton of apps, configurations, and settings defined.<\/p>\n\n\n\n<p>I have the most experience building images with Microsoft Deployment Toolkit (MDT).  Some of these images contain hundreds of applications and customization that are installed and configured from a multitude of sources, such as local network shares, mapped drives, Chocolatey, PowerShell gallery, etc&#8230;<\/p>\n\n\n\n<p>The goal of this multipart series will showcase the necessary framework\/code that is required to store secrets, use environment variables, run PowerShell, and use Packer to build Images.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A device with Windows OS and PowerShell to kick everything off\n<ul class=\"wp-block-list\">\n<li>PowerShell\n<ul class=\"wp-block-list\">\n<li>Azure Module\n<ul class=\"wp-block-list\">\n<li><code>Install-Module -Name Az -AllowClobber -Scope CurrentUser -Force<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Azure Profile\n<ul class=\"wp-block-list\">\n<li>#<a href=\"https:\/\/www.tutorialspoint.com\/how-to-connect-azure-account-using-powershell\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.tutorialspoint.com\/how-to-connect-azure-account-using-powershell<\/a>\n<ul class=\"wp-block-list\">\n<li>Option 1 (Automated)\n<ul class=\"wp-block-list\">\n<li><code>Connect-AzAccount -Subscription \"&lt;Azure Subscription Name\" &nbsp;#Used for Auth, if on Azure Government, use \"-Environment AzureUSGovernment\" parameter<br>Save-AzProfile -Path MyAzureProfile.JSON<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Option 2 (Manual)\n<ul class=\"wp-block-list\">\n<li><code>Connect-AzAccount<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Azure subscription\n\n\n\n\n\n\n\n\n\n\n<ul class=\"wp-block-list\">\n<li>Service Principal created with Contributor role &#8211; <a href=\"https:\/\/gmusumeci.medium.com\/how-to-use-packer-to-build-a-windows-server-image-for-azure-52b1e14be2f2\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/gmusumeci.medium.com\/how-to-use-packer-to-build-a-windows-server-image-for-azure-52b1e14be2f2<\/a>\n<ul class=\"wp-block-list\">\n<li><code>az login<br>az account list --output table #to get subscriptions<br>az account set --subscription &lt;Azure-SubscriptionId&gt;<br>az ad sp create-for-rbac --role=\"Contributor\"<br>--scopes=\"\/subscriptions\/SUBSCRIPTION_ID\"<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Azure Vault to store SPN clientSecret<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Download my Github repo &#8211; <a href=\"https:\/\/github.com\/StevenNoel\/Packer-Azure-Powershell\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/StevenNoel\/Packer-Azure-Powershell<\/a><\/li>\n\n\n\n<li>Download Packer &#8211; <a href=\"https:\/\/developer.hashicorp.com\/packer\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developer.hashicorp.com\/packer<\/a> &#8211; Put executable into the same directory you downloaded from GitHub.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Let&#8217;s begin.<\/h2>\n\n\n\n<p>I&#8217;ll be using this script to kick everything off: <a href=\"https:\/\/github.com\/StevenNoel\/Packer-Azure-Powershell\/blob\/main\/Azure-Packer-Citrix-Stage.ps1\" target=\"_blank\" rel=\"noreferrer noopener\">Azure-Packer-Citrix-Stage.ps1<\/a>.<\/p>\n\n\n\n<p>Let&#8217;s go through the code so I can explain some of the logic, as well as different ways things can be automated based on your preference, comfortability, an security posture.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<pre class=\"wp-block-code\"><code>#Install Azure Module\nInstall-Module -Name Az -AllowClobber -Scope CurrentUser -Force<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This simply just loads the Azure PowerShell modules into PowerShell.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#Packer service account\n#set up path and user variables\n    $AESKeyFilePath = \"\\\\ServerName\\Share\\folder\\aeskey.txt\" # location of the AESKey                \n    $SecurePwdFilePath = \"\\\\ServerName\\Share\\folder\\credpassword.txt\" # location of the file that hosts the encrypted password                \n    $userUPN = \"DomainA\\Username\" # User account login \n\n    #use key and password to create local secure password\n    $AESKey = Get-Content -Path $AESKeyFilePath \n    $pwdTxt = Get-Content -Path $SecurePwdFilePath\n    $securePass = $pwdTxt | ConvertTo-SecureString -Key $AESKey\n\n    #crete a new psCredential object with required username and password\n    $scriptCreds = New-Object System.Management.Automation.PSCredential($userUPN, $securePass)\n    $MDTpacker = $scriptcreds.GetNetworkCredential().password<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This is one way I&#8217;m able to get\/store the credentials of an AD user account and apply them via packer json\/hcl. You may choose this method, you may choose to prompt the user, or store them in a Vault.  All depends on your definition of security and automation.  At the bare minimum: Don&#8217;t leave plain text passwords in your code!<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>$AdminUser = \"SuperSecretPassword\"<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This is me defining an additional administrator user account password.  In Azure, Packer will actually store a cert in a vault and use that to login to the machine via WinRM.  However, there might be times when you need to run things as local admin.  Remember how I just said <strong>DON&#8217;T STORE PLAINTEXT PASSWORDS IN HERE<\/strong>!! A better way might be to use PowerShell to generate a random password, use the AES\/PWD file technique (like above), or use the same method we use for the Service Principal account, just store it in the vault. <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#Auth to Azure\n$profilepath = \"C:\\Users\\&lt;username&gt;\\MyAzureProfile.JSON\"    \n$profile = Import-AzContext -Path $profilePath\n$SubscriptionID = $profile.Context.Subscription.SubscriptionId\nSet-AzContext -SubscriptionId $SubscriptionID<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This is one method you can use to authenticate to azure without being prompted every time.  Of course you&#8217;d want to lock down the MyAzureProfile.json file via NTFS security or some other method.  In order to use an azure profile you first use the Connect-AzAccount module, enter your credentials, then use the Save-AzProfile -Path C:\\Users\\&lt;username&gt;\\MyAzureProfile.json.  Again, it&#8217;s just another way to use credentials without putting them in plaintext in your scripts.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#Get Values for Packer\n$Vault = \"&lt;Azure Vault&gt;\" #Vault where Service Principle Secret is stored\n$ClientID = \"&lt;Service Principle Client ID&gt;\"\nGet-AzKeyVault -VaultName $Vault #Verify Vault\n$ClientSecret = Get-AzKeyVaultSecret -VaultName $Vault -Name $ClientID -AsPlainText<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the prereqs we created an Azure Service Principal and stored the &#8216;secret&#8217; in a vault.  This is the account that Packer uses to interface with Azure (creating\/destroying VMs, building vnets, etc&#8230;). In this block of code I&#8217;m defining what vault I stored the secret in, obtaining the value, and storing it in a value, that we will later store in an environment variable, to hand off to packer.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#Computername for Packer\n$PackerCompName = \"ctxaz\" + $(Get-Date -Format \"yyMMddHHmm\")\n\n#Image Name in Azure\n$managed_image_name = \"Citrix-Azure-Image-\" + $(Get-Date -Format \"yyMMdd-HHmm\")<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>By default VMs created by azure will be prefixed with &#8216;pk******&#8217; and some random characters.  If you would prefer a different prefix to differentiate lines of businesses or other needs then you can set the $PackerCompName.  The $managed_image_name is the name of the final image that gets created. <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#Set Values as Env Variables\n&#91;System.Environment]::SetEnvironmentVariable('AZURE_CLIENT_ID',\"$ClientID\",&#91;System.EnvironmentVariableTarget]::User)\n&#91;System.Environment]::SetEnvironmentVariable('AZURE_CLIENT_SECRET',\"$ClientSecret\",&#91;System.EnvironmentVariableTarget]::User)\n&#91;System.Environment]::SetEnvironmentVariable('AZURE_PackerCompName',\"$PackerCompName\",&#91;System.EnvironmentVariableTarget]::User)\n&#91;System.Environment]::SetEnvironmentVariable('AZURE_ManagedImageName',\"$managed_image_name\",&#91;System.EnvironmentVariableTarget]::User)\n&#91;System.Environment]::SetEnvironmentVariable('AZURE_MDT',\"$MDTPacker\",&#91;System.EnvironmentVariableTarget]::User)\n&#91;System.Environment]::SetEnvironmentVariable('AZURE_LOCALUSER',\"$AdminUser\",&#91;System.EnvironmentVariableTarget]::User)<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>One way to not put passwords in your Packer json\/hcl files is to store them as environment variables.  you can then reference the environment variables in your json\/hcl file without plaintext format.  You&#8217;ll see in the later section we clear these variables after the build completes.  Again, just one way of many to avoid having clear text creds in your code.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#Set the location of where Packer and Azure config is stored\n#Packer\nset-location -path \"\\\\ServerName\\Share\\folder\"\n.\/packer.exe validate .\\Packer-CTXAZPK-VDA-Citrix.pkr.hcl  #Validate Packer HCL\/JSON\n.\/packer.exe build .\\Packer-CTXAZPK-VDA-Citrix.pkr.hcl     #Build from Packer HCL\/JSON<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This code block is where we set the location of where the json\/hcl file is stored.  In this situation the Packer.exe is also located in the same directory.  Then we tell Packer to &#8216;analyze\/validate&#8217; the json\/hcl file to find any errors.  Next we tell Packer to start the actual &#8216;build&#8217;.  This is where everything happens as far as building.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#Remove Envivronment Varible Values\n&#91;Environment]::SetEnvironmentVariable(\"AZURE_CLIENT_ID\", $null ,\"User\")\n&#91;Environment]::SetEnvironmentVariable(\"AZURE_CLIENT_SECRET\", $null ,\"User\")\n&#91;Environment]::SetEnvironmentVariable(\"AZURE_PackerCompName\", $null ,\"User\")\n&#91;Environment]::SetEnvironmentVariable(\"AZURE_ManagedImageName\", $null ,\"User\")\n&#91;Environment]::SetEnvironmentVariable(\"AZURE_MDT\", $null ,\"User\")\n&#91;Environment]::SetEnvironmentVariable(\"AZURE_LOCALUSER\", $null ,\"User\")<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This last section simply removes the environment variables we defined earlier, to clear out any sensitive data.<\/li>\n<\/ul>\n\n\n\n<p>In the next Part, I&#8217;ll go into what the HCL\/JSON file actually looks like, that defines our build process, as well as any gotchas I&#8217;ve encountered along the way.<\/p>\n\n\n\n<p>Hope this post helps you getting started with Packer in Azure and also helps understand the different ways we can automate the storing of credentials and sensitive variables that packer needs to complete the build.  For simple builds where you are only installing a few roles, most of this isn&#8217;t needed, especially if you aren&#8217;t mapping any drives or installing any applications via UNC\/Network paths.<\/p>\n\n\n\n<p>Part 1 &#8211; This Post (staging)<\/p>\n\n\n\n<p>Part 2 &#8211; <a href=\"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2<\/a> (json\/HCL)<\/p>\n\n\n\n<p>Part 3 &#8211; <a href=\"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-3\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-3<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yes, another boring post around creating Golden Images in Azure via Hashicorp Packer and PowerShell. There are quite a few blog posts, GitHub repos, and examples of the quick and easy ways to automate this process. So why create another blog? The majority of examples I found out there were pretty simple, in the fact&#8230;<\/p>\n","protected":false},"author":1,"featured_media":39021,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[28],"tags":[26,27,14,25],"class_list":["post-38975","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","tag-automation","tag-azure","tag-citrix","tag-packer"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #1 - Vertical Age Technologies, LLC<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #1 - Vertical Age Technologies, LLC\" \/>\r\n<meta property=\"og:description\" content=\"Yes, another boring post around creating Golden Images in Azure via Hashicorp Packer and PowerShell. There are quite a few blog posts, GitHub repos, and examples of the quick and easy ways to automate this process. So why create another blog? The majority of examples I found out there were pretty simple, in the fact...\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1\" \/>\r\n<meta property=\"og:site_name\" content=\"Vertical Age Technologies, LLC\" \/>\r\n<meta property=\"article:published_time\" content=\"2023-06-14T12:46:16+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2023-06-28T21:27:52+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-2.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"585\" \/>\r\n\t<meta property=\"og:image:height\" content=\"129\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"Steve Noel\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@steve_noel\" \/>\r\n<meta name=\"twitter:site\" content=\"@steve_noel\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Steve Noel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1\"},\"author\":{\"name\":\"Steve Noel\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#\\\/schema\\\/person\\\/8770e41ed31650ba3b32a4e7482e5de6\"},\"headline\":\"Azure, Packer, PowerShell: Creating Citrix Golden Images &#8211; Part #1\",\"datePublished\":\"2023-06-14T12:46:16+00:00\",\"dateModified\":\"2023-06-28T21:27:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1\"},\"wordCount\":946,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-2.png\",\"keywords\":[\"Automation\",\"Azure\",\"Citrix\",\"Packer\"],\"articleSection\":[\"Automation\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1\",\"url\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1\",\"name\":\"Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #1 - Vertical Age Technologies, LLC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-2.png\",\"datePublished\":\"2023-06-14T12:46:16+00:00\",\"dateModified\":\"2023-06-28T21:27:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1#primaryimage\",\"url\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-2.png\",\"contentUrl\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-2.png\",\"width\":585,\"height\":129},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/14\\\/azure-packer-powershell-creating-citrix-golden-images-part-1#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/verticalagetechnologies.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Azure, Packer, PowerShell: Creating Citrix Golden Images &#8211; Part #1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#website\",\"url\":\"https:\\\/\\\/verticalagetechnologies.com\\\/\",\"name\":\"Vertical Age Technologies, LLC\",\"description\":\"A Blogging and Portfolio website on everything technology.\",\"publisher\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/verticalagetechnologies.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#organization\",\"name\":\"Vertical Age Technologies\",\"url\":\"https:\\\/\\\/verticalagetechnologies.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/VA-Green-Alpha.png\",\"contentUrl\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2015\\\/11\\\/VA-Green-Alpha.png\",\"width\":1683,\"height\":462,\"caption\":\"Vertical Age Technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/steve_noel\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/snoel\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#\\\/schema\\\/person\\\/8770e41ed31650ba3b32a4e7482e5de6\",\"name\":\"Steve Noel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8a54091a24f06514e9fa9b1702fdb589dced4bdf85d9ebced7ef6047b79a3ca3?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8a54091a24f06514e9fa9b1702fdb589dced4bdf85d9ebced7ef6047b79a3ca3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8a54091a24f06514e9fa9b1702fdb589dced4bdf85d9ebced7ef6047b79a3ca3?s=96&d=mm&r=g\",\"caption\":\"Steve Noel\"},\"sameAs\":[\"http:\\\/\\\/VerticalAge.com\"]}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #1 - Vertical Age Technologies, LLC","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1","og_locale":"en_US","og_type":"article","og_title":"Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #1 - Vertical Age Technologies, LLC","og_description":"Yes, another boring post around creating Golden Images in Azure via Hashicorp Packer and PowerShell. There are quite a few blog posts, GitHub repos, and examples of the quick and easy ways to automate this process. So why create another blog? The majority of examples I found out there were pretty simple, in the fact...","og_url":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1","og_site_name":"Vertical Age Technologies, LLC","article_published_time":"2023-06-14T12:46:16+00:00","article_modified_time":"2023-06-28T21:27:52+00:00","og_image":[{"width":585,"height":129,"url":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-2.png","type":"image\/png"}],"author":"Steve Noel","twitter_card":"summary_large_image","twitter_creator":"@steve_noel","twitter_site":"@steve_noel","twitter_misc":{"Written by":"Steve Noel","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1#article","isPartOf":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1"},"author":{"name":"Steve Noel","@id":"https:\/\/verticalagetechnologies.com\/#\/schema\/person\/8770e41ed31650ba3b32a4e7482e5de6"},"headline":"Azure, Packer, PowerShell: Creating Citrix Golden Images &#8211; Part #1","datePublished":"2023-06-14T12:46:16+00:00","dateModified":"2023-06-28T21:27:52+00:00","mainEntityOfPage":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1"},"wordCount":946,"commentCount":1,"publisher":{"@id":"https:\/\/verticalagetechnologies.com\/#organization"},"image":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1#primaryimage"},"thumbnailUrl":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-2.png","keywords":["Automation","Azure","Citrix","Packer"],"articleSection":["Automation"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1#respond"]}]},{"@type":"WebPage","@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1","url":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1","name":"Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #1 - Vertical Age Technologies, LLC","isPartOf":{"@id":"https:\/\/verticalagetechnologies.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1#primaryimage"},"image":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1#primaryimage"},"thumbnailUrl":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-2.png","datePublished":"2023-06-14T12:46:16+00:00","dateModified":"2023-06-28T21:27:52+00:00","breadcrumb":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1#primaryimage","url":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-2.png","contentUrl":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-2.png","width":585,"height":129},{"@type":"BreadcrumbList","@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/verticalagetechnologies.com\/"},{"@type":"ListItem","position":2,"name":"Azure, Packer, PowerShell: Creating Citrix Golden Images &#8211; Part #1"}]},{"@type":"WebSite","@id":"https:\/\/verticalagetechnologies.com\/#website","url":"https:\/\/verticalagetechnologies.com\/","name":"Vertical Age Technologies, LLC","description":"A Blogging and Portfolio website on everything technology.","publisher":{"@id":"https:\/\/verticalagetechnologies.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/verticalagetechnologies.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/verticalagetechnologies.com\/#organization","name":"Vertical Age Technologies","url":"https:\/\/verticalagetechnologies.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/verticalagetechnologies.com\/#\/schema\/logo\/image\/","url":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2015\/11\/VA-Green-Alpha.png","contentUrl":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2015\/11\/VA-Green-Alpha.png","width":1683,"height":462,"caption":"Vertical Age Technologies"},"image":{"@id":"https:\/\/verticalagetechnologies.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/steve_noel","https:\/\/www.linkedin.com\/in\/snoel\/"]},{"@type":"Person","@id":"https:\/\/verticalagetechnologies.com\/#\/schema\/person\/8770e41ed31650ba3b32a4e7482e5de6","name":"Steve Noel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8a54091a24f06514e9fa9b1702fdb589dced4bdf85d9ebced7ef6047b79a3ca3?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8a54091a24f06514e9fa9b1702fdb589dced4bdf85d9ebced7ef6047b79a3ca3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a54091a24f06514e9fa9b1702fdb589dced4bdf85d9ebced7ef6047b79a3ca3?s=96&d=mm&r=g","caption":"Steve Noel"},"sameAs":["http:\/\/VerticalAge.com"]}]}},"_links":{"self":[{"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/posts\/38975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/comments?post=38975"}],"version-history":[{"count":23,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/posts\/38975\/revisions"}],"predecessor-version":[{"id":39056,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/posts\/38975\/revisions\/39056"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/media\/39021"}],"wp:attachment":[{"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/media?parent=38975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/categories?post=38975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/tags?post=38975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}