When working in a Zero Trust Environment and programs are not working the way they should it is nice to have some Tools available to do troubleshooting. When new applications are installed and not working you can be asking yourself is it my issue with the application or is the firewall blocking ports. I recently had a support call with VMware and they showed me two commands that work awesome to test to see if ports are open to a destination IP on a specific port.
PowerShell Code There are two PowerCLI commands that have become my best friends in a Zero Trust Environment. Invoke-VMScript - Use to run scripts on VMs. Copy-VMGuestFile - Use to copy files to/from VMs. In this example you can use Invoke-VMScript to run commands on a VM to install Trend Deep Security. All commands run with VM in a zero trust state. $VMName = 'VM Name' #Copy file to the VM $PSText = 'wget https://server01.
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.