Skip to content

Commit

Permalink
Add remoteshell detection
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianNiesen committed Sep 30, 2024
1 parent 21792a5 commit 54f1013
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Network/Check-Network.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ param (
[string]$DNSDomain = (Get-DnsClientGlobalSetting).SuffixSearchList[0],
[string]$logpath = "C:\Windows\System32\LogFiles"
)
if ($Host.Name -eq "ServerRemoteHost") { Write-Error -Exception "RemoteShell detected" -Message "Please use local PowerShell, remote PowerShell Sessions are not supported" ; break }

#region EVOTec Test LDAP
#Code for this region from https://evotec.xyz/testing-ldap-and-ldaps-connectivity-with-powershell/ under MIT license
#GitHub: https://github.com/EvotecIT/ADEssentials
Expand Down

0 comments on commit 54f1013

Please sign in to comment.