Skip to content

Commit 3d9f97e

Browse files
authored
Merge pull request #1 from PowerShell/dev0131
Adding WMF 5.1 to the set cmdlets
2 parents c776647 + 3f132c7 commit 3d9f97e

File tree

8 files changed

+60
-22
lines changed

8 files changed

+60
-22
lines changed

src/ResourceManager/Compute/Commands.Compute/Extension/DSC/SetAzureVMDscExtensionCommand.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public class SetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet
187187
///
188188
/// The DSC Azure Extension depends on DSC features that are only available in
189189
/// the WMF updates. This parameter specifies which version of the update to
190-
/// install on the VM. The possible values are "4.0","5.0" ,"5.1PP" and "latest".
190+
/// install on the VM. The possible values are "4.0","5.0" ,"5.1" and "latest".
191191
///
192192
/// A value of "4.0" will install WMF 4.0 Update packages
193193
/// (https://support.microsoft.com/en-us/kb/3119938) on Windows 8.1 or Windows Server
@@ -198,15 +198,15 @@ public class SetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet
198198
/// A value of "5.0" will install the latest release of WMF 5.0
199199
/// (https://www.microsoft.com/en-us/download/details.aspx?id=50395).
200200
///
201-
/// A value of "5.1PP" will install the WMF 5.1 preview
202-
/// (https://www.microsoft.com/en-us/download/details.aspx?id=53347).
201+
/// A value of "5.1" will install the WMF 5.1
202+
/// (https://www.microsoft.com/en-us/download/details.aspx?id=54616).
203203
///
204-
/// A value of "latest" will install the latest WMF, currently WMF 5.0
204+
/// A value of "latest" will install the latest WMF, currently WMF 5.1
205205
///
206206
/// The default value is "latest"
207207
/// </summary>
208208
[Parameter(ValueFromPipelineByPropertyName = true)]
209-
[ValidateSetAttribute(new[] { "4.0", "5.0", "5.1PP", "latest" })]
209+
[ValidateSetAttribute(new[] {"4.0", "5.0", "5.1", "5.1PP", "latest"})]
210210
public string WmfVersion { get; set; }
211211

