{"id":1481,"date":"2014-10-28T10:52:00","date_gmt":"2014-10-28T10:52:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2014\/10\/28\/manage-the-powershell-dsc-extension-in-the-azure-preview-portal\/"},"modified":"2024-02-22T08:24:40","modified_gmt":"2024-02-22T16:24:40","slug":"manage-the-powershell-dsc-extension-in-the-azure-preview-portal","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/manage-the-powershell-dsc-extension-in-the-azure-preview-portal\/","title":{"rendered":"Manage the PowerShell DSC Extension in the Azure Preview Portal"},"content":{"rendered":"<p><strong>UPDATE 11\/21\/2014: For information on OS support, and other features, please refer to our <strong><a href=\"http:\/\/blogs.msdn.com\/b\/powershell\/archive\/2014\/11\/20\/release-history-for-the-azure-dsc-extension.aspx\">release history<\/a><\/strong>. <\/strong><\/p>\n<p>If you haven\u2019t yet started using the <a href=\"https:\/\/portal.azure.com\/\">Azure Preview Portal<\/a> and are a fan of PowerShell DSC and the Azure PowerShell DSC Extension (announced in August <a href=\"http:\/\/blogs.msdn.com\/b\/powershell\/archive\/2014\/08\/07\/introducing-the-azure-powershell-dsc-desired-state-configuration-extension.aspx\">here<\/a>), now just might be the time to start. We are pleased to announce that you can now manage the extension using the Preview Portal! Before today, you could use the Preview Portal to get information about the PowerShell DSC Extension (version, status, and status text \u2013 example below), but you couldn\u2019t add the extension to an existing virtual machine or update the configuration if the extension was already present.<\/p>\n<p>&nbsp;<\/p>\n<p><em><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/1106.Extension_thumb_39499559.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/1106.Extension_thumb_39499559.png\" alt=\"Extension\" width=\"717\" height=\"286\" border=\"0\" \/><\/a>\u00a0<\/em><\/p>\n<p align=\"center\">\n<h4>Preparing for the UI<\/h4>\n<p>Just like with the original example using Fourth Coffee, we need to have a few things ready in order to use the new UI, specifically the ZIP file (containing the Configuration and custom DSC Resources). For our example today, we\u2019ve trimmed down the DSC Configuration for Fourth Coffee and made a slight change (file saved as C:\\examples\\FourthCoffee.ps1):<\/p>\n<p>&nbsp;<\/p>\n<div style=\"overflow: auto; font-size: 10pt; font-family: consolas,lucida console; width: 650px; border: black 1px solid; padding: 5px;\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n<tbody>\n<tr>\n<td valign=\"top\">\n<div style=\"font-size: 10pt; font-family: consolas,lucida console; background: #cecece; padding: 5px;\">001\n002\n003\n004\n005\n006\n007\n008\n009\n010\n011\n012\n013\n014\n015\n016\n017\n018\n019\n020\n021\n022\n023\n024\n025\n026\n027\n028\n029\n030\n031\n032\n033\n034\n035\n036\n037\n038\n039\n040\n041\n042\n043\n044\n045\n046\n047\n048\n049\n050<\/div>\n<\/td>\n<td valign=\"top\" nowrap=\"nowrap\">\n<div style=\"font-size: 10pt; font-family: consolas,lucida console; background: #fcfcfc; padding: 5px;\">\n<p><span style=\"color: #00008b;\">Configuration<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8a2be2;\">WebSite<\/span>\n<span style=\"color: #000000;\">{<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0 <\/span><span style=\"color: #0000ff;\">Import-DscResource<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #000080;\">-Module<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8a2be2;\">xWebAdministration<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0 <\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #006400;\"># Install the IIS role <\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #00008b;\">WindowsFeature<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8a2be2;\">IIS<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">{<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Ensure<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Present&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Name<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Web-Server&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">}<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #006400;\"># Install the ASP .NET 4.5 role <\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #00008b;\">WindowsFeature<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8a2be2;\">AspNet45<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">{<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Ensure<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Present&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Name<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Web-Asp-Net45&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">}<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #006400;\"># Stop the default website <\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #00008b;\">xWebsite<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8a2be2;\">DefaultSite<\/span><span style=\"color: #000000;\">\u00a0 <\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">{<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Ensure<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Present&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Name<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Default Web Site&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">State<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Stopped&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">PhysicalPath<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;C:\\inetpub\\wwwroot&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">DependsOn<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;[WindowsFeature]IIS&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">}<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #006400;\"># Copy the website content <\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #00008b;\">File<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8a2be2;\">WebContent<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">{<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Ensure<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Present&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">SourcePath<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;C:\\Program Files\\WindowsPowerShell\\Modules\\BakeryWebsite&#8217;<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">DestinationPath<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;C:\\inetpub\\FourthCoffee&#8217;<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Recurse<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #ff4500;\">$true<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Type<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Directory&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">DependsOn<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;[WindowsFeature]AspNet45&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">}<\/span><span style=\"color: #000000;\">\u00a0 <\/span><\/p>\n<p><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #006400;\"># Create a new website <\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #00008b;\">xWebsite<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8a2be2;\">BakeryWebSite<\/span><span style=\"color: #000000;\">\u00a0 <\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">{<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Ensure<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Present&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">Name<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;FourthCoffee&#8217;<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">State<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;Started&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">PhysicalPath<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;C:\\inetpub\\FourthCoffee&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">DependsOn<\/span><span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #a9a9a9;\">=<\/span><span style=\"color: #000000;\">\u00a0<\/span><span style=\"color: #8b0000;\">&#8216;[File]WebContent&#8217;<\/span><span style=\"color: #000000;\">\u00a0<\/span>\n<span style=\"color: #000000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span style=\"color: #000000;\">}<\/span>\n<span style=\"color: #000000;\">}<\/span><\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>You\u2019ll note that we are using the <strong>xWebAdministration<\/strong> DSC Resource again. If you haven\u2019t downloaded it and the rest of most current Wave of the DSC Resource Kit, grab the \u2018All Modules\u2019 package <a href=\"https:\/\/gallery.technet.microsoft.com\/DSC-Resource-Kit-All-c449312d\">here<\/a>.<\/p>\n<p>With our Configuration file ready, we\u2019ll use PowerShell to prepare the ZIP file. Note that we are using the same cmdlet as before (<strong>Publish-AzureVMDscConfiguration<\/strong>), but with a different switch (run from C:\\examples; I split the command in two lines; note the backtick character at the end of the first line):<\/p>\n<pre style=\"color: #eeedf0; background-color: #012456;\">PS&gt; <span style=\"color: #ff0; background-color: #012456;\">Publish-AzureVMDscConfiguration<\/span> .\\FourthCoffee.ps1 `                                                                \r\n&gt;&gt;&gt; <span style=\"color: #888; background-color: #012456;\">-ConfigurationArchivePath<\/span> .\\WebsitePackage1.zip<\/pre>\n<p>This doesn\u2019t actually upload anything to your Storage Account, it just prepares the ZIP file with the specified Configuration. Additionally, it parses the Configuration for custom DSC Resources and as long as they are present, copies them from your Modules folder into the newly created ZIP.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/5238.CreatedZIPFile_192E889C.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Created ZIP File\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/5238.CreatedZIPFile_192E889C.png\" alt=\"Created ZIP File\" width=\"585\" height=\"193\" border=\"0\" \/><\/a><\/p>\n<p>For our example, we are going to manually copy the required web content (available at the bottom of this post) into the ZIP file. You\u2019ll notice in the new FourthCoffe.ps1 Configuration that we declared <em>[File]WebContent<\/em> as getting the files from \u2018<em>C:\\Program Files\\WindowsPowerShell\\Modules\\BakeryWebsite<\/em>\u2019, so we\u2019ll put it at the same root of the ZIP as the \u2018<em>xWebAdministration<\/em>\u2019 folder is. Note that there are of course other ways with PowerShell DSC to get content, this is just for this example (using the <a href=\"http:\/\/blogs.msdn.com\/b\/windowsazurestorage\/archive\/2014\/05\/12\/introducing-microsoft-azure-file-service.aspx\">Azure Files Preview<\/a> is my new favorite way).<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/2117.UpdatedZIPFile_71F43F66.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Updated ZIP File\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/8054.UpdatedZIPFile_thumb_51D932A9.png\" alt=\"Updated ZIP File\" width=\"585\" height=\"193\" border=\"0\" \/><\/a><\/p>\n<h4>Using the UI<\/h4>\n<p>Now that our Configuration ZIP (with content) is ready, it\u2019s time to look at the new UI and see what\u2019s possible. In the Azure Preview Portal, browse to your Virtual Machine and in the Configuration space, click on the Extensions box (just like if you were going to go look at the status of the extensions). Now, in the Extensions pane, click the \u2018Add\u2019 button and note that our friend \u2018PowerShell DSC\u2019 is now present!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/7220.AddPowerShellDSCExtension_thumb_3466E19D.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Add PowerShell DSC Extension\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/7220.AddPowerShellDSCExtension_thumb_3466E19D.png\" alt=\"Add PowerShell DSC Extension\" width=\"584\" height=\"325\" border=\"0\" \/><\/a><\/p>\n<p>Just like all of the other existing Azure Extensions, when we click on the PowerShell DSC Extension, we get some descriptive information, a Publisher, and a link to resources:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/7713.ExtensionDetails_thumb_0D2C9868.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension Details\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/7713.ExtensionDetails_thumb_0D2C9868.png\" alt=\"Extension Details\" width=\"570\" height=\"299\" border=\"0\" \/><\/a><\/p>\n<p>Clicking on the \u2018Create\u2019 button gives the window to input the needed settings. In the event you already have a DSC Extension installed on a VM, you\u2019ll get the second window with the warning:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/2045.ExtensionFieldsNew_1AFEDE63.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension Fields - New\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/1440.ExtensionFieldsNew_thumb_61E80160.png\" alt=\"Extension Fields - New\" width=\"282\" height=\"344\" border=\"0\" \/><\/a> <a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/6747.ExtensionFieldsExisting_6FBA475B.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension Fields - Existing\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/7318.ExtensionFieldsExisting_thumb_21B1E7E6.png\" alt=\"Extension Fields - Existing\" width=\"228\" height=\"345\" border=\"0\" \/><\/a><\/p>\n<p>For \u2018Configuration Modules or Script\u2019, use the folder and browse to the WebsitePackage.zip that we previously created and added content to. Since we didn\u2019t use any Configuration Data in this example, we\u2019ll skip the \u2018ConfigurationData PSD1 File\u2019. That option allows for the specifying of a Configuration Data file as the name implies and is the equivalent of using <em>\u2013ConfigurationDataPath<\/em> with the <strong>Set-AzureVMDscExtension<\/strong> cmdlet. For \u2018Module-qualified Name of Configuration\u2019, use the name of the DSC Configuration file included in the ZIP along with the name of the Configuration in this format (note that the \u2018Configuration File\u2019 may contain more than one DSC configuration; this format ensures the Azure Extension picks up the correct one):<\/p>\n<p>&lt;ConfigurationFile&gt;.ps1\\&lt;ConfigurationName&gt;<\/p>\n<p>For our example, it will look like this when all put together:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/5265.ExtensionFieldsAdded_5D718099.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension Fields - Added\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/3122.ExtensionFieldsAdded_thumb_0F692124.png\" alt=\"Extension Fields - Added\" width=\"261\" height=\"350\" border=\"0\" \/><\/a><\/p>\n<p>We didn\u2019t have any arguments to pass to the Configuration in this example either, but the \u2018Configuration Arguments\u2019 would be where you placed <em>\u2013ConfigurationArgument<\/em> details. Instead of using a hashtable like in the PowerShell cmdlets, use the format \u2018name1=value1,name2=value\u2019.<\/p>\n<p>When you click the \u2018Create\u2019 button, the Add Extension pane will disappear and close. You can see that the work is being done and the status by using the Notifications icon on the left bar:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/6354.NotificationsCreatingExtension_6F4E1466.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Notifications - Creating Extension\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/4201.NotificationsCreatingExtension_thumb_64248A1C.png\" alt=\"Notifications - Creating Extension\" width=\"378\" height=\"188\" border=\"0\" \/><\/a><\/p>\n<p>And when completed:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/1376.NotificationsDoneCreatingExtension_2F17FAEC.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Notifications - Done Creating Extension\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/5518.NotificationsDoneCreatingExtension_thumb_51DBC35A.png\" alt=\"Notifications - Done Creating Extension\" width=\"382\" height=\"191\" border=\"0\" \/><\/a><\/p>\n<p>Browsing back into our Virtual Machines Configuration and Extensions, we can see that the PowerShell DSC Extension is being installed:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/2465.ExtensionInstalling_31C0B69D.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension - Installing\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/2860.ExtensionInstalling_thumb_63B85727.png\" alt=\"Extension - Installing\" width=\"507\" height=\"224\" border=\"0\" \/><\/a><\/p>\n<p>Here\u2019s a rapid set of screen grabs as it progresses and finishes (took about 5 minutes on my VM):<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/5102.ExtensionTransitioningRebooting_588ECCDD.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension - Transitioning - Rebooting\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/4606.ExtensionTransitioningRebooting_thumb_0A866D68.png\" alt=\"Extension - Transitioning - Rebooting\" width=\"572\" height=\"214\" border=\"0\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/2553.ExtensionTransitioningInitializing_6A6B60AA.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension - Transitioning - Initializing\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/2553.ExtensionTransitioningInitializing_6A6B60AA.png\" alt=\"Extension - Transitioning - Initializing\" width=\"570\" height=\"219\" border=\"0\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/8322.ExtensionTransitioningApplying_582299E8.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension - Transitioning - Applying\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/3554.ExtensionTransitioningApplying_thumb_38078D2B.png\" alt=\"Extension - Transitioning - Applying\" width=\"577\" height=\"226\" border=\"0\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/6523.ExtensionSuccess_thumb_3AB048DC.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Extension - Success\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/6523.ExtensionSuccess_thumb_3AB048DC.png\" alt=\"Extension - Success\" width=\"582\" height=\"223\" border=\"0\" \/><\/a><\/p>\n<p>Success! Now, the only thing we have to do is check to see if our content was put in place and the website is working. You can use the Azure Portal to configure an endpoint for this Virtual Machine, but I did it the quick way with PowerShell (note that I split the command in 3 lines):<\/p>\n<pre style=\"color: #eeedf0; background-color: #012456;\">PS&gt; <span style=\"color: #ff0; background-color: #012456;\">Get-AzureVM<\/span> <span style=\"color: #888; background-color: #012456;\">-Name<\/span> sample <span style=\"color: #888; background-color: #012456;\">-ServiceName<\/span> sample-i5oc0t5i |                                                          \r\n&gt;&gt;&gt; <span style=\"color: #ff0; background-color: #012456;\">Add-AzureEndpoint<\/span> <span style=\"color: #888; background-color: #012456;\">-Name<\/span> HTTP <span style=\"color: #888; background-color: #012456;\">-Protocol<\/span> TCP <span style=\"color: #888; background-color: #012456;\">-LocalPort<\/span> <span style=\"color: #fff; background-color: #012456;\">80<\/span> <span style=\"color: #888; background-color: #012456;\">-PublicPort<\/span> <span style=\"color: #fff; background-color: #012456;\">80<\/span> |                                           \r\n&gt;&gt;&gt; <span style=\"color: #ff0; background-color: #012456;\">Update-AzureVM<\/span>                                                                                                      \r\n&gt;&gt;&gt;                                                                                                                    \r\n<\/pre>\n<p>Then I took my favorite browser and went to see if it worked and see that everything on my new VM is exactly as I wanted it. All done!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/0250.WebsiteRunning_0C56C32F.png\"><img decoding=\"async\" style=\"border-width: 0px;\" title=\"Website Running\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/30\/2018\/10\/4062.WebsiteRunning_thumb_61122C27.png\" alt=\"Website Running\" width=\"721\" height=\"398\" border=\"0\" \/><\/a><\/p>\n<h4>Additional Resources<\/h4>\n<p>Here are just a few other PowerShell DSC related resources:<\/p>\n<p>\u00b7 <a href=\"http:\/\/blogs.msdn.com\/b\/powershell\/archive\/2014\/09\/10\/secure-credentials-in-the-azure-powershell-desired-state-configuration-dsc-extension.aspx\">Secure Credentials in the Azure Powershell DSC Extension<\/a><\/p>\n<p>\u00b7 <a href=\"http:\/\/blogs.technet.com\/b\/learningittogether\/archive\/2014\/10\/09\/troubleshooting-the-dsc-extension-for-azure.aspx\">Troubleshooting the DSC Extension for Azure<\/a><\/p>\n<p>\u00b7 <a href=\"https:\/\/gallery.technet.microsoft.com\/DSC-Resource-Kit-All-c449312d\">DSC Resource Kit (All Modules)<\/a><\/p>\n<p>Happy configuring!<\/p>\n<p>David Coulter &#8211; Microsoft, Senior Consultant<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE 11\/21\/2014: For information on OS support, and other features, please refer to our release history. If you haven\u2019t yet started using the Azure Preview Portal and are a fan of PowerShell DSC and the Azure PowerShell DSC Extension (announced in August here), now just might be the time to start. We are pleased to [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1481","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>UPDATE 11\/21\/2014: For information on OS support, and other features, please refer to our release history. If you haven\u2019t yet started using the Azure Preview Portal and are a fan of PowerShell DSC and the Azure PowerShell DSC Extension (announced in August here), now just might be the time to start. We are pleased to [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/1481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=1481"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/1481\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=1481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=1481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=1481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}