Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Configuration SetTimeZone
{
Param
(
[String[]]$NodeName = $env:COMPUTERNAME,
[Parameter(Mandatory = $true)]
[ValidateNotNullorEmpty()]
[String]$SystemTimeZone
)
Import-DSCResource -ModuleName xTimeZone
Node $NodeName
{
xTimeZone TimeZoneExample
{
IsSingleInstance = 'Yes'
TimeZone = $SystemTimeZone
}
}
}
SetTimeZone -NodeName "localhost" -SystemTimeZone "Tokyo Standard Time"
Start-DscConfiguration -Path .\SetTimeZone -Wait -Verbose -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment