Articles in the "Reboot script for Exchange environment" series
- Patch and reboot script for an entire Exchange environment, Part 1
- Patch and reboot script for an entire Exchange environment, Part 2
- Patch and reboot script for an entire Exchange environment, Part 3
- Patch and reboot script for an entire Exchange environment, Part 4
- Patch and reboot script updated to version 2.1 [This article]
- Patch and reboot script updated to v2.4
Last spring I started explaining my script for patching and rebooting all the Exchange servers in an enterprise. I got through four of the posts, but there were still plenty to go, based on the detail into which I was going. At that point I was kind of burned out, so I didn’t continue, but that doesn’t mean I haven’t continued tweaking the script since then. (If anyone has any interest in me going into the details of any part of the script, let me know in the comments and I will do so.)
Since version 1.3 was posted last spring, the script has been updated to version 2.1. The following is a list of new features and changes:
- Added an optional RebootOnly switch parameter if you want to skip the patching and just reboot the servers.
- Added an optional Environment parameter that takes a value of Production, DR, or All. This allows you to only process the servers in the respective environment. (The default is All.)
- Added an optional ComputerName parameter that lets yous specify one or more servers to process (instead of all or an environment). This is convenient if you want to just patch a small number of servers, regardless of their role. However, the role is taken into consideration when a server is actually processed.
- Added comment-based help, which includes a description, parameter definitions, and examples.
- Defined the new parameters in parameter sets so you can only indicate an environment or server names. The RebootOnly switch can be used with either.
- Renamed the server grouping variables so they are organized better.
- Added a function to validate server name(s) specified with the ComputerName parameter. They are validated against the list of servers defined in the server grouping variables.
- Moved the loading of the Exchange snap-in to a function and included graceful exit if being run on a system without the management tools installed.
- Removed a function to get the mounted database copies on a server since the database balancing function doesn’t use it anymore.
- Fixed detection of mailbox role group in the processing function so that DAG-related code actually runs.
- Added code to support the ComputerName parameter in order to determine the designated role of a server. In other words, if you specify individual servers to process, their roles needs to be determined so that they are correctly grouped.
The download below has been updated with the latest version.
Reboot-ExchangeServers.zip (7.5 KiB)