Skip to content

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

@es-cs1

Description

@es-cs1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reported

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions