![]() If you are restarting a remote computer, you will most likely need the -Credential option, which specifies a user account that has permission to perform this action. If the -ComputerName parameter is not specified, Restart-Computer restarts the local computer. You can use the -ComputerName parameter even if your computer is not configured to run remote commands. This parameter is independent of PowerShell remoting. To specify the local computer, enter the computer name, period “. Restart-Computer accepts ComputerName objects from a pipeline or variables.Įnter the NetBIOS name, IP address, or fully qualified domain name of the remote computer. The -ComputerName option specifies a single computer name or an array of computer names separated by commas. Restart-Computer -ComputerName Server01, Server02, localhost Restart-Computer only works on Windows computers and requires WinRM and WMI to shut down the system, including the local one.Įxample of restarting multiple computers: This feature makes it practical to use Restart-Computer in scripts and functions. ![]() Specify the timeout and request interval and wait for certain services to be available on the rebooted computer. Starting with Windows PowerShell 3.0, you can wait until the reboot is complete before running the next command. ![]() You can use Restart-Computer with various parameters to trigger restart operations, to specify authentication levels and alternate credentials, to restrict operations to be performed simultaneously, and to restart immediately. The following command will reboot the local computer: The Restart-Computer cmdlet restarts the operating system on a local or remote computer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |