-
Notifications
You must be signed in to change notification settings - Fork 83
TimeZone
dscbot edited this page Dec 11, 2022
·
10 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
IsSingleInstance | Key | String | Specifies the resource is a single instance, the value must be 'Yes'. | Yes |
TimeZone | Required | String | Specifies the TimeZone. |
The resource will use the Get-TimeZone
cmdlet to get the current
time zone. If Get-TimeZone
is not available them CIM will be used to retrieve
the current time zone. To update the time zone, .NET reflection will be used to
update the time zone if required. If .NET reflection is not supported on the node
(in the case of Nano Server) then tzutil.exe will be used to set the time zone.
This example sets the current time zone on the node to 'Tonga Standard Time'.
Configuration TimeZone_SetTimeZone_Config
{
Import-DSCResource -ModuleName ComputerManagementDsc
Node localhost
{
TimeZone TimeZoneExample
{
IsSingleInstance = 'Yes'
TimeZone = 'Tonga Standard Time'
}
}
}
- Computer
- IEEnhancedSecurityConfiguration
- OfflineDomainJoin
- PendingReboot
- PowerPlan
- PowerShellExecutionPolicy
- PSResourceRepository
- RemoteDesktopAdmin
- ScheduledTask
- SmbServerConfiguration
- SmbShare
- SystemLocale
- SystemProtection
- SystemRestorePoint
- TimeZone
- UserAccountControl
- VirtualMemory
- WindowsCapability
- WindowsEventLog