The summary of ‘How to change time-zones for a domain using PowerShell script | Windows Server 2019’

This summary of the video was created by an AI. It might contain some inaccuracies.

00:00:0000:07:16

The video provides a step-by-step tutorial on creating and deploying a PowerShell script to change the time zone settings on domain-connected computers remotely. Initially, the viewer is guided on verifying the Windows Remote Management service status and preparing a list of target computers in a `computers.txt` file. The script involves defining variables, setting time zones using the `passthrough` parameter for output display, handling credentials securely, and saving the script as a `.ps1` file. After execution, successful changes are confirmed with visual output. The presenter highlights the importance of practicing IT skills through home labs, motivated by common workplace issues faced by IT professionals, and encourages continuous learning and skill enhancement.

00:00:00

In this part of the video, the creator demonstrates how to create a PowerShell script to change the time zone on a computer that is connected to a domain. The objective is to remotely ensure all domain-connected computers have the correct time zone and time server settings. The process begins by verifying that the Windows Remote Management service is running on the target computer. The service is confirmed to be in manual mode, but it could be set to automatic for regular use.

Next, the computer’s name is noted for use in the script, which will be executed from a server. A `computers.txt` file is created containing the name of the computer. The script itself is simple and starts by pulling the computer names from the `computers.txt` file into a variable. The file path is specified by copying the directory path where the text file is saved.

00:03:00

In this part of the video, the speaker demonstrates how to define variables and execute commands on multiple computers listed in a text file using PowerShell. They start by invoking a command that targets each computer. The discussion includes running a command to list available time zones and picking one to set as a variable. They explain the use of the `passthrough` parameter to display output, how to use credentials for security, and saving the script as a `.ps1` file. After running the script, a dialog prompts for username and password, and successful execution is confirmed with output indicating the command ran successfully on the target computer.

00:06:00

In this part of the video, the presenter demonstrates verifying the computer’s time zone settings after making changes and confirms the connection to the correct time server. They explain the motivation behind creating the script and setting up the lab, which stemmed from hearing about issues IT professionals face at their workplace. The presenter emphasizes the importance of practicing IT skills at home and encourages continuous learning. The segment concludes by recommending that viewers set up their own labs to enhance their learning experience.

Scroll to Top