Skip to content

New wmfversion param in set cmdlet for ARM and ASM #1035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from Oct 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,33 @@ public class SetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet
[Parameter(
HelpMessage = "Extension handler gets auto updated to the latest version if this switch is present.")]
public SwitchParameter AutoUpdate { get; set; }
//Private Variables

/// <summary>
/// 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.0PP".
///
/// 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.0PP" will install the latest release of WMF 5.0PP
/// (http://go.microsoft.com/fwlink/?LinkId=398175).
///
/// A value of "latest" will install the latest WMF, currently WMF 5.0PP
///
/// The default value is "latest"
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true)]
[ValidateSetAttribute(new[] { "4.0", "latest", "5.0PP" })]
public string WmfVersion { get; set; }

//Private Variables
private const string VersionRegexExpr = @"^(([0-9])\.)\d+$";

/// <summary>
Expand Down Expand Up @@ -276,7 +301,9 @@ private void CreateConfiguration()
{
var publicSettings = new DscExtensionPublicSettings();
var privateSettings = new DscExtensionPrivateSettings();


publicSettings.WmfVersion = string.IsNullOrEmpty(WmfVersion) ? "latest" : WmfVersion;

if (!string.IsNullOrEmpty(ArchiveBlobName))
{
ConfigurationUris configurationUris = UploadConfigurationDataToBlob();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9736,6 +9736,17 @@ Get-AzureRmVMDscExtension -ResourceGroupName Name -VMName VM -Name 'DSC' </dev:c
<maml:para>Describes what would happen if you executed the command without actually executing the command.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
<maml:name>WmfVersion</maml:name>
<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 &quot;4.0&quot;,&quot;latest&quot; and &quot;5.0PP&quot;.
A value of &quot;4.0&quot; 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 &quot;5.0PP&quot; will install the latest release of WMF 5.0PP (http://go.microsoft.com/fwlink/?LinkId=398175). A value of &quot;latest&quot; will install the latest WMF, currently WMF 5.0PP. The default value is &quot;latest&quot;
</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<!-- Cmdlet parameter section -->
Expand Down Expand Up @@ -9945,6 +9956,23 @@ Get-AzureRmVMDscExtension -ResourceGroupName Name -VMName VM -Name 'DSC' </dev:c
</dev:type>
<dev:defaultValue />
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
<maml:name>WmfVersion</maml:name>
<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 &quot;4.0&quot;,&quot;latest&quot; and &quot;5.0PP&quot;.
A value of &quot;4.0&quot; 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 &quot;5.0PP&quot; will install the latest release of WMF 5.0PP (http://go.microsoft.com/fwlink/?LinkId=398175). A value of &quot;latest&quot; will install the latest WMF, currently WMF 5.0PP. The default value is &quot;latest&quot;
</maml:para>

</maml:description>
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
<dev:type>
<maml:name>string</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue>latest</dev:defaultValue>
</command:parameter>
</command:parameters>
<!-- Input - Output section-->
<command:inputTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,11 @@ public class Property
/// Version of the protocol (DscExtensionPublicSettings and DscExtensionPrivateSettings mostly).
/// </summary>
public Version ProtocolVersion { get; set; }

/// <summary>
/// Specifies the version of the Windows Management Framework (WMF) to install
/// on the VM.
/// </summary>
public string WmfVersion { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,36 @@ public class SetAzureVMDscExtension : VirtualMachineExtensionCmdletBase
/// <summary>
/// The DNS endpoint suffix for all storage services, e.g. "core.windows.net".
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "The Storage Endpoint Suffix.")]
[Parameter(ValueFromPipelineByPropertyName = true,
HelpMessage = "The Storage Endpoint Suffix.")]
[ValidateNotNullOrEmpty]
public string StorageEndpointSuffix { get; set; }

/// <summary>
/// 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.0PP".
///
/// 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.0PP" will install the latest release of WMF 5.0PP
/// (http://go.microsoft.com/fwlink/?LinkId=398175).
///
/// A value of "latest" will install the latest WMF, currently WMF 5.0PP
///
/// The default value is "latest"
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true)]
[ValidateSetAttribute(new[] { "4.0", "latest", "5.0PP" })]
public string WmfVersion { get; set; }

/// <summary>
/// Credentials used to access Azure Storage
/// </summary>
Expand Down Expand Up @@ -354,7 +380,9 @@ private void CreateConfiguration()
{
var publicSettings = new DscExtensionPublicSettings();
var privateSettings = new DscExtensionPrivateSettings();


publicSettings.WmfVersion = string.IsNullOrEmpty(WmfVersion) ? "latest" : WmfVersion;

if (!string.IsNullOrEmpty(ConfigurationArchive))
{
ConfigurationUris configurationUris = UploadConfigurationDataToBlob();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30340,7 +30340,16 @@ If omitted, this parameter will default to the name of the file given by the Con
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
</command:parameter>
</command:syntaxItem>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
<maml:name>WmfVersion</maml:name>
<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 &quot;4.0&quot;,&quot;latest&quot; and &quot;5.0PP&quot;.
A value of &quot;4.0&quot; 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 &quot;5.0PP&quot; will install the latest release of WMF 5.0PP (http://go.microsoft.com/fwlink/?LinkId=398175). A value of &quot;latest&quot; will install the latest WMF, currently WMF 5.0PP. The default value is &quot;latest&quot;</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
Expand Down Expand Up @@ -30504,7 +30513,22 @@ If omitted, this parameter will default to the name of the file given by the Con
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
<maml:name>WmfVersion</maml:name>
<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 &quot;4.0&quot;,&quot;latest&quot; and &quot;5.0PP&quot;.
A value of &quot;4.0&quot; 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 &quot;5.0PP&quot; will install the latest release of WMF 5.0PP (http://go.microsoft.com/fwlink/?LinkId=398175). A value of &quot;latest&quot; will install the latest WMF, currently WMF 5.0PP. The default value is &quot;latest&quot;</maml:para>

</maml:description>
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
<dev:type>
<maml:name>string</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue>latest</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
Expand Down