Set-TimeZone

Set the system time zone to a specific time zone.

Syntax
      Set-TimeZone [-Confirm] -Id String [-PassThru] [-WhatIf] [CommonParameters]

      Set-TimeZone [-InputObject] TimeZoneInfo [-Confirm] [-PassThru] [-WhatIf] [CommonParameters]

      Set-TimeZone [-Name] String [-Confirm] [-PassThru] [-WhatIf] [CommonParameters]

Key

   -Id          The ID of the time zone to set.

   -InputObject A TimeZoneInfo object to use as input.

   -Name        The name of a time zone to set.

   -Confirm     Prompt for confirmation before running the cmdlet.

   -PassThru    Return an object representing the item with which you are working.
                By default, this cmdlet does not generate any output.

   -WhatIf      Show what would happen if the cmdlet was run. The cmdlet is not run.

Standard Aliases for Set-TimeZone: stz

Examples

Set the time zone on the computer:

PS C:\> Set-TimeZone -Name "Pacific Standard Time"

“The time to be happy is now, The place to be happy is here,
  The way to be happy is to make others so. Wisdom is the science of happiness.” ~ Robert G. Ingersoll

Related PowerShell Cmdlets:

Get-TimeZone - Get the current time zone or a list of available time zones.


 
Copyright © 1999-2021 SS64.com
Some rights reserved