-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Environment
- Windows 8.1
- PowerShell 5.0 April 2015 Preview (5.0.10105.0)
- Azure PowerShell 0.9.1
Problem
When I call the New-AzureResourceLock command, and specify a -LockLevel parameter value of ReadOnly, I receive an error.
New-AzureResourceLock : Cannot bind parameter 'LockLevel'. Cannot convert value "ReadOnly" to type "Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Locks.LockLevel". Error: "Unable to match the identifier name ReadOnly to a valid enumerator
name. Specify one of the following enumerator names and try again:
CanNotDelete"
The [Microsoft.Azure.Management.Resources.Models.LockLevel] .NET Enumeration clearly shows that there are three valid values:
- ReadOnly
- CanNotDelete
- NotSpecified
Expected Result
The New-AzureResourceLock command's -LockLevel parameter should accept any of the values from the [LockLevel] .NET Enumeration.
Why isn't this validating against the enum values properly?
Cheers,
Trevor Sullivan
Microsoft MVP: PowerShell
http://trevorsullivan.net
http://twitter.com/pcgeek86
