Member_2_7966113
asked on
How to Powershell Script
Hello Experts,
The attached Powershell script was designed to allow me to see ports that are allowed through a firewall, plus a whole bunch of output. However, when I issue the command Get-RetmoteFirewallStatus the only output I get is True. Can someone let me know what I need to do to get all the other information?
Regards
Get-RemoteFirewallStatus.txt
The attached Powershell script was designed to allow me to see ports that are allowed through a firewall, plus a whole bunch of output. However, when I issue the command Get-RetmoteFirewallStatus the only output I get is True. Can someone let me know what I need to do to get all the other information?
Regards
Get-RemoteFirewallStatus.txt
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
OK, so issued the command:
(Get-RemoteFirewallStatus) .Rules | where {$_.Active -eq 'TRUE'} | Select Name,Dir
Is that what you referring to?
Cheers
OK, so issued the command:
(Get-RemoteFirewallStatus)
Is that what you referring to?
Cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys
The script as posted only defines a function "Get-RemoteFirewallStatus"
You can now either "dot-source" the script, so that the function Get-RemoteFirewallStatus is available in the PS session afterwards:
Open in new window
Or you comment out the very first two lines ("Function Get-RemoteFirewallStatus",Open in new window
Then you can process the output further:Open in new window
Open in new window