---
title: Gets all IPsec Rules Currently in the Active Store
slug: homologacao-atmosphere/gets-all-ipsec-rules-currently-in-the-active-store
description: Learn how to retrieve an IPsec rule from a target computer using a PowerShell command with this comprehensive document. It covers the command's parameters, offers a step-by-step example, and provides detailed information on the values returned, including 
createdAt: 2022-07-25T17:44:40.000Z
---

## Resumo

- Obtém uma regra IPsec do computador de destino.

## Parâmetros

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

## Exemplos

```yaml
- name: Gets all IPsec rules currently in the active store
  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 -PolicyStore ActiveStore
  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            |

