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

update Remove-AzSentinelAlertRule to accept value from pipeline #10

Closed
pkhabazi opened this issue Sep 8, 2019 · 4 comments
Closed

update Remove-AzSentinelAlertRule to accept value from pipeline #10

pkhabazi opened this issue Sep 8, 2019 · 4 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@pkhabazi
Copy link
Collaborator

pkhabazi commented Sep 8, 2019

Remove-AzSentinelAlertRule
I was thinking I could do the following Example, but instead I received errors, Maybe I am using it wrong.
image
I did see RuleName accepts pipeline input in the helpfiles and it says (ByValue).
Perhaps I am doing this wrong, I just expected it work like in my example.
I have seen a similar way of working in other modules.

Confirm works perfect, great choice of options.

I do think it always should prompt for deletion and -Force will ovveride this behaviour.

Originally posted by @MauRiEEZZZ in #9 (comment)

@pkhabazi pkhabazi added the enhancement New feature or request label Sep 8, 2019
@pkhabazi
Copy link
Collaborator Author

pkhabazi commented Sep 9, 2019

@MauRiEEZZZ you can do that by executing the following command:

$(Get-AzSentinelAlertRule -WorkspaceName pkm02 | where {$_.displayname -like "Rule09*"}).displayName | Remove-AzSentinelAlertRule -WorkspaceName pkm02

image

@pkhabazi pkhabazi self-assigned this Sep 9, 2019
@pkhabazi pkhabazi added bug Something isn't working help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Sep 9, 2019
@pkhabazi
Copy link
Collaborator Author

@MauRiEEZZZ I think we can close this issue?

@MauRiEEZZZ
Copy link

MauRiEEZZZ commented Sep 10, 2019 via email

@pkhabazi
Copy link
Collaborator Author

Closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants