• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

Firewall

One-Liner Wednesday January 25, 2023

January 25, 2023 by ClaytonT Leave a Comment

Today’s one-liner is one that you or may not have to use a lot depending how your environment is setup and how you setup computers. Either way, its great to have it so you don’t have to go digging for it in the GUI. Ever had a time when you are trying to connect to a computer, and can’t? You make sure the computer is connected to the right wifi or that it is wired in, has the right IP address, and has internet… but nothing seems to work. Then you turn off your firewall and you can ping it… you know you can’t leave the firewall off all the time. What to do?

Set-NetFirewallRule -DisplayName "File and Printer Sharing (Echo Request - ICMPv4-In)" -Enabled True

There is your answer. That simple one line of code enables pinging without turning off your whole firewall. You can do this in group policy or add it to your golden image for imaging computers.

Hope this helps and saves time you prepping computers!

Tagged With: Automation, Firewall, One Liner Wednesday, PowerShell

Primary Sidebar

Clayton Tyger

Tech enthusiast dad who has lost 100lbs and now sometimes has crazy running/biking ideas. Read More…

Find Me On

  • Email
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Recent Posts

  • One-Liner Wednesday January 25, 2023
  • Module Monday January 23, 2023
  • One-Liner Wednesday January 18, 2023
  • Module Monday January 16, 2023
  • Read-Only Friday January 13, 2023

Categories

  • 365
  • Active Directory
  • Cim
  • Dashboards
  • Documentation
  • Get-WMI
  • Learning
  • Module Monday
  • Nutanix
  • One Liner Wednesday
  • Passwords
  • PDF
  • PowerShell
  • Read-Only Friday
  • Reporting
  • Security
  • Windows
  • WSUS

© 2023 Clatent