{"id":44515097,"url":"https://github.com/d-strobel/gowindows","last_synced_at":"2026-02-13T17:05:04.430Z","repository":{"id":198574182,"uuid":"700512120","full_name":"d-strobel/gowindows","owner":"d-strobel","description":"Go library designed for remotely configuring and managing Windows-based systems.","archived":false,"fork":false,"pushed_at":"2026-01-01T17:42:27.000Z","size":1031,"stargazers_count":10,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-07T00:19:27.833Z","etag":null,"topics":["go","kerberos","powershell","ssh","windows","winrm"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/d-strobel/gowindows","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d-strobel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-04T18:22:39.000Z","updated_at":"2026-01-01T17:42:24.000Z","dependencies_parsed_at":"2023-10-16T02:54:13.469Z","dependency_job_id":"29171f2b-348a-4485-9987-3687df5aa0cf","html_url":"https://github.com/d-strobel/gowindows","commit_stats":null,"previous_names":["d-strobel/gowindows"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/d-strobel/gowindows","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-strobel%2Fgowindows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-strobel%2Fgowindows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-strobel%2Fgowindows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-strobel%2Fgowindows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-strobel","download_url":"https://codeload.github.com/d-strobel/gowindows/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-strobel%2Fgowindows/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29412673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","kerberos","powershell","ssh","windows","winrm"],"created_at":"2026-02-13T17:05:03.703Z","updated_at":"2026-02-13T17:05:04.421Z","avatar_url":"https://github.com/d-strobel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gowindows\n\u003c!-- Badges --\u003e\n[![Build][build badge]][build page]\n[![GoDoc][godoc badge]][godoc page]\n[![GoReport][goreport badge]][goreport page]\n[![Conventional Commits][convention badge]][convention page]\n\n![logo](images/logo/gowindows-icon_250.png)\n\n## Overview\n**gowindows** is a Go library designed for remotely configuring and managing Windows-based systems.\n\nLeveraging WinRM and SSH connections, gowindows provides a comprehensive set of functions to execute PowerShell commands, making it easy to automate tasks, manage users, groups, and more on remote Windows servers.\n\nThis library is especially useful when combined with tools like Terraform, enabling seamless integration into infrastructure as code workflows for Windows environments.\n\n## Usage\n\n### Single Client with an SSH Connection\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/d-strobel/gowindows/connection/ssh\"\n\t\"github.com/d-strobel/gowindows/windows/local/accounts\"\n)\n\nfunc main() {\n\tsshConfig := \u0026ssh.Config{\n\t\tHost:     \"winsrv\",\n\t\tUsername: \"vagrant\",\n\t\tPassword: \"vagrant\",\n\t}\n\n\t// Create a new connection.\n\tconn, err := ssh.NewConnection(sshConfig)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Create a client for the local accounts package.\n\tc := accounts.NewClient(conn)\n\tdefer c.Connection.Close()\n\n\t// Run the GroupRead function to retrieve a local Windows group.\n\tgroup, err := c.GroupRead(context.Background(), accounts.GroupReadParams{Name: \"Users\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Print the user group.\n\tfmt.Printf(\"User group: %+v\", group)\n}\n```\n\n### Multi Client with a WinRM Connection\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/d-strobel/gowindows\"\n\t\"github.com/d-strobel/gowindows/connection/winrm\"\n\t\"github.com/d-strobel/gowindows/windows/local/accounts\"\n)\n\nfunc main() {\n\twinrmConfig := \u0026winrm.Config{\n\t\tHost:     \"winsrv\",\n\t\tUsername: \"vagrant\",\n\t\tPassword: \"vagrant\",\n\t}\n\n\t// Create a new connection.\n\tconn, err := winrm.NewConnection(winrmConfig)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Create client for all subpackages.\n\tc := gowindows.NewClient(conn)\n\tdefer c.Close()\n\n\t// Run the GroupRead function to retrieve a local Windows group.\n\tgroup, err := c.LocalAccounts.GroupRead(context.Background(), accounts.GroupReadParams{Name: \"Users\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Print the user group.\n\tfmt.Printf(\"User group: %+v\", group)\n}\n```\n\n## Development\n### Pre-commit\nTo ensure smooth execution in the pipeline and eliminate potential linting errors,\nit's highly advisable to integrate pre-commit hooks. These hooks can be effortlessly\ninstalled to streamline the process and maintain code quality standards.\n\nYou can find more details about pre-commit hooks on their official website: [pre-commit](https://pre-commit.com/).\n\n### Conventional Commits\n**gowindows** follows the conventional commit guidelines. For more information, see [conventionalcommits.org](https://www.conventionalcommits.org/).\n\n### Testing\n### Unit tests\nRun unit tests:\n```bash\nmake test\n```\n\n### Acceptance test\nPrerequisites:\n* [Hashicorp Vagrant](https://www.vagrantup.com/)\n* [Oracle VirtualBox](https://www.virtualbox.org/)\n\nBoot the Vagrant machines:\n```bash\nmake vagrant-up\n```\n\nRun acceptance tests:\n```bash\nmake testacc\n```\n\nDestroy the Vagrant machines:\n```bash\nmake vagrant-down\n```\n\n## Third-Party libraries\n* For the WinRM connection part, I rely on the library [masterzen/winrm](https://github.com/masterzen/winrm).\n\n## Inspirations\n* [hashicorp - terraform-provider-ad](https://github.com/hashicorp/terraform-provider-ad):\u003cbr\u003e\nHashicorp made a great start with the terraform-provider-ad. Currently, it seems that the provider is not actively maintained.\u003cbr\u003e\nBeyond that, my goal is to split the terraform-provider into a library and a provider and extend its functionality with non Active-Directory systems.\n\n## License\nThis project is licensed under the [Mozilla Public License Version 2.0](LICENSE).\n\n\u003c!-- Badges --\u003e\n[godoc badge]: https://pkg.go.dev/badge/github.com/d-strobel/gowindows\n[godoc page]: https://pkg.go.dev/github.com/d-strobel/gowindows\n\n[goreport badge]: https://goreportcard.com/badge/github.com/d-strobel/gowindows\n[goreport page]: https://goreportcard.com/report/github.com/d-strobel/gowindows\n\n[build badge]: https://github.com/d-strobel/gowindows/actions/workflows/build.yml/badge.svg\n[build page]: https://github.com/d-strobel/gowindows/actions/workflows/build.yml\n\n[convention badge]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits\u0026logoColor=white\n[convention page]: https://conventionalcommits.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-strobel%2Fgowindows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-strobel%2Fgowindows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-strobel%2Fgowindows/lists"}