---
title: Block any Wireless Nerwork Traffic In/Out
slug: homologacao-atmosphere/block-any-wireless-nerwork-traffic-inout
description: Learn how to use PowerShell cmdlets to create firewall rules that effectively block all wireless network traffic. This comprehensive document offers step-by-step instructions, including parameters for customizing the display name and direction of the rule
createdAt: 2022-07-06T18:27:41.000Z
---

## Resumo

- Este exemplo usa dois cmdlets para criar regras de firewall que bloqueiam todo o tráfego de rede sem fio.

## 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 dado a rule<br /><br />string<br />- Any ***(default)***<br />- Domain<br />- NotApplicable<br />- Public<br />- Private<br />Service Group a ser filtrado. |
| direction                                                                                                                                                                                                                                                                                         | string   | - Inbound<br />- Outbound    | Especifica que as regras de firewall correspondentes da direção indicada são criadas                                                                             |

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

## Exemplos

```yaml
- name: Block any Wireless Nerwork Traffic In/Out
  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: |
      New-NetFirewallRule -DisplayName "{{ input.display_name }}" -Direction {{ input.direction }} -InterfaceType Wireless -Action Block
  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            |

