Skip to content
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

Windows settings time #109

Open
wants to merge 76 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
81541a8
Add whatif support
Nov 2, 2024
b180c3a
Initial setup of Windows Setting Language
Gijsreyn Nov 4, 2024
51c2b63
Add examples
Gijsreyn Nov 4, 2024
83eb7a0
Update command to directly call language installer
Gijsreyn Nov 4, 2024
55b01a5
Update contribution
Gijsreyn Nov 4, 2024
c3847d2
Clarification
Gijsreyn Nov 4, 2024
251d306
Export test
Gijsreyn Nov 4, 2024
0f14f9d
Fix TODO
Gijsreyn Nov 4, 2024
b8dd560
Additional tip
Gijsreyn Nov 4, 2024
323d624
Initial module for Windows Update settings
Gijsreyn Nov 4, 2024
0ba034a
TODO task
Gijsreyn Nov 4, 2024
7ba6a69
Add assertions for delivery optimization
Gijsreyn Nov 4, 2024
81b64c3
Update the docs
Gijsreyn Nov 4, 2024
059b59b
Update table values
Gijsreyn Nov 4, 2024
4541bb4
Remove duplicate code
Gijsreyn Nov 4, 2024
102c763
Add whatif tests
Gijsreyn Nov 5, 2024
657e834
Merge branch 'main' into whatif-support
Gijsreyn Nov 5, 2024
5a06f85
Merge branch 'main' into windows-update-setting
Gijsreyn Nov 5, 2024
f8270f7
Small typo in docs
Gijsreyn Nov 5, 2024
5f01ee2
Initial setup for Microsoft.Windows.Setting.Time
Gijsreyn Nov 5, 2024
514868e
Fix up on validateset
Gijsreyn Nov 5, 2024
d74c29d
Merge branch 'main' into windows-setting-time
Gijsreyn Nov 5, 2024
506a589
Include Pester tests
Gijsreyn Nov 5, 2024
38a6184
Resolve remarks @Trenly
Gijsreyn Nov 5, 2024
e7a48b8
Merge branch 'main' into windows-settings-language
Gijsreyn Nov 5, 2024
e609482
Fix PSScriptAnalyzer rules
Gijsreyn Nov 5, 2024
48877f6
Comments
Gijsreyn Nov 5, 2024
41914ef
Resolve comments from Trenly
Nov 5, 2024
ba97203
Merge branch 'main' of https://github.com/Gijsreyn/winget-dsc into wh…
Gijsreyn Nov 6, 2024
8e9c8c5
Merge branch 'main' into windows-setting-time
Gijsreyn Nov 6, 2024
d816dc3
Re-add Invoke-Process
Gijsreyn Nov 6, 2024
cd15ed2
Fix spelling
Gijsreyn Nov 6, 2024
6370252
Spell checker test
Gijsreyn Nov 6, 2024
8539290
Merge branch 'main' into windows-update-setting
Gijsreyn Nov 6, 2024
fec4047
Merge branch 'main' of https://github.com/Gijsreyn/winget-dsc into wi…
Gijsreyn Nov 6, 2024
3bf7d6b
Merge branch 'windows-update-setting' of https://github.com/Gijsreyn/…
Gijsreyn Nov 6, 2024
7ed2c35
Add attributes for validation
Gijsreyn Nov 6, 2024
e7262b2
Merge branch 'whatif-support' of https://github.com/Gijsreyn/winget-d…
Gijsreyn Nov 6, 2024
6dfddf3
Spell checker words
Gijsreyn Nov 6, 2024
8d8ad12
Test
Gijsreyn Nov 6, 2024
1fbe8e2
Add line break for test
Gijsreyn Nov 6, 2024
872574f
Merge branch 'main' of https://github.com/Gijsreyn/winget-dsc into wi…
Gijsreyn Nov 6, 2024
70fae5c
Merge branch 'whatif-support' of https://github.com/Gijsreyn/winget-d…
Gijsreyn Nov 6, 2024
77cc13d
Merge branch 'windows-setting-time' of https://github.com/Gijsreyn/wi…
Gijsreyn Nov 6, 2024
5210dd3
Merge branch 'windows-update-setting' of https://github.com/Gijsreyn/…
Gijsreyn Nov 6, 2024
a00ec3e
Fix spelling
Gijsreyn Nov 6, 2024
35badfd
Temporary add names to pass spell checker
Gijsreyn Nov 6, 2024
b115da5
Adding workaround with enum and translation
Gijsreyn Nov 6, 2024
ab6e2ec
Merge branch 'windows-setting-time' of https://github.com/Gijsreyn/wi…
Gijsreyn Nov 6, 2024
85e10ef
Rewritten docs
Gijsreyn Nov 6, 2024
7644177
Merge branch 'windows-update-setting' of https://github.com/Gijsreyn/…
Gijsreyn Nov 6, 2024
ea7b053
Merge branch 'windows-settings-language' of https://github.com/Gijsre…
Gijsreyn Nov 6, 2024
fb5339a
Spelling
Gijsreyn Nov 6, 2024
cc1637b
Undo changes
Gijsreyn Nov 8, 2024
671a63e
Remove Python from merge
Gijsreyn Nov 8, 2024
213d157
Remove Python from merge
Gijsreyn Nov 8, 2024
5084eb4
Spelling added
Gijsreyn Nov 13, 2024
007bc8d
Spelling reverted
Gijsreyn Nov 13, 2024
bccf27c
Resolve conficts
Gijsreyn Nov 13, 2024
7d2ae98
Remove line break
Gijsreyn Nov 13, 2024
3548d89
Merge branch 'main' into windows-setting-time
Gijsreyn Nov 13, 2024
c2dad49
Add spelling
Gijsreyn Nov 13, 2024
b5f0eb8
Merge branch 'windows-setting-time' of https://github.com/Gijsreyn/wi…
Gijsreyn Nov 13, 2024
867a6b4
Update generic_terms.txt
Gijsreyn Nov 13, 2024
d31ed8a
Merge branch 'windows-setting-time' of https://github.com/Gijsreyn/wi…
Gijsreyn Nov 13, 2024
0ac57aa
Merge branch 'main' into windows-setting-time
Gijsreyn Nov 13, 2024
8b35f25
Fix markdownlint
Gijsreyn Nov 13, 2024
40ebfeb
Merge branch 'main' of https://github.com/Gijsreyn/winget-dsc into wi…
Gijsreyn Nov 13, 2024
44d7ecd
Merge branch 'windows-setting-time' of https://github.com/Gijsreyn/wi…
Gijsreyn Nov 13, 2024
edb3dcc
Resolve remarks and split class into two
Gijsreyn Nov 15, 2024
8c48fd3
Resolve conflict
Gijsreyn Nov 15, 2024
65bbcf1
Resolve conflict
Gijsreyn Nov 15, 2024
7af2f5e
Merge branch 'main' into windows-setting-time
Gijsreyn Nov 15, 2024
c83e56a
Add daylight saving
Gijsreyn Nov 15, 2024
3f47882
Spelling
Gijsreyn Nov 15, 2024
0e02a99
Minor change
Gijsreyn Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/spelling/expect/generic_terms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ sortby
ssh
usr
versioning
VGpu
VGpu
Ntp
Systray
2 changes: 1 addition & 1 deletion resources/Help/Microsoft.VSCode.Dsc/VSCodeExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The `VSCodeExtension` DSC Resource allows you to install, update, and remove Vis

