---
title: Retrieves Security Filter of Especific Rule
slug: homologacao-atmosphere/retrieves-security-filter-of-especific-rule
description: Learn how to use a PowerShell command to effortlessly retrieve all firewall rules with a public profile scope. This comprehensive document covers the necessary parameters for filtering results and utilizes the powerful PowerShell Command module. Discover 
createdAt: 2022-07-25T17:44:39.000Z
---

## Resumo

- Recupera todas as regras de firewall com escopo para o perfil público.

## 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   | - Any ***(default)***<br />- Domain<br />- NotApplicable<br />- Public<br />- Private | Escopo a ser filtrado.<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
tasks:
  powershell_command:
    server: "{{ server }}"
    port: "{{ input.port }}"
		ssl: "{{ input.ssl }}"
    username: "{{ username }}"
    password: "{{ password }}"
    show_errors: true
		show_warnings: true
    command: |
      Get-NetFirewallRule -DisplayName "{{ input.display_name }}" | Get-NetFirewallSecurityFilter | ConvertTo-Json
  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            |

