Skip to content

This repository contains the source code for Windows gecko. Windows gecko is a multifunctional script designed to adapt to various Windows management tasks.

License

dotjesper/windows-gecko

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Title Date Author Status
README
December 18, 2023
dotjesper
In development

Windows gecko

Built for Windows 11 Built for Windows 10 Built for Windows Autopilot

PSScriptAnalyzer verified PowerShell Constrained Language mode verified

This repository contains the source code for Windows gecko.

This repository is the evolution of the Windows rhythm functional script. During the progression of the solution I introduced braking changes, and to keep evolving the functionality, I decided to rebrand the solution, now Windows gecko.

According to Wikipedia, geckos are small, mostly carnivorous lizards that have a wide distribution, found on every continent except Antarctica. Geckoes are small in size, can adapt to the surroundings and communicating using clicking sounds in their social interactions.

Geckos are small, adapts to the surroundings and have excellent night vision.

Windows gecko is exactly that, a multifunctional script, small in size, designed to adapt to multiple Windows management environments and using “clicking sounds” to ensure every steps is checked and recorded.

This repository is under development and alive and for the most, kicking - I welcome any feedback or suggestions for improvement. Reach out on Twitter, I read Direct Messages (DMs) and allow them from people I do not follow. For other means of contact, please visit https://dotjesper.com/contact/

Do not hesitate to reach out if issues arise or new functionality and improvement comes to mind.

This is a personal development, please respect the community sharing philosophy and be nice!

Feel free to fork and build.

Goal

The goal of Windows gecko is to provide a consistent desired state configuration to end user devices in Windows Autopilot scenarios.

Windows gecko can easily be implemented using more traditionally deployment methods, e.g., Operating System Deployment (OSD), Task Sequences deployment or similar methods utilized.

Synopsis

Windows gecko was built to remove a few Windows features from Windows devices, managed using Microsoft Endpoint Manager and evolved into a tool to align Windows feature configuration, allowing to disable and enable Windows features. While building the key features, additional requirements surfaced, and being able to baseline Windows In-box App was added, allowing administrators to easily remove unwanted apps as part of the initially configuration, e.g., when enforcing corporate defaults as part of Windows Autopilot scenarios.

Further improvements were added, baseline conditions were requested, and Windows Service configuration and Windows Registry configuration options has been included.

There as several ways to achieve a Windows desired state configuration baseline and several approaches. Windows gecko is built upon the requirement to provide a default configuration baseline, or a desired state configuration, and is not meant to stop the end user to install a previously removed app, or circumvent a desired setting, purely to allow device administrators to provide a default baseline, or corporate baseline, to the end user as part of a Windows Autopilot scenario.

The mindset of the solution will aim to allow to limit and/or combine the functionalities best suited for the task, meaning if Windows feature configuration were to be applied, this should be achievable without the Windows Registry configuration. Also, very important, is to be able to apply Windows baselines configuration in one or multiple packages in either system or user context, without changing the code – which is why all configurations is achievable using configuration files (json). This will help ensure minimal effort to create a new Windows desired state configuration, being easily completed without any code changes or re-signing the provided code.

Current features

  • WindowsApps: Remove Windows In-box Apps and Store Apps.
  • WindowsBranding: Configure OEM information and Registration (Coming soon)
  • WindowsFeatures
    • Enable and/or disable Windows features.
    • Enable and/or disable Windows optional features.
  • WindowsGroups: Add accounts to local groups (Coming soon).
  • WindowsFiles: Copy file(s) to device from payload package.
  • WindowsRegistry: Modifying Windows registry entries (add, change and remove).
  • WindowsRun: Run local executables and/or download and run executables.
  • WindowsServices: Configure/re-configure Windows Services.
  • WindowsTCR: Windows Time zone, Culture and Regional settings manager (PREVIEW).

Requirements

Windows gecko is developed and tested for Windows 10 22H2 Pro and Enterprise 64-bit and newer and require PowerShell 5.1.

