-
Notifications
You must be signed in to change notification settings - Fork 48
Windows settings time #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
81541a8
b180c3a
51c2b63
83eb7a0
55b01a5
c3847d2
251d306
0f14f9d
b8dd560
323d624
0ba034a
7ba6a69
81b64c3
059b59b
4541bb4
102c763
657e834
5a06f85
f8270f7
5f01ee2
514868e
d74c29d
506a589
38a6184
e7a48b8
e609482
48877f6
41914ef
ba97203
8e9c8c5
d816dc3
cd15ed2
6370252
8539290
fec4047
3bf7d6b
7ed2c35
e7262b2
6dfddf3
8d8ad12
1fbe8e2
872574f
70fae5c
77cc13d
5210dd3
a00ec3e
35badfd
b115da5
ab6e2ec
85e10ef
7644177
ea7b053
fb5339a
cc1637b
671a63e
213d157
5084eb4
007bc8d
bccf27c
7d2ae98
3548d89
c2dad49
b5f0eb8
867a6b4
d31ed8a
0ac57aa
8b35f25
40ebfeb
44d7ecd
edb3dcc
8c48fd3
65bbcf1
7af2f5e
c83e56a
3f47882
0e02a99
1c6bc34
02fba3f
9be2b65
7be6cfe
96ce50d
1e577ee
75cbef0
9d0b2d0
503fe50
18feb8e
94613f4
686088e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| external help file: Microsoft.Windows.Setting.Time.psm1-Help.xml | ||
| Module Name: Microsoft.Windows.Setting.Time | ||
| ms.date: 05/11/2024 | ||
| online version: | ||
| schema: 2.0.0 | ||
| title: Time | ||
| --- | ||
|
|
||
| # Time | ||
|
|
||
| ## SYNOPSIS | ||
|
|
||
| This `Time` DSC Resource allows you to manage the time zone, automatic time zone update, and system tray date/time visibility settings on a Windows machine. | ||
|
|
||
| ## DESCRIPTION | ||
|
|
||
| This `Time` DSC Resource allows you to manage the time zone, automatic time zone update, and system tray date/time visibility settings on a Windows machine. | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| | **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** | | ||
| | -------------------------- | ------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | | ||
| | `TimeZone` | Key | String | Specifies the time zone to set on the machine. | Any valid time zone identifier from `Get-TimeZone -ListAvailable` | | ||
| | `SetTimeZoneAutomatically` | Optional | Boolean | The method to use to set the time zone automatically. The value should be either `NTP` or `NoSync`. The default value is `NTP`. | `NTP`, `NoSync` | | ||
| | `ShowSystemTrayClock` | Optional | Boolean | Whether to show the date and time in the system tray. The value should be a boolean. The default value is `$true`. | `$true`, `$false` | | ||
|
|
||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### EXAMPLE 1 | ||
|
|
||
| ```powershell | ||
| Invoke-DscResource -Name Time -Method Set -Property @{ TimeZone = "Pacific Standard Time"; SetTimeZoneAutomatically = "NTP"; ShowSystemTrayDateTime = $true } | ||
|
|
||
| # This example sets the time zone to Pacific Standard Time, sets the time zone to be updated automatically using NTP, and shows the date and time in the system tray. | ||
| ``` | ||
|
|
||
| ### EXAMPLE 2 | ||
|
|
||
| ```powershell | ||
| Invoke-DscResource -Name Time -Method Get -Property {} | ||
|
|
||
| # This example gets the current time settings on the machine. | ||
| ``` | ||
|
|
||
| ### EXAMPLE 3 | ||
|
|
||
| ```powershell | ||
| Invoke-DscResource -Name Time -Method Test -Property @{ TimeZone = "Pacific Standard Time"} | ||
|
|
||
| # This example tests whether the time zone is set to Pacific Standard Time. | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,131 @@ | ||
| # | ||
| # Module manifest for module 'Microsoft.Windows.Setting.Time' | ||
| # | ||
| # Generated by: Microsoft Corporation | ||
| # | ||
| # Generated on: 05/11/2024 | ||
| # | ||
|
|
||
| @{ | ||
|
|
||
| # Script module or binary module file associated with this manifest. | ||
| RootModule = 'Microsoft.Windows.Setting.Time.psm1' | ||
|
|
||
| # Version number of this module. | ||
| ModuleVersion = '0.1.0' | ||
|
|
||
| # Supported PSEditions | ||
| # CompatiblePSEditions = @() | ||
|
|
||
| # ID used to uniquely identify this module | ||
| GUID = '6a947f86-eb17-46a4-9b0d-9f757b19c29a' | ||
|
|
||
| # Author of this module | ||
| Author = 'Microsoft Corporation' | ||
|
|
||
| # Company or vendor of this module | ||
| CompanyName = 'Microsoft Corporation' | ||
|
|
||
| # Copyright statement for this module | ||
| Copyright = '(c) Microsoft Corporation. All rights reserved.' | ||
|
|
||
| # Description of the functionality provided by this module | ||
| Description = 'DSC Resource for Windows Time Settings' | ||
|
|
||
| # Minimum version of the PowerShell engine required by this module | ||
| PowerShellVersion = '7.2' | ||
|
|
||
| # Name of the PowerShell host required by this module | ||
| # PowerShellHostName = '' | ||
|
|
||
| # Minimum version of the PowerShell host required by this module | ||
| # PowerShellHostVersion = '' | ||
|
|
||
| # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. | ||
| # DotNetFrameworkVersion = '' | ||
|
|
||
| # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. | ||
| # ClrVersion = '' | ||
|
|
||
| # Processor architecture (None, X86, Amd64) required by this module | ||
| # ProcessorArchitecture = '' | ||
|
|
||
| # Modules that must be imported into the global environment prior to importing this module | ||
| # RequiredModules = @() | ||
|
|
||
| # Assemblies that must be loaded prior to importing this module | ||
| # RequiredAssemblies = @() | ||
|
|
||
| # Script files (.ps1) that are run in the caller's environment prior to importing this module. | ||
| # ScriptsToProcess = @() | ||
|
|
||
| # Type files (.ps1xml) to be loaded when importing this module | ||
| # TypesToProcess = @() | ||
|
|
||
| # Format files (.ps1xml) to be loaded when importing this module | ||
| # FormatsToProcess = @() | ||
|
|
||
| # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess | ||
| # NestedModules = @() | ||
|
|
||
| # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. | ||
| FunctionsToExport = '*' | ||
|
|
||
| # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. | ||
| CmdletsToExport = '*' | ||
|
|
||
| # Variables to export from this module | ||
| VariablesToExport = '*' | ||
|
|
||
| # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. | ||
| AliasesToExport = '*' | ||
|
|
||
| # DSC resources to export from this module | ||
| DscResourcesToExport = @('Time') | ||
|
||
|
|
||
| # List of all modules packaged with this module | ||
| # ModuleList = @() | ||
|
|
||
| # List of all files packaged with this module | ||
| # FileList = @() | ||
|
|
||
| # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. | ||
| PrivateData = @{ | ||
|
|
||
| PSData = @{ | ||
|
|
||
| # Tags applied to this module. These help with module discovery in online galleries. | ||
| Tags = @('PSDscResource_Time') | ||
|
|
||
| # A URL to the license for this module. | ||
| LicenseUri = 'https://github.com/microsoft/winget-dsc/blob/main/LICENSE' | ||
|
|
||
| # A URL to the main website for this project. | ||
| ProjectUri = 'https://github.com/microsoft/winget-dsc' | ||
|
|
||
| # A URL to an icon representing this module. | ||
| # IconUri = '' | ||
|
|
||
| # ReleaseNotes of this module | ||
| # ReleaseNotes = '' | ||
|
|
||
| # Prerelease string of this module | ||
| Prerelease = 'alpha' | ||
|
|
||
| # Flag to indicate whether the module requires explicit user acceptance for install/update/save | ||
| # RequireLicenseAcceptance = $false | ||
|
|
||
| # External dependent modules of this module | ||
| # ExternalModuleDependencies = @() | ||
|
|
||
| } # End of PSData hashtable | ||
|
|
||
| } # End of PrivateData hashtable | ||
|
|
||
| # HelpInfo URI of this module | ||
| # HelpInfoURI = '' | ||
|
|
||
| # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. | ||
| # DefaultCommandPrefix = '' | ||
| } | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.