Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Created June 19, 2017 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guitarrapc/ba2fe8a7162453e61705f91e39c5772b to your computer and use it in GitHub Desktop.
Save guitarrapc/ba2fe8a7162453e61705f91e39c5772b to your computer and use it in GitHub Desktop.
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