{"id":1791,"date":"2014-02-28T10:36:00","date_gmt":"2014-02-28T10:36:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2014\/02\/28\/want-to-automatically-configure-your-machines-using-dsc-at-initial-boot-up\/"},"modified":"2019-02-18T13:05:22","modified_gmt":"2019-02-18T20:05:22","slug":"want-to-automatically-configure-your-machines-using-dsc-at-initial-boot-up","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/want-to-automatically-configure-your-machines-using-dsc-at-initial-boot-up\/","title":{"rendered":"Want to Automatically Configure Your Machines Using DSC at Initial Boot-up?"},"content":{"rendered":"<p>Often times, IT Pros want to automate software installation and configuration upon a machine&rsquo;s initial boot-up. This blog will walk you through how to use Windows PowerShell Desired State Configuration (DSC) to do this. We will show you how to prepare and inject DSC configurations into your bootable media (such as VHDs), so that they are executed during the initial boot-up process. We will discuss three approaches to this process, and give a VHD example for each one.<\/p>\n<p><strong>Prerequisites<\/strong>:<\/p>\n<ul>\n<li>\n<div>Windows Server 2012 R2 with <a href=\"http:\/\/support.microsoft.com\/kb\/2883200\"><span style=\"color: #0000ff\">update KB2883200<\/span><\/a>You can use <strong>Get-HotFix -Id KB2883200<\/strong> to check whether it&#8217;s installed.<\/div>\n<\/li>\n<\/ul>\n<p><strong>Option 1 &ndash; Inject a DSC configuration (.ps1) into a VHD <\/strong><\/p>\n<p>Our first approach will be to inject a .ps1 with a DSC configuration directly into a VHD. This approach leverages &ldquo;Unattended Windows Setup&rdquo; to automatically run an inserted configuration. For information about running Windows Setup, see <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc749415(v=ws.10).aspx\"><span style=\"color: #0000ff\">the reference here.<\/span><\/a><\/p>\n<ul>\n<li>First, we need to write a configuration to inject. This configuration will be run when the machine boots up. For example, this sample configuration ensures that IIS is installed. Note: feel free to replace this configuration with your own. The <a href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/xComputerManagement-Module-3ad911cc\"><span style=\"color: #0000ff\">xComputer page<\/span><\/a> has more samples for common tasks including renaming your computer, joining a domain, etc.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<div class=\"WordSection1\">\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span class=\"SpellE\"><span class=\"GramE\"><span style=\"color: blue;font-family: 'Lucida Console';font-size: 8pt\">powershell<\/span><\/span><\/span><span style=\"font-family: 'Lucida Console';font-size: 8pt\"> <span style=\"color: navy\">-c<\/span> {<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span class=\"GramE\"><span style=\"color: darkblue\">configuration<\/span><\/span> <span class=\"SpellE\"><span style=\"color: blueviolet\">SampleIISInstall<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>{<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"GramE\">node<\/span> (<span style=\"color: darkred\">&#8220;<span class=\"SpellE\">localhost<\/span>&#8220;<\/span>)<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>{<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">WindowsFeature<\/span> <span style=\"color: blueviolet\">IIS<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>{<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Ensure <span style=\"color: darkgray\">=<\/span> <span style=\"color: darkred\">&#8220;Present&#8221;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Name <span style=\"color: darkgray\">=<\/span> <span style=\"color: darkred\">&#8220;Web-Server&#8221;<\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>}<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>}<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>}<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp; <\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: darkgreen\"># Compile the configuration file to a MOF format<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\"><span style=\"color: blue\">SampleIISInstall<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: darkgreen\"># Run the configuration on <span class=\"SpellE\">localhost<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue\">Start-<span class=\"SpellE\">DscConfiguration<\/span><\/span> <span style=\"color: navy\">-Path<\/span> <span style=\"color: blueviolet\">.\\<span class=\"SpellE\">SampleIISInstall<\/span><\/span> <span style=\"color: navy\">&#8211;<span class=\"SpellE\">ComputerName<\/span><\/span> <span class=\"SpellE\"><span style=\"color: blueviolet\">localhost<\/span><\/span> <span style=\"color: navy\">-Wait<\/span> <span style=\"color: navy\">-Force<\/span> <span style=\"color: navy\">-Verbose<\/span> <\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">} <\/span><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>Save the above to <strong>SampleIISInstall.ps1. <\/strong>This file<strong> <\/strong>will be injected to your bootable VHD.<\/li>\n<\/ul>\n<ul>\n<li>Next, we need to create a unattend.xml file. Below is a snippet from a sample unattend.xml (the whole document is attached at the bottom of this blog). Under the &ldquo;specialize&rdquo; pass, a part of Windows installation, the <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc722359(v=ws.10).aspx\"><span style=\"color: #0000ff\">RunSynchronous<\/span><\/a> command gets invoked. In turn a command file (in this case RunDSC.cmd) is called.<\/li>\n<\/ul>\n<\/div>\n<div class=\"WordSection1\">\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\">&lt;settings pass=&#8221;specialize&#8221;&gt;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&lt;component name=&#8221;Microsoft-Windows-Deployment&#8221; <span class=\"SpellE\">processorArchitecture<\/span>=&#8221;amd64&#8243; &hellip;&gt;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&lt;<span class=\"SpellE\">RunSynchronous<\/span>&gt;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&lt;<span class=\"SpellE\">RunSynchronousCommand<\/span>&gt;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&lt;Order&gt;1&lt;\/Order&gt;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&lt;Path&gt;%<span class=\"SpellE\">SystemDrive<\/span>%\\DSC\\<strong>RunDSC.cmd<\/strong>&lt;\/Path&gt;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&lt;\/<span class=\"SpellE\">RunSynchronousCommand<\/span>&gt;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&lt;\/<span class=\"SpellE\">RunSynchronous<\/span>&gt;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&lt;\/component&gt;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\"><span style=\"line-height: 115%;font-size: 9pt\">&lt;\/settings&gt;<\/span><\/p>\n<ul>\n<li>The content of RunDSC.cmd looks something like the following. It uses Windows Task Scheduler to schedule a task that invokes SampleIISInstall.ps1.<\/li>\n<\/ul>\n<\/div>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\">schtasks.exe \/Create \/SC ONSTART \/TN &#8220;\\Microsoft\\Windows\\Desired State Configuration\\<span class=\"SpellE\">DSCRestartBootTask<\/span>&#8221; \/RU System<strong> <\/strong>\/F \/TR &#8220;PowerShell.exe &#8211;<span class=\"SpellE\">ExecutionPolicy<\/span> <span class=\"SpellE\">RemoteSigned<\/span> -File c:\\dsc\\SampleIISInstall.ps1&#8243;<\/p>\n<div class=\"WordSection1\">\n<ul>\n<li>We have all necessary files ready. Now inject SampleIISInstall.ps1, RunDSC.cmd, and unattend.xml to the VHD. In our case, unattend.xml is copied under root directory while SampleIISInstall.ps1 and RunDSC.cmd are put under %SystemDrive%\\DSC. If you boot up from the VHD, or create a VM from the VHD, you will see that IIS gets installed at first boot-up.<\/li>\n<\/ul>\n<\/div>\n<p><strong>Option 2 &ndash; Inject a compiled DSC configuration (.mof) into a VHD<\/strong><\/p>\n<p>Imagine we need to customize the installation for large-scale rollouts so that we achieve consistency in the configuration of each target node. The method described in Option 1 does not seem to be efficient; it requires the compilation of the DSC configuration on each node. In the following approach, we inject an already compiled configuration into the VHD.<\/p>\n<p>There are two ways to inject a complied DSC configuration to VHD. Let&rsquo;s go through them.<\/p>\n<p><strong>2.1 Inject a DSC configuration (.mof) document<\/strong><\/p>\n<ul>\n<li>To generate a compiled configuration, let&rsquo;s compile the above SampleIISInstall configuration. A localhost.mof file is generated after the compilation as below:<\/li>\n<\/ul>\n<div class=\"WordSection1\">\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\">PS <span class=\"GramE\">C:<\/span>\\&gt; <span class=\"SpellE\">SampleIISInstall<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>Directory: C:\\SampleIISInstall<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\">Mode<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">LastWriteTime<\/span><span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Length Name<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\">&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;&#8212;&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212; &#8212;-<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>2\/14\/2014<span>&nbsp;&nbsp; <\/span>4:12 PM<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1086&nbsp;&nbsp; <span class=\"SpellE\">localhost.mof<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #012456;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: whitesmoke;font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;<\/span><\/span><\/p>\n<\/div>\n<ul>\n<li>Copy the localhost.mof to <strong>pending.mof<\/strong>.<\/li>\n<li>Make sure you inject the pending.mof to your VHD under the <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/dn249922.aspx\"><span style=\"color: #0000ff\"> DSC Local Configuration Manager<\/span><\/a> (LCM) dedicated folder:<strong> %systemdrive%\\Windows\\System32\\Configuration<\/strong>.<\/li>\n<li>As in Option 1, we will use a unattend.xml. As before, the unattend.xml will invoke a command like RunDSC.cmd.<\/li>\n<li>The content of RunDSC.cmd should look something like the following. It schedules a task:<\/li>\n<\/ul>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in\">schtasks.exe \/Create \/SC ONSTART \/TN &#8220;\\Microsoft\\Windows\\Desired State Configuration\\<span class=\"SpellE\">DSCRestartBootTask<\/span>&#8221; \/RU System \/F \/TR &#8220;PowerShell.exe &#8211;<span class=\"SpellE\">NonInt<\/span> -Command &#8216;Invoke-<span class=\"SpellE\">CimMethod<\/span> -Namespace root\/Microsoft\/Windows\/<span class=\"SpellE\">DesiredStateConfiguration<\/span> &ndash;<span class=\"SpellE\">ClassName<\/span> <span class=\"SpellE\">MSFT_DSCLocalConfigurationManager<\/span> &#8211;<span class=\"SpellE\">MethodName<\/span> <span class=\"SpellE\">PerformRequiredConfigurationChecks<\/span> &#8211;<span class=\"SpellE\">Arg<\/span> <span class=\"GramE\">@{<\/span>Flags = [System.UInt32]3 }'&#8221;<\/p>\n<p class=\"WordSection1\">The above process will make localhost.mof the pending configuration in the LCM. The scheduled task then tells the LCM to process the pending configuration (&ldquo;Flag 3&rdquo; means to apply the configuration). Through this mechanism, localhost.mof will be applied.<\/p>\n<p class=\"WordSection1\"><strong>2.2 Inject a &ldquo;meta-configuration&rdquo; to download a document <\/strong><\/p>\n<p class=\"WordSection1\">In the above we discussed how to apply configurations using the &ldquo;<a href=\"http:\/\/blogs.msdn.com\/b\/powershell\/archive\/2013\/11\/26\/push-and-pull-configuration-modes.aspx\"><span style=\"color: #0000ff\">push model<\/span><\/a>&rdquo; of DSC. That is to say, we &ldquo;pushed&rdquo; the configuration onto the machine. We can also leverage the &ldquo;<a href=\"http:\/\/blogs.msdn.com\/b\/powershell\/archive\/2013\/11\/26\/push-and-pull-configuration-modes.aspx\"><span style=\"color: #0000ff\">pull model<\/span><\/a>&rdquo; of DSC to apply a configuration. To do this, we must configure the node to &ldquo;pull&rdquo; it&rsquo;s configuration from a DSC &ldquo;<a href=\"http:\/\/blogs.msdn.com\/b\/powershell\/archive\/2013\/11\/21\/powershell-dsc-resource-for-configuring-pull-server-environment.aspx\"><span style=\"color: #0000ff\">pull server<\/span><\/a>&rdquo; and then apply it. We do this by configuring the Local Configuration Manager with a &ldquo;meta-configuration.&rdquo;<\/p>\n<p class=\"WordSection1\">We describe the steps as below:<\/p>\n<p class=\"WordSection1\">1. Deploy your configuration files to the pull server (<a href=\"http:\/\/blogs.msdn.com\/b\/powershell\/archive\/2013\/11\/26\/push-and-pull-configuration-modes.aspx\"><span style=\"color: #0000ff\">see this blog<\/span><\/a> for more information)<\/p>\n<ul>\n<li>\n<div class=\"WordSection1\">Copy the localhost.mof created in Option 2.1 to <strong>43d4995d-3199-4e0d-aef5-d52d3b681ac4.mof<\/strong><\/div>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<div class=\"WordSection1\">Run &ldquo;New-DSCCheckSum&rdquo; to generate 43d4995d-3199-4e0d-aef5-d52d3b681ac4.<strong>mof<\/strong><strong>.checksum<\/strong>.<\/div>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<div class=\"WordSection1\">Copy the above two files to your pull server under the following folder: <strong>$env:programfiles\\WindowsPowerShell\\DSCService\\Configuration<\/strong>.<\/div>\n<\/li>\n<\/ul>\n<p class=\"WordSection1\">Now we have the configuration files ready on the pull server. Next, we will create a DSC meta-configuration to be injected to the VHD.<\/p>\n<p class=\"WordSection1\">2. Prepare the meta-configuration for target node<\/p>\n<ul>\n<li>\n<div class=\"WordSection1\">Create a meta-configuration. The following is a sample meta-configuration. It instructs the LCM to download a configuration file: 43d4995d-3199-4e0d-aef5-d52d3b681ac4.mof from the pull server via the URL <a href=\"http:\/\/pullserver:8080\/PSDSCPUllServer\/PSDSCPullServer.svc\">http:\/\/pullserver:8080\/PSDSCPUllServer\/PSDSCPullServer.svc<\/a>. For information about meta-configuration, please refer to <a href=\"http:\/\/blogs.msdn.com\/b\/powershell\/archive\/2013\/12\/09\/understanding-meta-configuration-in-windows-powershell-desired-state-configuration.aspx\"><span style=\"color: #0000ff\">this blog<\/span><\/a>.<\/div>\n<\/li>\n<\/ul>\n<div class=\"WordSection1\">\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"color: darkblue;font-family: 'Lucida Console';font-size: 8pt\">Configuration<\/span><span style=\"font-family: 'Lucida Console';font-size: 8pt\"> <span class=\"SpellE\"><span style=\"color: blueviolet\">SampleConfiguration<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">{<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>Node <span style=\"color: darkred\">&#8220;<span class=\"SpellE\">localhost<\/span>&#8220;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>{<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">LocalConfigurationManager<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>{<span>&nbsp;&nbsp;&nbsp; <\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">ConfigurationID<\/span> <span style=\"color: darkgray\">=<\/span><span style=\"color: darkred\">&#8220;<strong>43d4995d-3199-4e0d-aef5-d52d3b681ac4<\/strong>&#8220;<\/span>;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">DownloadManagerName<\/span> <span style=\"color: darkgray\">=<\/span><span style=\"color: darkred\">&#8220;<span class=\"SpellE\">WebDownloadManager<\/span>&#8220;<\/span>;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">DownloadManagerCustomData<\/span> <span style=\"color: darkgray\">=<\/span> <span class=\"GramE\">@{<\/span> ServerUrl<span style=\"color: darkgray\">=<\/span><span style=\"color: darkred\">&#8220;<strong>http:\/\/Pullserver:8080\/PSDSCPullServer\/PSDSCPullServer.svc<\/strong>&#8220;<\/span> ; <span class=\"SpellE\">AllowUnsecureConnection<\/span><span style=\"color: darkgray\">=<\/span> <span style=\"color: darkred\">&#8220;True&#8221;<\/span>}<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">RefreshMode<\/span> <span style=\"color: darkgray\">=<\/span><span style=\"color: darkred\">&#8220;PULL&#8221;<\/span>;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">ConfigurationMode<\/span> <span style=\"color: darkgray\">=<\/span><span style=\"color: darkred\">&#8220;<span class=\"SpellE\">ApplyAndAutoCorrect<\/span>&#8220;<\/span>;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">RebootNodeIfNeeded<\/span> <span style=\"color: darkgray\">=<\/span> <span style=\"color: orangered\">$true<\/span>;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">RefreshFrequencyMins<\/span> <span style=\"color: darkgray\">=<\/span> <span style=\"color: purple\">15<\/span>;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">ConfigurationModeFrequencyMins<\/span> <span style=\"color: darkgray\">=<\/span> <span style=\"color: purple\">30<\/span>; <\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>}<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span>}<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">} <\/span><\/p>\n<p class=\"MsoListParagraph\" style=\"margin-bottom: 0pt\">&nbsp;<\/p>\n<\/div>\n<ul>\n<li>After compiling the above meta configuration, you will see a localhost.meta.mof file is generated. The content of localhost.meta.mof looks like below:<\/li>\n<\/ul>\n<div class=\"WordSection1\">\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span class=\"GramE\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">instance<\/span><\/span><span style=\"font-family: 'Lucida Console';font-size: 8pt\"> of <span class=\"SpellE\">MSFT_KeyValuePair<\/span> as $keyvaluepair1<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">{<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span class=\"GramE\">key<\/span> = &#8220;<span class=\"SpellE\">ServerUrl<\/span>&#8220;;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span class=\"GramE\">value<\/span> = &#8220;<strong>http:\/\/pullserver:8080\/<span class=\"SpellE\">PSDSCPUllServer<\/span>\/<span class=\"SpellE\">PSDSCPullServer.svc<\/span><\/strong>&#8220;;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">};<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span class=\"GramE\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">instance<\/span><\/span><span style=\"font-family: 'Lucida Console';font-size: 8pt\"> of <span class=\"SpellE\">MSFT_KeyValuePair<\/span> as $keyvaluepair2<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">{ <\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span class=\"GramE\">key<\/span> = &#8220;<span class=\"SpellE\">AllowUnsecureConnection<\/span>&#8220;;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp; <\/span><span class=\"GramE\">value<\/span> = &#8220;true&#8221;; <\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">};<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span class=\"GramE\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">instance<\/span><\/span><span style=\"font-family: 'Lucida Console';font-size: 8pt\"> of <span class=\"SpellE\">MSFT_DSCMetaConfiguration<\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">{<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">ConfigurationID<\/span> =&#8221;<strong>43d4995d-3199-4e0d-aef5-d52d3b681ac4<\/strong>&#8220;;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">RefreshMode<\/span> =&#8221;PULL&#8221;;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">ConfigurationMode<\/span> =&#8221;<span class=\"SpellE\">ApplyAndAutoCorrect<\/span>&#8220;;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">DownloadManagerName<\/span> =&#8221;<span class=\"SpellE\">WebDownloadManager<\/span>&#8220;;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">DownloadManagerCustomData<\/span> = {$keyvaluepair1<span class=\"GramE\">,$<\/span>keyvaluepair2};<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">RebootNodeIfNeeded<\/span> = True;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">RefreshFrequencyMins<\/span> = 15;<\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span class=\"SpellE\">ConfigurationModeFrequencyMins<\/span> = 30; <\/span><\/p>\n<p class=\"MsoNormal\" style=\"background: #eeece1;margin: 0in 0in 0pt 0.5in;line-height: normal\"><span style=\"font-family: 'Lucida Console';font-size: 8pt\">}; <\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"line-height: 115%;font-size: 8pt\">&nbsp;<\/span><\/p>\n<\/div>\n<ul>\n<li>Rename the localhost.meta.mof as <strong>metaconfig.mof<\/strong> and inject it to your VHD under the <strong>%systemdrive%\\Windows\\System32\\Configuration<\/strong> folder. Please note your metaconfig.mof should only contain MSFT_DSCMetaConfiguration and MSFT_KeyValuePair instances. You may need to manually remove OMI_ConfigurationDocument if it exists.<\/li>\n<\/ul>\n<ul>\n<li>The rest of the steps regarding unattend.xml and RunDSC.cmd are similar to what we mentioned in Option 2.1.<\/li>\n<\/ul>\n<p>In this post, we discussed three approaches for DSC configuration installation during the initial boot up. You may follow these instructions to prepare your DSC configurations, unattend.xml, and command files. Once you have these files ready, you can use the xVhdFileDirectory samples <a href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/xHyperV-Module-PowerShell-a646ad1a\"><span style=\"color: #0000ff\">from this site<\/span><\/a> to inject them into your VHD. After that, you can create a VM from the VHD. If you do so, you will see that IIS is installed (or being installed as installing IIS takes time) when you log on to the VM.<\/p>\n<p>Thanks, <br \/>Jianyun Tao <br \/>Microsoft Corporation<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Components.PostAttachments\/00\/10\/50\/40\/95\/unattend.xml\">unattend.xml<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Often times, IT Pros want to automate software installation and configuration upon a machine&rsquo;s initial boot-up. This blog will walk you through how to use Windows PowerShell Desired State Configuration (DSC) to do this. We will show you how to prepare and inject DSC configurations into your bootable media (such as VHDs), so that they [&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":[142,150,251,345,348],"class_list":["post-1791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-desired-state-configuration","tag-dsc","tag-powershell-4-0","tag-windows-powershell-4-0","tag-windows-powershell-desired-state-configuration"],"acf":[],"blog_post_summary":"<p>Often times, IT Pros want to automate software installation and configuration upon a machine&rsquo;s initial boot-up. This blog will walk you through how to use Windows PowerShell Desired State Configuration (DSC) to do this. We will show you how to prepare and inject DSC configurations into your bootable media (such as VHDs), so that they [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/1791","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=1791"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/1791\/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=1791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=1791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=1791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}