---
title: Delete Firewall Rules by Name
slug: homologacao-atmosphere/delete-firewall-rules-by-name
description: Learn how to efficiently delete firewall rules with this comprehensive document. It covers the script's parameters, usage examples, and the values it returns. Powered by the PowerShell Command module, this script simplifies the process of removing firewal
createdAt: 2022-07-25T17:44:44.000Z
---

## Resumo

- Exclui as regras de firewall que correspondem aos critérios especificados.

## Parâmetros

| **Parâmetro**                                                                                                                                                                                                                                                                                     | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| display\_name<br />string<br />- Any ***(default)***<br />- Domain<br />- NotApplicable<br />- Public<br />- Private<br />Service Group a ser filtrado.<br />string<br />- Any ***(default)***<br />- Domain<br />- NotApplicable<br />- Public<br />- Private<br />Service Group a ser filtrado. | string   |                              | Nome da rule.<br /><br />string<br />- Any ***(default)***<br />- Domain<br />- NotApplicable<br />- Public<br />- Private<br />Service Group a ser filtrado. |

Utiliza parâmetros do módulo [Powershell Command](https://docs.simonops.com/homologacao-atmosphere/powershell-command).

## Exemplos

```yaml
- name: Delete All Firewall Rules
  powershell_command:
    server: "{{ input.server }}"
		ssl: "{{ input.ssl }}"
    username: "{{ input.username }}"
    password: "{{ input.password }}"
		show_errors: "{{ input.show_errors }}"
		show_warnings: "{{ input.show_warnings }}"
    command: |
      Remove-NetFirewallRule -DisplayName "{{ input.display_name }}"
  register: result
  - debug:
    msg: |
      {{ result.output }}
      {{ result.had_errors }}
      {{ result.output_errors }}
      {{ result.output_warnings }}


```

## Valores retornados

| **Chave**        | **Tipo** | **Retornado quando** | **Descrição**              |
| ---------------- | -------- | -------------------- | -------------------------- |
| output           | string   | Sempre               | Saída da execução          |
| had\_errors      | boolean  | Sempre               | Se teve erros              |
| output\_errors   | string   | Sempre               | Erros de saída da execução |
| output\_warnings | string   | Sempre               | Avisos de saída            |

