Relative Content

Tag Archive for powershellloggingrestart

PowerShell log outputs wrong info

This is a follow-up to a previous question I posted (PowerShell output log showing incorrect information). I’m in the process of modifying a script written by a previous employee, the main purpose of which is for restarting specific servers, from a txt file. The issue is, while it seems to be restarting servers without issue, it seems to mess up when writing the output log. Here’s what I have for the actual restart portion currently:

PowerShell output log has wrong info

This is a follow-up to a previous question I posted (PowerShell output log showing incorrect information). I’m in the process of modifying a script written by a previous employee, the main purpose of which is for restarting specific servers, from a txt file. The issue is, while it seems to be restarting servers without issue, it seems to mess up when writing the output log. Here’s what I have for the actual restart portion currently:

PowerShell output log showing incorrect information

I’m currently modifying a script written by a previous employee, and the main purpose of the script is to restart some servers. Currently, the portion of the script that actually goes through the restarts looks like this: