{"id":14064301,"url":"https://github.com/devblackops/pshealthz","last_synced_at":"2025-05-16T05:31:59.738Z","repository":{"id":142026325,"uuid":"74147068","full_name":"devblackops/pshealthz","owner":"devblackops","description":"Basic HTTP listener written in PowerShell that executes Operation Validation Framework (OVF) tests and returns results using a simple REST API","archived":false,"fork":false,"pushed_at":"2019-08-20T05:59:00.000Z","size":42,"stargazers_count":21,"open_issues_count":1,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T20:51:15.886Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devblackops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"devblackops","patreon":"devblackops"}},"created_at":"2016-11-18T16:27:16.000Z","updated_at":"2023-11-08T07:59:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b1d7a02-37aa-4113-a015-713e94dc5fa0","html_url":"https://github.com/devblackops/pshealthz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devblackops%2Fpshealthz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devblackops%2Fpshealthz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devblackops%2Fpshealthz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devblackops%2Fpshealthz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devblackops","download_url":"https://codeload.github.com/devblackops/pshealthz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254474423,"owners_count":22077277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-13T07:03:48.201Z","updated_at":"2025-05-16T05:31:59.395Z","avatar_url":"https://github.com/devblackops.png","language":"PowerShell","funding_links":["https://github.com/sponsors/devblackops","https://patreon.com/devblackops"],"categories":["PowerShell"],"sub_categories":[],"readme":"\n[![Build status](https://ci.appveyor.com/api/projects/status/7quv90lu7gf779nv/branch/master?svg=true)](https://ci.appveyor.com/project/devblackops/pshealthz/branch/master)\n\n# PSHealthZ\n\n## Overview\n\nBasic HTTP(S) listener that executes [Operation Validation Framework](https://github.com/PowerShell/Operation-Validation-Framework) (OVF) tests that are present on the given system and returns results using a simple REST API.\nThis is an implementation of the [Health Endpoint Monitoring Pattern](https://msdn.microsoft.com/en-us/library/dn589789.aspx) using PowerShell.\n\n## Getting Started\n\nStart the listener on the desired port and path. The command below will expose a REST endpoint at ```http://localhost:1938/health```.\n\n\u003eThis command must be run from an elevated session.\n\n```powershell\n\u003e$listener = Start-HealthzListener -PassThru -Verbose\n```\n\nThis will create a PowerShell job running the listener in the backgound. To see the listener details, run:\n\n```powershell\n$listener | Format-List *\n```\n\nTo test the listener, run the following:\n\n```powershell\n\u003e$r = Invoke-RestMethod -Uri 'http://localhost:1938/health'\n\u003e$r | Format-List *\n```\n\nWithout specifying a specific test to execute, PSHealthZ will return a list of available OVF tests that are present in `$env:PSModulePath`.\n\n```powershell\n\u003e$r.availableTests\nStorage Capacity Memory Capacity OVF.Example1\nServices asdf                    OVF.Example2\nMore services                    OVF.Example2\nLogical Disks                    OVF.Windows.Server\nMemory                           OVF.Windows.Server\nNetwork Adapters                 OVF.Windows.Server\nOperating System                 OVF.Windows.Server\n```\n\nTo execute a specific test, add `'?test=\u003ctestname\u003e'` as a query parameter.\n\n```powershell\n\u003e$r = Invoke-RestMethod -Uri 'http://localhost:1938/health?test=services'\n```\n\nTo execute tests from a specific module, add `'?module=\u003cmodulename\u003e'` as a query parameter.\n\n```powershell\n\u003e$r = Invoke-RestMethod -Uri 'http://localhost:1938/health?module=ovf.example1'\n```\n\nYou can inspect the test results with:\n\n```powershell\n\u003e$r.testResults | Format-Table *\n```\n\nTo stop the HTTP listener, run:\n\n```powershell\n$listener | Stop-HealthzListener\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevblackops%2Fpshealthz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevblackops%2Fpshealthz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevblackops%2Fpshealthz/lists"}