mirror of
https://github.com/Thumbscrew/PSWinFW.git
synced 2025-01-18 09:35:47 +00:00
Get-Help added.
This commit is contained in:
parent
8f1755a09a
commit
64964b3de4
@ -1,4 +1,45 @@
|
|||||||
function Get-PSFirewallLog {
|
function Get-PSFirewallLog {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
|
||||||
|
Retrieves Windows Firewall log events and returns them as a table.
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
|
||||||
|
Retrieves Windows Firewall log events and returns them as a table. Log path can be directly specified or automatically determined based on local or remote registry settings.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Get-PSFirewallLog -Path C:\Windows\system32\logfiles\firewall\pfirewall.log -Tail 1000
|
||||||
|
|
||||||
|
Get last 1000 Windows Firewall log lines at a specific path.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Get-PSFirewallLog -LogDirectory C:\Windows\system32\logfiles\firewall\ -LogFileName domainfw.log
|
||||||
|
|
||||||
|
Get Windows Firewall log by specifying the log directory and filename separately.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Get-PSFirewallLog -LogProfile Domain
|
||||||
|
|
||||||
|
Get Windows Firewall log by retrieving the path automatically from the registry on the local machine.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Get-PSFirewallLog -LogProfile Public -ComputerName MyRemoteComputer -Verbose
|
||||||
|
|
||||||
|
Get Windows Firewall log on a remote computer using the Remote Registry service to get the log path.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Get-PSFirewallLog -LogProfile Public -ComputerName MyRemoteComputer -InferPath
|
||||||
|
|
||||||
|
Get Windows Firewall log on a remote computer using the path configured in the local machine's registry (converted to a UNC path).
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
[CmdletBinding(DefaultParameterSetName = 'direct')]
|
[CmdletBinding(DefaultParameterSetName = 'direct')]
|
||||||
param (
|
param (
|
||||||
# Path to firewall log. Defaults to $ENV:SystemRoot\system32\LogFiles\Firewall\pfirewall.log if parameter not supplied.
|
# Path to firewall log. Defaults to $ENV:SystemRoot\system32\LogFiles\Firewall\pfirewall.log if parameter not supplied.
|
||||||
|
@ -1,4 +1,33 @@
|
|||||||
function Get-PSFirewallLogPath {
|
function Get-PSFirewallLogPath {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
|
||||||
|
Retrieves Windows Firewall log path for a given Profile.
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
|
||||||
|
Retrieves Windows Firewall log path for a local or remote machine for given Profile.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Get-PSFirewallLogPath -LogProfile Domain
|
||||||
|
|
||||||
|
Retrieves path of the specified profile's log from the local machine.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Get-PSFirewallLogPath -LogProfile Private -ComputerName MyRemoteComputer
|
||||||
|
|
||||||
|
Retrieves path of the specified profile's log from a remote machine using the Remote Regsitry service.
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
|
||||||
|
Get-PSFirewallLogPath -LogProfile Domain -ComputerName MyRemoteComputer -InferPath
|
||||||
|
|
||||||
|
Retrieves path of the specified profile's log from a remote machine using registry settings configured on the local machine.
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
param(
|
param(
|
||||||
# Log Profile to retrieve path for
|
# Log Profile to retrieve path for
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
|
Loading…
Reference in New Issue
Block a user