Skip to content

Commit

Permalink
Merge branch 'TS-Script' of https://github.com/zeronetworks/Community
Browse files Browse the repository at this point in the history
…into TS-Script
  • Loading branch information
Ken Ward committed Dec 7, 2023
2 parents 2430fc9 + fe78ce8 commit 457c48c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ If you have a script you would like to share to the community or improvements on
- Once the pull request is approved and merged you can pull the changes from `upstream` to your local repo.

<br><br>
![generated_image](https://img.shields.io/badge/generated%20date-12/02/2023%2014:34:46-blue)
![generated_image](https://img.shields.io/badge/generated%20date-12/07/2023%2021:02:28-blue)
16 changes: 8 additions & 8 deletions Segment/Troubleshooting/ZN_Troubleshooter_v02.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.AUTHOR [email protected]
.VERSION 2.0
.Synopsis
This scripts purpose is to help quickly troubleshoot common scenarios related to issues on the Trust Server or monitored/protected assets
This scripts purpose is to help quickly troubleshoot common scenarios related to issues on the Segmentation Server or monitored/protected assets
.DESCRIPTION
This script does the following
Expand Down Expand Up @@ -214,15 +214,15 @@ function Check-GPOConflict {
if($p.value) {$filtered += $p}
}
}
$filtered | Format-Table
$filtered | Format-Table | Out-File -FilePath $LogFilePath -Append

}

function Check-Comms2Segment {
$fwRule = Get-NetFirewallRule -PolicyStore ActiveStore | Where-Object {$_.DisplayName -eq "ZNRemoteAccess"} | Select *, @{ N="Trust Servers"; Expression={($_ | Get-NetFirewallAddressFilter).RemoteAddress}}
$fwRule = $fwRule | Select-Object DisplayName, Enabled, Profile, Direction, Action, "Trust Servers"
$trustServers = ForEach ($server in $fwRule."Trust Servers") {
## Reverse lookup trust server IP
$fwRule = Get-NetFirewallRule -PolicyStore ActiveStore | Where-Object {$_.DisplayName -eq "ZNRemoteAccess"} | Select-Object *, @{ N="Segmentation Servers"; Expression={($_ | Get-NetFirewallAddressFilter).RemoteAddress}}
$fwRule = $fwRule | Select-Object DisplayName, Enabled, Profile, Direction, Action, "Segmentation Servers"
$trustServers = ForEach ($server in $fwRule."Segmentation Servers") {
## Reverse lookup segmentation server IP
Try {
$resolvedName = (Resolve-DnsName $server -ErrorAction Ignore).NameHost
}
Expand All @@ -240,9 +240,9 @@ function Check-Comms2Segment {

$_ | Add-Member -MemberType NoteProperty -Name "Port" -value $sslCheck.Port -Force
$_ | Add-Member -MemberType NoteProperty -Name "Protocol" -value $sslCheck.Protocol -Force
$_ | Add-Member -MemberType NoteProperty -Name "Connectivity To Trust Server" -value $(if ($sslCheck.Result) {"Success"} else {"Failed"}) -Force
$_ | Add-Member -MemberType NoteProperty -Name "Connectivity To Segmentation Server" -value $(if ($sslCheck.Result) {"Success"} else {"Failed"}) -Force
}
$trustServers | FT
$trustServers | Format-Table | Out-File -FilePath $LogFilePath -Append

}

Expand Down

0 comments on commit 457c48c

Please sign in to comment.