< Back
Get-TimeZone
Post
NAME Get-TimeZone
SYNOPSIS
Gets the current time zone or a list of available time zones.
SYNTAX
Get-TimeZone -Id <String[]> [<CommonParameters>]
Get-TimeZone -ListAvailable [<CommonParameters>]
Get-TimeZone [[-Name] <String[]>] [<CommonParameters>]
DESCRIPTION
The Get-TimeZone cmdlet gets the current time zone or a list of available time zones.
PARAMETERS
-Id <String[]>
Specifies, as a string array, the ID or IDs of the time zones that this cmdlet gets.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ListAvailable [<SwitchParameter>]
Indicates that this cmdlet gets all available time zones.
Required? true
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Name <String[]>
Specifies, as a string array, the name or names of the time zones that this cmdlet gets.
Required? false
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String[]
OUTPUTS
System.TimeZoneInfo[]
NOTES
Example 1: Get the current time zone
PS C:\\>Get-TimeZone
Pacific Standard Time
This command gets the current time zone.
Example 2: Get time zones that match a specified string
PS C:\\>Get-TimeZone -Name "*pac*"
Pacific Standard Time (Mexico)
(UTC-08:00) Pacific Time (US & Canada)
Pacific Standard Time
SA Pacific Standard Time
Pacific SA Standard Time
West Pacific Standard Time
Central Pacific Standard Time
This command gets all time zones that match the specified wildcard.
Example 3: Get all available time zones
PS C:\\>Get-TimeZone -ListAvailable
This command gets all available time zones.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=799468
Set-TimeZone
SYNOPSIS
Gets the current time zone or a list of available time zones.
SYNTAX
Get-TimeZone -Id <String[]> [<CommonParameters>]
Get-TimeZone -ListAvailable [<CommonParameters>]
Get-TimeZone [[-Name] <String[]>] [<CommonParameters>]
DESCRIPTION
The Get-TimeZone cmdlet gets the current time zone or a list of available time zones.
PARAMETERS
-Id <String[]>
Specifies, as a string array, the ID or IDs of the time zones that this cmdlet gets.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ListAvailable [<SwitchParameter>]
Indicates that this cmdlet gets all available time zones.
Required? true
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Name <String[]>
Specifies, as a string array, the name or names of the time zones that this cmdlet gets.
Required? false
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String[]
OUTPUTS
System.TimeZoneInfo[]
NOTES
Example 1: Get the current time zone
PS C:\\>Get-TimeZone
Pacific Standard Time
This command gets the current time zone.
Example 2: Get time zones that match a specified string
PS C:\\>Get-TimeZone -Name "*pac*"
Pacific Standard Time (Mexico)
(UTC-08:00) Pacific Time (US & Canada)
Pacific Standard Time
SA Pacific Standard Time
Pacific SA Standard Time
West Pacific Standard Time
Central Pacific Standard Time
This command gets all time zones that match the specified wildcard.
Example 3: Get all available time zones
PS C:\\>Get-TimeZone -ListAvailable
This command gets all available time zones.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkId=799468
Set-TimeZone