Useful Commands - Pt 3.

Useful Commands - Pt 3.

In this installment of useful commands we will look at checking SSLBindings, viewing installed software and checking Exchange Transport Rule update times.

Command 5

Recently while working on a issue where IIS certificate bindings were getting reset on Exchange. When working on a single server this isn't too hard but when you need to check multiple servers it becomes quite time consuming. As an alternative you can use the netsh command to query the current IIS certificate bindings as follows:

netsh http show sslcert ipport=0.0.0.0:443

The above command shows the currently bound certificate on IIS for port 443:
SSLBindings output

More details can be on the netsh command here and the specific help for the show sslcert parameters can be found here.

Command 6

Another task that I've found tedious if verifying what versions of software are installed on a given machine. You can easily query all software installed on a Windows machine using the following command block:

Get-WmiObject -Class Win32_Product | select Name, Version | sort Name | ft

The above command gives you the following output:
Installed-1
The results can be filtered as follows:

Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "*Microsoft*"} | select Name, Version | sort Name | ft

This gives you only the results for software that contains Microsoft in the name:
Installed-2

Command 7

When working in Exchange On-line or Exchange On-line Protection it is important to understand that updates to Exchange Transport Rules (ETRs) do not immediately take effect. Changes that are made must replicate out across the environment which typically takes 15 minutes but sometimes can take up to 60 minutes. Through PowerShell it is possible to add a calculated column that shows how much time has passed since a given rule was updated as follows:

Get-TransportRule | Select-Object Name, WhenChanged, @{Name = 'TimeSinceChange'; Expression = {(Get-Date) - $_.WhenChanged}}

This gives you the following output:
ETR-1

In the TimeSinceChange column the format is as follows DD.HH.MM.SS.sssssss.