Advertisement
guyrleech

Get firewall status of computers in a text file

Aug 17th, 2020
732
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Computers.txt is a text file with one computer name per line
  2. Get-Content -Path .\computers.txt | ForEach-Object { Invoke-Command -ComputerName $_ -ScriptBlock { Get-NetFirewallProfile } } | Select-Object -Property PSComputerName,Name,Enabled | Format-Table -Autosize
  3.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement