Skip to content
Draft
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
@@ -1,4 +1,4 @@
// ----------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -186,7 +186,7 @@ public partial class InvokeAzureVMInstallPatch : ComputeAutomationBaseCmdlet
[Parameter(
Mandatory = false,
ParameterSetName = LinuxResourceIDParameterSet,
HelpMessage = "Packages to include in the patch operation. Format: packageName_packageVersion. This parameter is only available for Linux VM.")]
HelpMessage = "Packages to exclude in the patch operation. Format: packageName_packageVersion. This parameter is only available for Linux VM.")]
public string[] PackageNameMaskToInclude { get; set; }

[Parameter(
Expand Down Expand Up @@ -233,6 +233,19 @@ public partial class InvokeAzureVMInstallPatch : ComputeAutomationBaseCmdlet
[PSArgumentCompleter("Critical", "Security", "Other")]
public string[] ClassificationToIncludeForLinux { get; set; }

[Parameter(
Mandatory = false,
ParameterSetName = WindowsDefaultParameterSet,
HelpMessage = "This is used to install patches that were published on or before this given max published date. It should be a dateTime parsable date string.")]
[Parameter(
Mandatory = false,
ParameterSetName = WindowsInputObjectParameterSet,
HelpMessage = "This is used to install patches that were published on or before this given max published date. It should be a dateTime parsable date string.")]
[Parameter(
Mandatory = false,
ParameterSetName = WindowsResourceIDParameterSet,
HelpMessage = "This is used to install patches that were published on or before this given max published date. It should be a dateTime parsable date string.")]
public string MaxPatchPublishDate { get; set; }

[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
public SwitchParameter AsJob { get; set; }
Expand Down Expand Up @@ -301,6 +314,11 @@ public override void ExecuteCmdlet()
{
vmInstallPatchesParameters.WindowsParameters.ExcludeKbsRequiringReboot = true;
}

if (this.IsParameterBound(c => c.MaxPatchPublishDate))
{
vmInstallPatchesParameters.WindowsParameters.MaxPatchPublishDate = this.MaxPatchPublishDate;
}
}
else if (this.Linux.IsPresent)
{
Expand Down Expand Up @@ -331,4 +349,4 @@ public override void ExecuteCmdlet()
});
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,5 +35,6 @@ public class PSVirtualMachineInstallPatchesResult
public IList<PatchInstallationDetail> Patches { get; set; }
public DateTime? StartDateTime { get; set; }
public ApiError Error { get; set; }
public string MaxPatchPublishDate { get; set; }
}
}
}