## EXAMPLES

### Example 1
### EXAMPLE 1

```powershell
# Install the latest version of the Visual Studio Code extension 'ms-python.python'
Expand Down
44 changes: 44 additions & 0 deletions resources/Help/Microsoft.Windows.Setting.Time/Clock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
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: Clock
---

# Clock

## SYNOPSIS

The `Clock` DSC Resource allows you to manage the system tray date/time visibility settings on a Windows machine.

## DESCRIPTION

The `Clock` DSC Resource allows you to manage the system tray date/time visibility settings on a Windows machine.

## PARAMETERS

| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** |
| --------------------------- | ------------- | ------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------ |
| `SID` | Key | String | The security identifier. This is a key property and should not be set manually. | N/A |
| `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` |
| `NotifyClockChangeProperty` | Optional | Boolean | Whether to notify the user when the time changes. The value should be a boolean. | `$true`, `$false` |

## EXAMPLES

### EXAMPLE 1 - Get the current clock settings

```powershell
C:\> Invoke-DscResource -Name Clock -Method Get -Property {}

# This example gets the current clock settings on the machine.
```

### EXAMPLE 2 - Set system tray date and notify clock change

```powershell
Invoke-DscResource -Name Clock -Method Set -Property @{ ShowSystemTrayDateTime = $true; NotifyClockChange = $true }

# This example sets the system tray date/time visibility settings on the machine.
```
45 changes: 45 additions & 0 deletions resources/Help/Microsoft.Windows.Setting.Time/TimeZone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
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 | Whether to set the time zone automatically. The value should be a boolean. You can find the setting in `Settings -> Time & Language -> Date & Time -> Set time automatically. | `$true`, `$false` |
| `AdjustForDayLightSaving` | Optional | Boolean | Whether to adjust for daylight saving time. The value should be a boolean. You can find the setting in `Settings -> Time & Language -> Date & Time -> Adjust for daylight saving time automatically. | `$true`, `$false` |


## EXAMPLES

### EXAMPLE 1 - Set time zone to Pacific Standard Time

```powershell
Invoke-DscResource -Name Time -Method Set -Property @{ TimeZone = "Pacific Standard Time"}

# This example sets the time zone to Pacific Standard Time.
```

### EXAMPLE 2

```powershell
Invoke-DscResource -Name Time -Method Get -Property {}

# This example gets the current time settings on the machine.
```
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 = @('TimeZone', 'Clock')

# 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_TimeZone', 'PSDscResource_Clock')

# 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 = ''
}

Loading