NOTE Applying Windows desired state configuration, Windows gecko should be configured to run in either SYSTEM or USER context. Applying device Baseline in SYSTEM context, will be required to run with local administrative rights (Local administrator or System). Combining device Baseline across SYSTEM and USER is highly unadvisable and might cause undesired results.

Repository content

├── assets
│  ├─ LayoutModification-W10.xml
│  ├─ LayoutModification-W11.xml
│  ├─ windowsTCR.json
├── samples
│  ├─ baselineAppsC.json
│  ├─ baselineFeaturesC.json
│  ├─ baselineFileCopy.json
│  ├─ baselineFileExcute.json
│  ├─ baselineFileExplorerSettingsU.json
│  ├─ baselineFileOpenBehaviorC.json
│  ├─ baselineOfficeSettingsC.json
│  ├─ baselineOfficeSettingsU.json
│  ├─ baselineOptional_RSAT_FeaturesC.json
│  ├─ baselineServicesC.json
│  ├─ baselineSettingsC.json
│  ├─ baselineSettingsU.json
│  ├─ baselineWindowsTCR.json
├─ solution
│  ├─ assets.zip
│  ├─ configC.json
│  ├─ configU.json
│  ├─ gecko.png
│  ├─ gecko.ps1

Usage

Windows gecko require a configuration file to work. The configuration file should be a valid json file, and the encoding should be UTF-8. The benefit using external configuration files, makes the solution more versatile and you can code sign the script once, and reuse the script for multiply deployment/tasks.

I highly recommend code signing any script used in a deployment scenario.

Parameters

-configFile

Type: String

Start Windows gecko with the defined configuration file to be used for the task. If no configuration file is defined, the script will look for .\config.json. If the configuration is not found or invalid, the script will exit.

-CID

Type: string

Windows Time zone, culture and regional settings value, allowing configuring culture, homelocation, and timezone from configuration file.

CID Value must match windowsTCR.configuration.[CID], e.g. "da-DK", "565652" or similar. See sample files for examples.

-logFile

Type: String

Start Windows gecko logging to the desired logfile. If no log file is defined, the script will default to Windows gecko log file within %ProgramData%\Microsoft\IntuneManagementExtension\Logs\ folder.

-exitOnError

Type: Switch

If an error occurs, exitOnError control if the script should exit-on-error. Default value is $false.

-uninstall

Type: Switch

Future parameter for use in Micrsoft Intune package deployment scenarios. Default value is $false.

-Verbose

Displays detailed information about the operation performed by Windows gecko. Without the -Verbose parameter, the script will run completely silent and will write output to the log file only.

Examples

.\gecko.ps1 -Verbose

.\gecko.ps1 -configFile ".\configC.json" -Verbose

.\gecko.ps1 -configFile ".\configU.json" -logFile ".\logfile.log"

.\gecko.ps1 -configFile ".\usercfg.json" -logFile ".\logfile.log" -CID "da-DK"

powershell.exe -NoLogo -ExecutionPolicy "Bypass" -File ".\gecko.ps1" -configFile ".\configC.json"

Disclaimer

This is not an official repository, and is not affiliated with Microsoft, the Windows gecko repository is not affiliated with or endorsed by Microsoft. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. All trademarks are the property of their respective companies.

Legal and Licensing

Windows gecko is licensed under the MIT license.

The information and data of this repository and its contents are subject to change at any time without notice to you. This repository and its contents are provided AS IS without warranty of any kind and should not be interpreted as an offer or commitment on the part of the author(s). The descriptions are intended as brief highlights to aid understanding, rather than as thorough coverage.

Change log

See the project Wiki page for full change log information.

--Jesper

About

This repository contains the source code for Windows gecko. Windows gecko is a multifunctional script designed to adapt to various Windows management tasks.

Topics

Resources

License

Stars

Watchers

Forks