Skip to content
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

Remove-AzureResourceLock cmdlet is invalid #516

Closed
attilaersek opened this issue Jun 18, 2015 · 3 comments
Closed

Remove-AzureResourceLock cmdlet is invalid #516

attilaersek opened this issue Jun 18, 2015 · 3 comments
Labels
ARM Service Attention This issue is responsible by Azure service team.

Comments

@attilaersek
Copy link

Environment

  • Windows 10 Preview 10130
  • PowerShell 5.0 (5.0.10130.0)
  • AzureResourceManager 0.9.3

Problem

The Remove-AzureResourceLock cmdlet does not support the -LockName parameter or any other parameter that allows me to specify locks.
For example:

PS C:\> Get-AzureResourceLock | Remove-AzureResourceLock
Remove-AzureResourceLock : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:25
+ Get-AzureResourceLock | Remove-AzureResourceLock
+                         ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (@{Name=noMoreDe...f; Properties=}:PSObject) [Remove-AzureResourceLock], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.RemoveAzureResourceLockCmdlet
PS C:\> Remove-AzureResourceLock -LockName noMoreDelete
Remove-AzureResourceLock : A parameter cannot be found that matches parameter name 'LockName'.

Expected Result

The Remove-AzureResourceLock command should support LockName parameter and/or the lock as PSObject.

Regards,
Attila Ersek
Technical Evangelist

@markcowl
Copy link
Member

@retk Thank you for the report, assigning to the appropriate team for investigation.

@vivsriaus
Copy link
Contributor

@retk This is fixed in the latest powershell. Can you please retry?

PS C:> Get-AzureResourceLock | Remove-AzureResourceLock

Confirm
Are you sure you want to delete the following lock:
/subscriptions/38b598fc-e57a-423f-b2e7-dc0ddb631f1f/resourceGroups/testSite/providers/Microsoft.Web/sites/vivsriaus4231
23/providers/Microsoft.Authorization/locks/test2
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y

@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
@mozehgir mozehgir added the ARM label Aug 14, 2019
@ghost
Copy link

ghost commented Aug 14, 2019

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rthorn17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

6 participants