PowerShell Code Use PowerShell to see if ports are open to a remote server. Living in a zero trust environment can be challenging. Here is some code that I have been using to test for open ports from a Windows server to any type of destination. Just change PortNumber and Destination for your use case. $PortNumber = '443' $Destination = 'Server.vCrocs.info' $socket = New-Object Net.Sockets.TcpClient $socket.Connect($Destination,$PortNumber) if($socket.Connected){ $PortOpened = 'Port: ' + $PortNumber + ' to ' + $Destination +' is Open!

Continue reading

NSX PowerCLI Code Some basic PowerCLI commands with NSX Included some examples of code to Automate adding/removing NSX Security Tags from VMs. Show Security TAGs. Show Security TAGs assigned to a specific VM. Hope you find these snippets of code useful. # Need to install PowerShell Module PowerNSX # Connect to vCenter $vCenterName = 'vCenter.vCrocs.info' Connect-VIServer $vCenterName -Credential $cred # Connect to NSX Server Connect-NsxServer -vCenterServer 'vCenter.vCrocs.info' -Credential $cred # Show all Security Tags Get-NsxSecurityTag | Select-Object Name | Sort-Object Name # Info about one specific Security TAG Get-NsxSecurityTag -Name NSX.

Continue reading

Author's picture

Dale Hassinger

Sharing Content with the vCommunity and anyone else that finds my content interesting…

Lead Systems Engineer - SME

Dillsburg, PA