212212
/// <summary>
@@ -240,6 +240,11 @@ public override void ExecuteCmdlet()
240240
//Private Methods
241241
private void ValidateParameters()
242242
{
243+
if ("5.1PP".Equals(WmfVersion))
244+
{
245+
this.ThrowInvalidArgumentError(Microsoft.Azure.Commands.Compute.Properties.Resources.WMFVersionNotSupported, WmfVersion);
246+
}
247+
243248
if (string.IsNullOrEmpty(ArchiveBlobName))
244249
{
245250
if (ConfigurationName != null || ConfigurationArgument != null

src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15305,12 +15305,12 @@ PS C:\&gt; Set-AzureRmVMDiskEncryptionExtension -ResourceGroupName $RGname -VMNa
1530515305
<dev:defaultValue>None</dev:defaultValue>
1530615306
</command:parameter>
1530715307
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"><maml:name>WmfVersion</maml:name>
15308-
<maml:Description><maml:para>Specifies the WMF version.
15308+
<maml:Description><maml:para>Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0", "5.0", "5.1" and latest. A value of "latest" will install the latest WMF, currently WMF 5.1. The default value is "latest".
1530915309
</maml:para>
1531015310
</maml:Description>
1531115311
<command:parameterValueGroup><command:parameterValue required="false" variableLength="false">4.0</command:parameterValue>
1531215312
<command:parameterValue required="false" variableLength="false">5.0</command:parameterValue>
15313-
<command:parameterValue required="false" variableLength="false">5.1PP</command:parameterValue>
15313+
<command:parameterValue required="false" variableLength="false">5.1</command:parameterValue>
1531415314
<command:parameterValue required="false" variableLength="false">latest</command:parameterValue>
1531515315
</command:parameterValueGroup>
1531615316
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
@@ -15515,24 +15515,24 @@ PS C:\&gt; Set-AzureRmVMDiskEncryptionExtension -ResourceGroupName $RGname -VMNa
1551515515
</maml:alert>
1551615516
</maml:alertSet>
1551715517
<command:examples><command:example><maml:title>Example 1: Set a DSC extension</maml:title>
15518-
<dev:code>PS C:\&gt;Set-AzureRmVMDscExtension -ResourceGroupName "ResourceGroup001" -VMName "VM07" -ArchiveBlobName "Sample.ps1.zip" -ArchiveStorageAccountName "Stg" -ConfigurationName "ConfigName" -Version "1.10" -Location "West US"</dev:code>
15519-
<dev:remarks><maml:para>This command sets the DSC extension on the virtual machine named VM07 to download Sample.ps1.zip from the storage account named Stg and the default container. The command invokes the configuration named ConfigName. The Sample.ps1.zip file was previously uploaded by using Publish-AzureRmVMDscConfiguration.
15518+
<dev:code>PS C:\&gt;Set-AzureRmVMDscExtension -ResourceGroupName "ResourceGroup001" -VMName "VM07" -ArchiveBlobName "Sample.ps1.zip" -ArchiveStorageAccountName "Stg" -ConfigurationName "ConfigName" -Version "X.Y" -Location "West US"</dev:code>
15519+
<dev:remarks><maml:para>This command sets the DSC extension based on the version parameter X.Y (Major.Minor), on the virtual machine named VM07 to download Sample.ps1.zip from the storage account named Stg and the default container. The command invokes the configuration named ConfigName. The Sample.ps1.zip file was previously uploaded by using Publish-AzureRmVMDscConfiguration.
1552015520
</maml:para>
1552115521
<maml:para></maml:para>
1552215522
<maml:para></maml:para>
1552315523
</dev:remarks>
1552415524
</command:example>
1552515525
<command:example><maml:title>Example 2: Set a DSC extension with configuration data</maml:title>
15526-
<dev:code>PS C:\&gt;Set-AzureRmVMDscExtension -ResourceGroupName "ResourceGroup001" -VMName "VM13" -ArchiveBlobName "Sample.ps1.zip" -ArchiveStorageAccountName "Stg" -ConfigurationName "ConfigName" -ConfigurationArgument "@{arg="val"}" -ArchiveContainerName "WindowsPowerShellDSC" -ConfigurationData "SampleData.psd1" -Version "1.10" -Location "West US"</dev:code>
15527-
<dev:remarks><maml:para>This command sets the extension on the virtual machine named VM13 to download Sample.ps1.zip from the storage account named Stg and the container named WindowsPowerShellDSC. The command the configuration named ConfigName and specifies configuration data and arguments. The Sample.ps1.zip file was previously uploaded by using Publish-AzureRmVMDscConfiguration.
15526+
<dev:code>PS C:\&gt;Set-AzureRmVMDscExtension -ResourceGroupName "ResourceGroup001" -VMName "VM13" -ArchiveBlobName "Sample.ps1.zip" -ArchiveStorageAccountName "Stg" -ConfigurationName "ConfigName" -ConfigurationArgument "@{arg="val"}" -ArchiveContainerName "WindowsPowerShellDSC" -ConfigurationData "SampleData.psd1" -Version "X.Y" -Location "West US"</dev:code>
15527+
<dev:remarks><maml:para>This command sets the extension based on the version parameter X.Y (Major.Minor), on the virtual machine named VM13 to download Sample.ps1.zip from the storage account named Stg and the container named WindowsPowerShellDSC. The command the configuration named ConfigName and specifies configuration data and arguments. The Sample.ps1.zip file was previously uploaded by using Publish-AzureRmVMDscConfiguration.
1552815528
</maml:para>
1552915529
<maml:para></maml:para>
1553015530
<maml:para></maml:para>
1553115531
</dev:remarks>
1553215532
</command:example>
1553315533
<command:example><maml:title>Example 3: Set a DSC extension with configuration data that has auto update</maml:title>
15534-
<dev:code>PS C:\&gt;Set-AzureRmVMDscExtension -ResourceGroupName "ResourceGroup001" -VMName "VM22" -ArchiveBlobName "Sample.ps1.zip" -ArchiveStorageAccountName "Stg" -ConfigurationName "ConfigName" -ConfigurationArgument "@{arg="val"}" -ArchiveContainerName WindowsPowerShellDSC -ConfigurationData "SampleData.psd1" -Version "1.10" -Location "West US" -AutoUpdate</dev:code>
15535-
<dev:remarks><maml:para>This command sets the extension on the virtual machine named VM22 to download Sample.ps1.zip from the storage account named Stg and the container named WindowsPowerShellDSC. The command invokes the configuration named ConfigName and specifies configuration data and arguments. This command also enables auto update of extension handler to the latest version. The Sample.ps1.zip was previously uploaded by using Publish-AzureRmVMDscConfiguration.
15534+
<dev:code>PS C:\&gt;Set-AzureRmVMDscExtension -ResourceGroupName "ResourceGroup001" -VMName "VM22" -ArchiveBlobName "Sample.ps1.zip" -ArchiveStorageAccountName "Stg" -ConfigurationName "ConfigName" -ConfigurationArgument "@{arg="val"}" -ArchiveContainerName WindowsPowerShellDSC -ConfigurationData "SampleData.psd1" -Version "X.Y" -Location "West US" -AutoUpdate</dev:code>
15535+
<dev:remarks><maml:para>This command sets the extension based on the version parameter X.Y (Major.Minor), on the virtual machine named VM22 to download Sample.ps1.zip from the storage account named Stg and the container named WindowsPowerShellDSC. The command invokes the configuration named ConfigName and specifies configuration data and arguments. This command also enables auto update of extension handler to the latest version. The Sample.ps1.zip was previously uploaded by using Publish-AzureRmVMDscConfiguration.
1553615536
</maml:para>
1553715537
<maml:para></maml:para>
1553815538
<maml:para></maml:para>

src/ResourceManager/Compute/Commands.Compute/Properties/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/Compute/Commands.Compute/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip)
218218
The file needs to be a PowerShell script (.ps1 or .psm1).</value>
219219
<comment>0 = path to the configuration file</comment>
220220
</data>
221+
<data name="WMFVersionNotSupported" xml:space="preserve">
222+
<value>WMF Version {0} is not supported anymore. </value>
223+
</data>
221224
<data name="AzureVMDscNullArchiveNoConfiguragionParameters" xml:space="preserve">
222225
<value>If the ConfigurationArchive argument is null, then the ConfigurationName, ConfigurationArgument, and ConfigurationDataPath parameters must not be specified </value>
223226
</data>

src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/SetAzureVMDscExtension.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public class SetAzureVMDscExtension : VirtualMachineExtensionCmdletBase
138138
///
139139
/// The DSC Azure Extension depends on DSC features that are only available in
140140
/// the WMF updates. This parameter specifies which version of the update to
141-
/// install on the VM. The possible values are "4.0","5.0" ,"5.1PP" and "latest".
141+
/// install on the VM. The possible values are "4.0","5.0" ,"5.1" and "latest".
142142
///
143143
/// A value of "4.0" will install WMF 4.0 Update packages
144144
/// (https://support.microsoft.com/en-us/kb/3119938) on Windows 8.1 or Windows Server
@@ -149,15 +149,15 @@ public class SetAzureVMDscExtension : VirtualMachineExtensionCmdletBase
149149
/// A value of "5.0" will install the latest release of WMF 5.0
150150
/// (https://www.microsoft.com/en-us/download/details.aspx?id=50395).
151151
///
152-
/// A value of "5.1PP" will install the WMF 5.1 preview
153-
/// (https://www.microsoft.com/en-us/download/details.aspx?id=53347).
152+
/// A value of "5.1" will install the WMF 5.1
153+
/// (https://www.microsoft.com/en-us/download/details.aspx?id=54616).
154154
///
155-
/// A value of "latest" will install the latest WMF, currently WMF 5.0
155+
/// A value of "latest" will install the latest WMF, currently WMF 5.1
156156
///
157157
/// The default value is "latest"
158158
/// </summary>
159159
[Parameter(ValueFromPipelineByPropertyName = true)]
160-
[ValidateSetAttribute(new[] { "4.0", "5.0", "5.1PP", "latest" })]
160+
[ValidateSetAttribute(new[] { "4.0", "5.0", "5.1", "5.1PP", "latest" })]
161161
public string WmfVersion { get; set; }
162162

163163
/// <summary>
@@ -225,6 +225,11 @@ protected override void ValidateParameters()
225225
//
226226
// Validate parameters
227227
//
228+
if ("5.1PP".Equals(WmfVersion))
229+
{
230+
this.ThrowInvalidArgumentError(Resources.WMFVersionNotSupported, WmfVersion);
231+
}
232+
228233
if (string.IsNullOrEmpty(ConfigurationArchive))
229234
{
230235
if (ConfigurationName != null || ConfigurationArgument != null

src/ServiceManagement/Compute/Commands.ServiceManagement/Microsoft.WindowsAzure.Commands.ServiceManagement.dll-Help.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43923,7 +43923,8 @@ PS C:\&gt; Set-AzureServiceAntimalwareExtension -ServiceName "ContosoService03"
4392343923
<dev:defaultValue>None</dev:defaultValue>
4392443924
</command:parameter>
4392543925
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"><maml:name>WmfVersion</maml:name>
43926-
<maml:Description><maml:para>Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0","5.0","5.1PP","latest". A value of "4.0" will install WMF 4.0 Update packages (https://support.microsoft.com/en-us/kb/3119938) on Windows 8.1 or Windows Server 2012 R2, or (https://support.microsoft.com/en-us/kb/3109118) on Windows Server 2008 R2 and on other versions of Windows if newer version is not already installed. A value of "5.0" will install the latest release of WMF 5.0 (https://www.microsoft.com/en-us/download/details.aspx?id=50395). A value of "5.1PP" will install the WMF 5.1 preview (https://www.microsoft.com/en-us/download/details.aspx?id=53347). A value of "latest" will install the latest WMF, currently WMF 5.0. The default value is "latest"
43926+
<maml:Description><maml:para>
43927+
Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0","5.0","5.1","latest". A value of "latest" will install the latest WMF, currently WMF 5.1. The default value is "latest"
4392743928
</maml:para>
4392843929
</maml:Description>
4392943930
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
@@ -44081,7 +44082,8 @@ PS C:\&gt; Set-AzureServiceAntimalwareExtension -ServiceName "ContosoService03"
4408144082
<dev:defaultValue>None</dev:defaultValue>
4408244083
</command:parameter>
4408344084
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"><maml:name>WmfVersion</maml:name>
44084-
<maml:Description><maml:para>Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0","5.0","5.1PP","latest". A value of "4.0" will install WMF 4.0 Update packages (https://support.microsoft.com/en-us/kb/3119938) on Windows 8.1 or Windows Server 2012 R2, or (https://support.microsoft.com/en-us/kb/3109118) on Windows Server 2008 R2 and on other versions of Windows if newer version is not already installed. A value of "5.0" will install the latest release of WMF 5.0 (https://www.microsoft.com/en-us/download/details.aspx?id=50395). A value of "5.1PP" will install the WMF 5.1 preview (https://www.microsoft.com/en-us/download/details.aspx?id=53347). A value of "latest" will install the latest WMF, currently WMF 5.0. The default value is "latest"
44085+
<maml:Description><maml:para>
44086+
Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0","5.0","5.1","latest". A value of "latest" will install the latest WMF, currently WMF 5.1. The default value is "latest"
4408544087
</maml:para>
4408644088
</maml:Description>
4408744089
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
@@ -46850,7 +46852,8 @@ PS C:\&gt; Update-AzureVM -ServiceName $Service_Name -Name $VM_Name -VM $VM_Upda
4685046852
<dev:defaultValue>None</dev:defaultValue>
4685146853
</command:parameter>
4685246854
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"><maml:name>WmfVersion</maml:name>
46853-
<maml:Description><maml:para>Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0","latest" and "5.0". A value of "4.0" will install KB3000850 (http://support.microsoft.com/kb/3000850) on Windows 8.1 or Windows Server 2012 R2, or WMF 4.0 (http://www.microsoft.com/en-us/download/details.aspx?id=40855) on other versions of Windows if a newer version isnt already installed. A value of "5.0" will install the latest release of WMF 5.0 (https://www.microsoft.com/en-us/download/details.aspx?id=50395). A value of "latest" will install the latest WMF, currently WMF 5.0. The default value is "latest"
46855+
<maml:Description><maml:para>
46856+
Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0","5.0","5.1","latest". A value of "latest" will install the latest WMF, currently WMF 5.1. The default value is "latest"
4685446857
</maml:para>
4685546858
</maml:Description>
4685646859
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
@@ -47024,7 +47027,8 @@ PS C:\&gt; Update-AzureVM -ServiceName $Service_Name -Name $VM_Name -VM $VM_Upda
4702447027
<dev:defaultValue>None</dev:defaultValue>
4702547028
</command:parameter>
4702647029
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"><maml:name>WmfVersion</maml:name>
47027-
<maml:Description><maml:para>Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0","latest" and "5.0". A value of "4.0" will install KB3000850 (http://support.microsoft.com/kb/3000850) on Windows 8.1 or Windows Server 2012 R2, or WMF 4.0 (http://www.microsoft.com/en-us/download/details.aspx?id=40855) on other versions of Windows if a newer version isnt already installed. A value of "5.0" will install the latest release of WMF 5.0 (https://www.microsoft.com/en-us/download/details.aspx?id=50395). A value of "latest" will install the latest WMF, currently WMF 5.0. The default value is "latest"
47030+
<maml:Description><maml:para>
47031+
Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0","5.0","5.1","latest". A value of "latest" will install the latest WMF, currently WMF 5.1. The default value is "latest"
4702847032
</maml:para>
4702947033
</maml:Description>
4703047034
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>

src/ServiceManagement/Compute/Commands.ServiceManagement/Properties/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)