Related
Quick Links
PowerShell is an excellent tool for managing all things Windows.
It almost always starts a learning journey that only helps you to understand PowerShell even more.
Better yet, run against a list of multiple remote servers to do the same task?
You may have custom logging and things that are unique to how you debug PowerShell scripts.
A few things to get set up front
A few variables are needed to get started.
It would also be good to add to an existing log if you wrap your script with one.
Now we know which servers are online and they have the assets copied locally.
We are now ready to move forward.
We will pass this local variable into the remote command by utilizing the $Using: component.
This allows you to pass any local variables into the remote session and use accordingly.
We will be importing the certificate to the Personal (My) certificate store of the machine account.
You may have a phased rollout in which may cause you to want to enable this on specific servers.
This will now force all secure connections to your new binding with its associated certificate.
In summary, IIS doesn’t collect the X-Forwarded-For value.
It has to be setup as a custom value for IIS to grab and log.
I suggest testing the different commands for your desired parameters against one server.