Created
June 19, 2017 18:13
-
-
Save guitarrapc/ba2fe8a7162453e61705f91e39c5772b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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