{"id":38997,"date":"2023-06-28T12:41:06","date_gmt":"2023-06-28T17:41:06","guid":{"rendered":"https:\/\/verticalagetechnologies.com\/?p=38997"},"modified":"2023-06-28T15:43:50","modified_gmt":"2023-06-28T20:43:50","slug":"azure-packer-powershell-creating-citrix-golden-images-part-2","status":"publish","type":"post","link":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2","title":{"rendered":"Azure, Packer, PowerShell: Creating Citrix Golden Images &#8211; Part #2"},"content":{"rendered":"\n<p>Part 1 &#8211; <a href=\"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1<\/a><\/p>\n\n\n\n<p>Part 2 &#8211; This post.<\/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\n\n\n<p>Welcome back to the second blog post on creating golden Citrix images with Packer, PowerShell, and Azure.  In <a href=\"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1\" target=\"_blank\" rel=\"noreferrer noopener\">Part 1<\/a> we talked about the staging grounds for getting started and kicking everything off.  Now that we have the main variables and access configured, we can go over the HCL\/JSON file.<\/p>\n\n\n\n<p>In this case we&#8217;ll be working with <a href=\"https:\/\/github.com\/StevenNoel\/Packer-Azure-Powershell\/blob\/main\/Packer-CTXAZPK-VDA-Citrix.pkr.hcl\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/StevenNoel\/Packer-Azure-Powershell\/blob\/main\/Packer-CTXAZPK-VDA-Citrix.pkr.hcl<\/a>.  This was a json file that was converted over to the newer HCL format via the convert command &#8211; <a href=\"https:\/\/developer.hashicorp.com\/packer\/tutorials\/configuration-language\/hcl2-upgrade\" target=\"_blank\" rel=\"noreferrer noopener\">Here<\/a>.  Really no editing was needed.  I&#8217;m not going to go through this line by line, but I&#8217;ll go over some of the pertinent parts.  Majority of the commands\/syntax in here can be found at this location: <a href=\"https:\/\/developer.hashicorp.com\/packer\/plugins\/builders\/azure\/arm\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developer.hashicorp.com\/packer\/plugins\/builders\/azure\/arm<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>variable \"AZURE_CLIENT_ID\" {\n  type      = string\n  default   = \"${env(\"AZURE_CLIENT_ID\")}\"\n  sensitive = true\n}\n\nvariable \"AZURE_CLIENT_SECRET\" {\n  type      = string\n  default   = \"${env(\"AZURE_CLIENT_SECRET\")}\"\n  sensitive = true\n}\n\nvariable \"AZURE_MDT\" {\n  type      = string\n  default   = \"${env(\"AZURE_MDT\")}\"\n  sensitive = true\n}\n\nvariable \"AZURE_LOCALUSER\" {\n  type      = string\n  default   = \"${env(\"AZURE_LOCALUSER\")}\"\n  sensitive = true\n}\n\nvariable \"managed_image_name\" {\n  type    = string\n  default = \"citrix-packer-image\"\n}\n\nvariable \"subscription_id\" {\n  type    = string\n  default = \"&lt;azure subscription id&gt;\"\n}\n\nvariable \"temp_compute_name\" {\n  type    = string\n  default = \"CTXAZPK16LOB001\"\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This first section is taking the environment variables that we set in Part1 and assigning them so they can be used as values in other sections.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>source \"azure-arm\" \"autogenerated_1\" {\n  azure_tags = {\n    application = \"citrix\"\n  }\n  #Azure Info\n  subscription_id                        = \"${var.subscription_id}\"\n  client_id                              = \"${var.AZURE_CLIENT_ID}\"\n  client_secret                          = \"${var.AZURE_CLIENT_SECRET}\"\n  cloud_environment_name                 = \"AzureUSGovernmentCloud\"  \n  \n  #Packer Azure\n  build_resource_group_name              = \"&lt;azure resource grouop&gt;\"\n  custom_resource_build_prefix           = \"ctxpk\"\n  managed_image_name                     = \"${var.managed_image_name}-${formatdate(\"YYYY-MM-DD-hhmm-0700\",timestamp())}\"\n  managed_image_resource_group_name      = \"&lt;azure resource group&gt;\"\n  managed_image_storage_account_type     = \"Premium_LRS\"\n  \n  #Azure Marketplace Sku\n  os_type                                = \"Windows\"\n  image_offer                            = \"WindowsServer\"\n  image_publisher                        = \"MicrosoftWindowsServer\"\n  image_sku                              = \"2016-datacenter-gensecond\"\n  image_version                          = \"latest\"\n\n  #VM details\n  private_virtual_network_with_public_ip = false\n  #temp_compute_name                      = \"${var.temp_compute_name}${legacy_isotime(\"06010203\")}\"\n  temp_compute_name                      = \"${var.temp_compute_name}\"\n  virtual_network_name                   = \"&lt;azure virtual network&gt;\"\n  virtual_network_resource_group_name    = \"&lt;azure resource group&gt;\"\n  virtual_network_subnet_name            = \"&lt;azure subnet name&gt;\"\n  vm_size                                = \"Standard_B4ms\"\n  \n  #WinRM\n  communicator                           = \"winrm\"\n  winrm_insecure                         = \"true\"\n  winrm_timeout                          = \"5m\"\n  winrm_use_ssl                          = \"true\"\n  winrm_username                         = \"packer\"\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This section is pretty straight forward and should look something similar for builds in Azure.  <\/li>\n\n\n\n<li>The &#8220;Azure Info&#8221; section contains the necessary authentication that packer uses to connect to your azure tenant <\/li>\n\n\n\n<li>The &#8220;Packer Azure&#8221; section contains already created already pre-created resource\/virtual\/subnet groups.  If you don&#8217;t have these created Packer can create them. Also, if you want to use different resource groups, you can use &#8220;<a href=\"https:\/\/developer.hashicorp.com\/packer\/plugins\/builders\/azure\/arm#temp_resource_group_name\"><code>temp_resource_group_name<\/code><\/a>&#8220;.  <\/li>\n\n\n\n<li>The &#8220;VM Details&#8221; section provides resource requirements for what type of VM build to make, the VM name, and Network details.<\/li>\n\n\n\n<li>The &#8220;WinRM&#8221; section contains standard canned WinRM information.  In this scenario Packer will communicate to the the Azure VM via SSL Cert that it generates in a Vault.  However, you can specify a password here or another method.<\/li>\n\n\n\n<li>Make sure to check <a href=\"https:\/\/developer.hashicorp.com\/packer\/plugins\/builders\/azure\/arm\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developer.hashicorp.com\/packer\/plugins\/builders\/azure\/arm<\/a> for further definitions and caveats for the parameters.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>build {\n  sources = &#91;\"source.azure-arm.autogenerated_1\"]\n\n  provisioner \"powershell\" {\n    inline = &#91;\"while ((Get-Service RdAgent).Status -ne 'Running') { Start-Sleep -s 5 }\", \"while ((Get-Service WindowsAzureGuestAgent).Status -ne 'Running') { Start-Sleep -s 5 }\", \"&#91;Net.ServicePointManager]::SecurityProtocol = &#91;Net.SecurityProtocolType]::Tls12\", \"Start-sleep -s 5\"]\n  }\n\n  provisioner \"windows-restart\" {\n    restart_check_command = \"powershell -command \\\"&amp;amp; {Write-Output 'Machine restarted1.'}\\\"\"\n  }\n\n  provisioner \"powershell\" {\n    environment_vars = &#91;\"AZURE_LOCALUSER=${var.AZURE_LOCALUSER}\"]\n    scripts          = &#91;\".\/Azure-Packer-PreReqs.ps1\"]\n    valid_exit_codes = &#91;0, 1, 3010]\n  }\n\n  provisioner \"windows-restart\" {\n    restart_check_command = \"powershell -command \\\"&amp;amp; {Write-Output 'Machine restarted2.'}\\\"\"\n  }\n\n  provisioner \"powershell\" {\n    environment_vars = &#91;\"Azure_MDT=${var.AZURE_MDT}\"]\n    scripts          = &#91;\".\/Azure-Packer-Base.ps1\"]\n    elevated_user  = \"Administrator\"\n    elevated_password = \"${var.AZURE_LOCALUSER}\"\n    valid_exit_codes = &#91;0, 1, 3010]\n  }\n\n  provisioner \"windows-restart\" {\n    restart_check_command = \"powershell -command \\\"&amp;amp; {Write-Output 'Machine restarted3.'}\\\"\"\n    restart_timeout = \"20m\"\n  }\n\n  provisioner \"powershell\" {\n    environment_vars = &#91;\"Azure_MDT=${var.AZURE_MDT}\"]\n    scripts          = &#91;\".\/Azure-Packer-Citrix-Installs.ps1\"]\n    elevated_user  = \"Administrator\"\n    elevated_password = \"${var.AZURE_LOCALUSER}\"\n    valid_exit_codes = &#91;0, 1, 3, 3010]\n  }\n\n  provisioner \"windows-restart\" {\n    restart_check_command = \"powershell -command \\\"&amp;amp; {Write-Output 'Machine restarted4.'}\\\"\"\n    restart_timeout = \"20m\"\n  }\n\n  provisioner \"powershell\" {\n    environment_vars = &#91;\"Azure_MDT=${var.AZURE_MDT}\"]\n    scripts          = &#91;\".\/Azure-Packer-Global-App-Installs-1.ps1\"]\n    elevated_user  = \"Administrator\"\n    elevated_password = \"${var.AZURE_LOCALUSER}\"\n    valid_exit_codes = &#91;0, 1, 3, 3010]\n  }\n\n  provisioner \"windows-restart\" {\n    restart_check_command = \"powershell -command \\\"&amp;amp; {Write-Output 'Machine restarted5.'}\\\"\"\n    restart_timeout = \"20m\"\n  }\n\n  provisioner \"powershell\" {\n    environment_vars = &#91;\"Azure_MDT=${var.AZURE_MDT}\"]\n    scripts          = &#91;\".\/Azure-Packer-SecurityAgent-Installs-1.ps1\"]\n    elevated_user  = \"Administrator\"\n    elevated_password = \"${var.AZURE_LOCALUSER}\"\n    valid_exit_codes = &#91;0, 1, 3, 3010]\n  }\n\n  provisioner \"windows-restart\" {\n    restart_check_command = \"powershell -command \\\"&amp;amp; {Write-Output 'Machine restarted6.'}\\\"\"\n    restart_timeout = \"20m\"\n  }\n\n  provisioner \"powershell\" {\n    environment_vars = &#91;\"Azure_MDT=${var.AZURE_MDT}\"]\n    scripts          = &#91;\".\/Azure-Packer-Final-Seal-2.ps1\"]\n    elevated_user  = \"Administrator\"\n    elevated_password = \"${var.AZURE_LOCALUSER}\"\n    valid_exit_codes = &#91;0, 1, 3, 3010]\n  }\n\n  provisioner \"windows-restart\" {\n    restart_check_command = \"powershell -command \\\"&amp;amp; {Write-Output 'Machine restarted7.'}\\\"\"\n    restart_timeout = \"20m\"\n  }\n\n  provisioner \"powershell\" {\n    inline = &#91;\"while ((Get-Service RdAgent).Status -ne 'Running') { Start-Sleep -s 5 }\", \"while ((Get-Service WindowsAzureGuestAgent).Status -ne 'Running') { Start-Sleep -s 5 }\", \"Set-ExecutionPolicy Bypass -Scope Process -Force\", \"&#91;Net.ServicePointManager]::SecurityProtocol = &#91;Net.SecurityProtocolType]::Tls12\", \"Start-sleep -s 5\", \"&amp; $env:SystemRoot\\\\System32\\\\Sysprep\\\\Sysprep.exe \/oobe \/generalize \/quiet \/quit\", \"while($true) { $imageState = Get-ItemProperty HKLM:\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Setup\\\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10  } else { break } }\"]\n  }\n\n  post-processor \"manifest\" {\n    output     = \".\/manifests\/manifest-${legacy_isotime(\"2006-01-02-0304\")}.json\"\n    strip_path = true\n  }\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This is the final part of the HCL file, which is designed by the &#8216;build&#8217; provisioner.  This is similar to an MDT\/SCCM task sequence or a ansible playbook, where we tell Packer all the different things to do or scripts to run.<\/li>\n\n\n\n<li>I breakdown this into the following section\n<ul class=\"wp-block-list\">\n<li>Prereq\n<ul class=\"wp-block-list\">\n<li>restart<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Base\n<ul class=\"wp-block-list\">\n<li>restart<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Citrix Installs\n<ul class=\"wp-block-list\">\n<li>restart<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>App Installs\n<ul class=\"wp-block-list\">\n<li>restart<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Security Agent Installs\n<ul class=\"wp-block-list\">\n<li>restart<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Seal\n<ul class=\"wp-block-list\">\n<li>restart<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>I&#8217;ve uploaded a few of the PS1s to this repo to show you how I&#8217;m handling the app installs.  In a nutshell, each of the PS1s that get called in this HCL file, pass creds, map drives, and then call other PS1s.  For instance the Azure-Packer-Citrix-Installs.ps1 will run elevated, pass the creds into PS1, Map a drive, install the VDA, Citrix Optimizer, Connection Quality Indicator, and Citrix Workspace.  You can see an example of this in the Azure-Packer-Base.ps1 that I&#8217;ve uploaded.<\/li>\n\n\n\n<li>Once this build provisioner finishes, you will be left with an &#8216;image&#8217; in azure where you can create\/deploy VMs from.<\/li>\n<\/ul>\n\n\n\n<p>That&#8217;s all for this post.  In Part 3 I&#8217;ll talk about some of the gotchas I ran across. <\/p>\n\n\n\n<p>Part 1 &#8211; <a href=\"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1<\/a><\/p>\n\n\n\n<p>Part 2 &#8211; This Post<\/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>Part 1 &#8211; https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1 Part 2 &#8211; This post. Part 3 &#8211; https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-3 Welcome back to the second blog post on creating golden Citrix images with Packer, PowerShell, and Azure. In Part 1 we talked about the staging grounds for getting started and kicking everything off. Now that we have the main variables and access&#8230;<\/p>\n","protected":false},"author":1,"featured_media":39028,"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-38997","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.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #2 - 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\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2\" \/>\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 #2 - Vertical Age Technologies, LLC\" \/>\r\n<meta property=\"og:description\" content=\"Part 1 &#8211; https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1 Part 2 &#8211; This post. Part 3 &#8211; https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-3 Welcome back to the second blog post on creating golden Citrix images with Packer, PowerShell, and Azure. In Part 1 we talked about the staging grounds for getting started and kicking everything off. Now that we have the main variables and access...\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2\" \/>\r\n<meta property=\"og:site_name\" content=\"Vertical Age Technologies, LLC\" \/>\r\n<meta property=\"article:published_time\" content=\"2023-06-28T17:41:06+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2023-06-28T20:43:50+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-4.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"505\" \/>\r\n\t<meta property=\"og:image:height\" content=\"241\" \/>\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=\"3 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\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2\"},\"author\":{\"name\":\"Steve Noel\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#\\\/schema\\\/person\\\/8770e41ed31650ba3b32a4e7482e5de6\"},\"headline\":\"Azure, Packer, PowerShell: Creating Citrix Golden Images &#8211; Part #2\",\"datePublished\":\"2023-06-28T17:41:06+00:00\",\"dateModified\":\"2023-06-28T20:43:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2\"},\"wordCount\":554,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-4.png\",\"keywords\":[\"Automation\",\"Azure\",\"Citrix\",\"Packer\"],\"articleSection\":[\"Automation\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2\",\"url\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2\",\"name\":\"Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #2 - Vertical Age Technologies, LLC\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-4.png\",\"datePublished\":\"2023-06-28T17:41:06+00:00\",\"dateModified\":\"2023-06-28T20:43:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2#primaryimage\",\"url\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-4.png\",\"contentUrl\":\"https:\\\/\\\/verticalagetechnologies.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/image-4.png\",\"width\":505,\"height\":241},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/verticalagetechnologies.com\\\/index.php\\\/2023\\\/06\\\/28\\\/azure-packer-powershell-creating-citrix-golden-images-part-2#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 #2\"}]},{\"@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 #2 - 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\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2","og_locale":"en_US","og_type":"article","og_title":"Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #2 - Vertical Age Technologies, LLC","og_description":"Part 1 &#8211; https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/14\/azure-packer-powershell-creating-citrix-golden-images-part-1 Part 2 &#8211; This post. Part 3 &#8211; https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-3 Welcome back to the second blog post on creating golden Citrix images with Packer, PowerShell, and Azure. In Part 1 we talked about the staging grounds for getting started and kicking everything off. Now that we have the main variables and access...","og_url":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2","og_site_name":"Vertical Age Technologies, LLC","article_published_time":"2023-06-28T17:41:06+00:00","article_modified_time":"2023-06-28T20:43:50+00:00","og_image":[{"width":505,"height":241,"url":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-4.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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2#article","isPartOf":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2"},"author":{"name":"Steve Noel","@id":"https:\/\/verticalagetechnologies.com\/#\/schema\/person\/8770e41ed31650ba3b32a4e7482e5de6"},"headline":"Azure, Packer, PowerShell: Creating Citrix Golden Images &#8211; Part #2","datePublished":"2023-06-28T17:41:06+00:00","dateModified":"2023-06-28T20:43:50+00:00","mainEntityOfPage":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2"},"wordCount":554,"commentCount":0,"publisher":{"@id":"https:\/\/verticalagetechnologies.com\/#organization"},"image":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2#primaryimage"},"thumbnailUrl":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-4.png","keywords":["Automation","Azure","Citrix","Packer"],"articleSection":["Automation"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2#respond"]}]},{"@type":"WebPage","@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2","url":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2","name":"Azure, Packer, PowerShell: Creating Citrix Golden Images - Part #2 - Vertical Age Technologies, LLC","isPartOf":{"@id":"https:\/\/verticalagetechnologies.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2#primaryimage"},"image":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2#primaryimage"},"thumbnailUrl":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-4.png","datePublished":"2023-06-28T17:41:06+00:00","dateModified":"2023-06-28T20:43:50+00:00","breadcrumb":{"@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2#primaryimage","url":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-4.png","contentUrl":"https:\/\/verticalagetechnologies.com\/wp-content\/uploads\/2023\/06\/image-4.png","width":505,"height":241},{"@type":"BreadcrumbList","@id":"https:\/\/verticalagetechnologies.com\/index.php\/2023\/06\/28\/azure-packer-powershell-creating-citrix-golden-images-part-2#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 #2"}]},{"@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\/38997","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=38997"}],"version-history":[{"count":12,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/posts\/38997\/revisions"}],"predecessor-version":[{"id":39047,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/posts\/38997\/revisions\/39047"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/media\/39028"}],"wp:attachment":[{"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/media?parent=38997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/categories?post=38997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/verticalagetechnologies.com\/index.php\/wp-json\/wp\/v2\/tags?post=38997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}