---
title: Gets all the IPsec Rules Associated to a Specified Group
slug: homologacao-atmosphere/gets-all-the-ipsec-rules-associated-to-a-specified-group
description: Learn how to retrieve all IPsec rules for a specific group using PowerShell Command with this comprehensive document. It covers the necessary parameters, offers practical command usage examples, and outlines the returned values, including output, errors, 
createdAt: 2022-07-26T13:14:16.000Z
---

## Resumo

- Este exemplo obtém todas as regras IPsec associadas a um grupo especificado.

## Parâmetros

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

| **Parâmetro**                                                                                                                                                                                                                                                                                      | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**                                                                                                                                                          |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| display\_group<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 do grupo de regras.<br /><br />string<br />- Any ***(default)***<br />- Domain<br />- NotApplicable<br />- Public<br />- Private<br />Service Group a ser filtrado. |

## Exemplos

```yaml
- name: Gets all the IPsec rules associated to a specified group
  powershell_command:
    server: "{{ input.server }}"
		port: "{{ input.port }}"
		ssl: "{{ input.ssl }}"
    username: "{{ input.username }}"
    password: "{{ input.password }}"
		show_errors: "{{ input.show_errors }}"
		show_warnings: "{{ input.show_warnings }}"
    command: |
      Get-NetIPsecRule -DisplayGroup "{{ input.display_group }}"
  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            |

