O'Reilly logo

Mastering PowerCLI by Sajal Debnath

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring a firewall and services in an ESXi host

Configuring a firewall in any environment is one of the main security configurations that anyone does. To configure a firewall in a vSphere environment, we can use the following cmdlets:

  • Get-VMHostFirewallDefaultPolicy
  • Set-VMHostFirewallDefaultPolicy
  • Get-VMHostFirewallException
  • Set-VMHostFirewallException

Also, we can use the following cmdlets to manage the services in an ESXi host:

  • Get-VMHostService
  • Restart-VMHostService
  • Set-VMHostService
  • Start-VMHostService
  • Stop-VMHostService

We will start with the firewall cmdlets, and then we will take a look at the services that control the cmdlets.

We can get a list and status of the services in an ESXi server using the Get-VMHostFirewallException cmdlet:

We can get ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required