---
title: Retrieves security filter
slug: homologacao-atmosphere/retrieves-security-filter
description: Learn how to use a PowerShell command to retrieve security conditions linked to firewall rules in the active repository. This document offers a comprehensive summary, including details on executing the command without specifying a policy store for persist
createdAt: 2022-07-06T18:28:16.000Z
---

## Resumo

- Este exemplo recupera as condições de segurança associadas a todas as regras de firewall no repositório ativo. A execução desse cmdlet sem especificar o armazenamento de política recupera o armazenamento persistente.

## Parâmetros

| **Parâmetro**                                                                                                                                                                                                                                                                                     | **Tipo** | **Escolhas \| Valor Padrão**                                                                                                     | **Comentários**                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| policy\_store<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   | - PersistentStore<br />- ActiveStore<br />- RSOP<br />- SystemDefaults<br />- StaticServiceStore<br />- ConfigurableServiceStore | Especifica o armazenamento de política do qual recuperar as regras a serem recuperadas. Um repositório de políticas é um contêiner para a política de firewall e IPsec.<br /><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
tasks:
  powershell_command:
    server: "{{ server }}"
    port: "{{ input.port }}"
		ssl: "{{ input.ssl }}"
    username: "{{ username }}"
    password: "{{ password }}"
    show_errors: true
		show_warnings: true
    command: |
      Get-NetFirewallSecurityFilter {{ input.policy_store }} | Format-Table -Property * | 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            |

