Scripts

Testing TCP Port

Sometimes I just want to see if a server has a port open, I use this rather often in Skype for Business when dealing with firewalls.  It is pretty straight forward New-Object System.Net.Sockets.TCPClient -ArgumentList “FQDN|IP”,PORT

Scripts

Getting Certificate Information

I spend a lot of time doing Certficate stuff.  So here are two one liners to help.  The first is a generic script.  you can modify it pretty easy to do alerting or whatever.  the second is specific to Skype for Business Get-ChildItem -recurse -path cert:\localmachine\my | select Issuer,NotAfter,NotBefore,SerialNumber,Subject,Thumbprint,@{N=”DNSNameList”;e={$_.DNSNameList}} | export-csv c:\source\certs2.csv -NoTypeInformation Get-CsCertificate | select *,@{n=”SAN”;e={$_.AlternativeNames}} | export-csv c:\source\certs.csv…

Continue Reading