azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Invoke-AzVMInstallPatch -ClassificationToIncludeForWindows 'Updates' returns 'the value '15' of parameter' error message

Open es-cs1 opened this issue 2 months ago • 2 comments

Description

trying to update using 'Updates' keyword fails, but if i use a list it works

WORKS:

Invoke-AzVMInstallPatch -ResourceGroupName some-rg -VMName some-vm -Windows -RebootSetting "Always" -MaximumDuration PT2H -ClassificationToIncludeForWindows @('Critical,Definition,FeaturePack,Security,ServicePack,Tools,UpdateRollUp,Updates' -split ",")

Issue script & Debug output

$p = Invoke-AzVMInstallPatch -ResourceGroupName MYVMRG -VMName my-vm -Windows -RebootSetting "Always" -MaximumDuration PT2H -ClassificationToIncludeForWindows 'Critical,Security,FeaturePack,Definition,UpdateRollUp,Tools,Updates'
Invoke-AzVMInstallPatch: The value '15' of parameter 'windowsParameters.classificationsToInclude' is not allowed. Allowed values are: Unknown, Critical, Security, UpdateRollup, FeaturePack, ServicePack, Definition, Tools, Updates.
ErrorCode: InvalidParameter
ErrorMessage: The value '15' of parameter 'windowsParameters.classificationsToInclude' is not allowed. Allowed values are: Unknown, Critical, Security, UpdateRollup, FeaturePack, ServicePack, Definition, Tools, Updates.
ErrorTarget: windowsParameters.classificationsToInclude
StatusCode: 400
ReasonPhrase:
OperationID : <SOME-ID>

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.12
PSEdition                      Core
GitCommitId                    7.4.12
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

> Get-Module Az*

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     5.2.0                 Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     10.2.0                Az.Compute                          {Add-AzGalleryInVMAccessControlProfileVersionRulesIdentity, Add-AzGalleryInVMAccessControlProfileVer…

Error output

Message        : The value '15' of parameter 'windowsParameters.classificationsToInclude' is not allowed. Allowed values are: Unknown, Critical, Security, UpdateRollup,
                 FeaturePack, ServicePack, Definition, Tools, Updates.
                 ErrorCode: InvalidParameter
                 ErrorMessage: The value '15' of parameter 'windowsParameters.classificationsToInclude' is not allowed. Allowed values are: Unknown, Critical, Security,
                 UpdateRollup, FeaturePack, ServicePack, Definition, Tools, Updates.
                 ErrorTarget: windowsParameters.classificationsToInclude
                 StatusCode: 400
                 ReasonPhrase:
                 OperationID : ___SOME__ID___
ServerMessage  :
ServerResponse :
RequestMessage :
InvocationInfo : {Invoke-AzVMInstallPatch}
Line           : Invoke-AzVMInstallPatch -ResourceGroupName some-rg -VMName some-vm -Windows -RebootSetting "Always"
                 -MaximumDuration PT2H -ClassificationToIncludeForWindows 'Critical,Definition,FeaturePack,Security,ServicePack,Tools,UpdateRollUp,Updates'
Position       : At line:1 char:1
                 + Invoke-AzVMInstallPatch -ResourceGroupName some-rg…
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :    at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
                    at Microsoft.Azure.Commands.Compute.Automation.InvokeAzureVMInstallPatch.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronouslyOrAsJob>b__3_0(T c)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
HistoryId      : 1

es-cs1 avatar Nov 03 '25 16:11 es-cs1

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @TravisCragg-MSFT, @nikhilpatel909, @sandeepraichura, @hilaryw29, @GabstaMSFT.

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Drewm3, @TravisCragg-MSFT, @nikhilpatel909, @sandeepraichura, @hilaryw29, @GabstaMSFT.