{"id":14064002,"url":"https://github.com/abbgrade/PsSmo","last_synced_at":"2025-07-29T17:31:30.067Z","repository":{"id":43800633,"uuid":"405662538","full_name":"abbgrade/PsSmo","owner":"abbgrade","description":"The PowerShell SQL Client module replaces the SQL Server utilities SQLCMD with native PowerShell commands.","archived":false,"fork":false,"pushed_at":"2024-01-30T15:16:26.000Z","size":98,"stargazers_count":1,"open_issues_count":12,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2024-08-13T07:05:57.336Z","etag":null,"topics":["automation","azure-sql","powershell","sql-server","sqlcmd"],"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/abbgrade.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["abbgrade"]}},"created_at":"2021-09-12T14:21:36.000Z","updated_at":"2024-08-13T07:06:04.725Z","dependencies_parsed_at":"2024-08-13T07:18:44.674Z","dependency_job_id":null,"html_url":"https://github.com/abbgrade/PsSmo","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbgrade%2FPsSmo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbgrade%2FPsSmo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbgrade%2FPsSmo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbgrade%2FPsSmo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abbgrade","download_url":"https://codeload.github.com/abbgrade/PsSmo/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228032921,"owners_count":17858917,"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":["automation","azure-sql","powershell","sql-server","sqlcmd"],"created_at":"2024-08-13T07:03:37.146Z","updated_at":"2024-12-04T02:31:00.358Z","avatar_url":"https://github.com/abbgrade.png","language":"PowerShell","funding_links":["https://github.com/sponsors/abbgrade"],"categories":["PowerShell"],"sub_categories":[],"readme":"# PsSmo\n\nThe PowerShell SQL Client module replaces the SQL Server utilities [SQLCMD](https://docs.microsoft.com/de-de/sql/tools/sqlcmd-utility) with native PowerShell commands.\n\n## Installation\n\nThis module can be installed from [PsGallery](https://www.powershellgallery.com/packages/PsSmo).\n\n```powershell\nInstall-Module -Name PsSmo -Scope CurrentUser\n```\n\nAlternatively it can be build and installed from source.\n\n1. Install the development dependencies\n2. Download or clone it from GitHub\n3. Run the installation task:\n\n```powershell\nInvoke-Build Install\n```\n\n## Usage\n\nTODO\n\nExecute SQLCMD scripts like those created by [DacFX](https://github.com/microsoft/DacFx).\n\n### Commands\n\n| Command                         | Description                             | Status  |\n| ------------------------------- | --------------------------------------- | ------- |\n| Connect-Instance                | Create a new database connection.       | \u0026#9745; |\n| Disconnect-Instance             | Close connection                        | \u0026#9745; |\n| Invoke-Command                  | Execute SQLCMD scripts                  | \u0026#9744; |\n| \u0026#11185; Batch support          | Support `GO` statements                 | \u0026#9745; |\n| \u0026#11185; File support           | Script source from file                 | \u0026#9745; |\n| \u0026#11185; Variable support       | Support variables like `$(variable)`    | \u0026#9745; |\n| \u0026#11185; :setvar support        | Support `:setvar`                       | \u0026#9745; |\n| \u0026#11185; SQLCMD command support | Support SQLCMD commans like `:on error` | \u0026#9744; |\n| Uninstall-Schema                | Remove a database schema recursively    | \u0026#9744; |\n\n## Changelog\n\nSee the [changelog](./CHANGELOG.md) file.\n\n## Development\n\n- This is a [Portable Module](https://docs.microsoft.com/de-de/powershell/scripting/dev-cross-plat/writing-portable-modules?view=powershell-7) based on [PowerShell Standard](https://github.com/powershell/powershellstandard) and [.NET Standard](https://docs.microsoft.com/en-us/dotnet/standard/net-standard).\n- [VSCode](https://code.visualstudio.com) is recommended as IDE. [VSCode Tasks](https://code.visualstudio.com/docs/editor/tasks) are configured.\n- Build automation is based on [InvokeBuild](https://github.com/nightroman/Invoke-Build)\n- Test automation is based on [Pester](https://pester.dev)\n- Commands are named based on [Approved Verbs for PowerShell Commands](https://docs.microsoft.com/de-de/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands)\n- This project uses [git-flow](https://github.com/nvie/gitflow).\n- This project uses [keep a changelog](https://keepachangelog.com/en/1.0.0/).\n- This project uses [PsBuildTasks](https://github.com/abbgrade/PsBuildTasks).\n\n### Status\n\n[![.github/workflows/build-validation.yml](https://github.com/abbgrade/PsSmo/actions/workflows/build-validation.yml/badge.svg?branch=develop)](https://github.com/abbgrade/PsSmo/actions/workflows/build-validation.yml)\n\n### Build\n\nThe build scripts require InvokeBuild. If it is not installed, install it with the command `Install-Module InvokeBuild -Scope CurrentUser`.\n\nYou can build the module using the VS Code build task or with the command `Invoke-Build Build`.\n\n### Testing\n\nThe tests scripts are based on Pester. If it is not installed, install it with the command `Install-Module -Name Pester -Force -SkipPublisherCheck`. Some tests require a SQL Server. The test creates a SQL Server in a Docker container. If needed, [install Docker](https://www.docker.com/get-started). The container are created using PSDocker, which can be installed using `Install-Module PSDocker -Scope CurrentUser`.\n\nFor local testing use the VSCode test tasks or execute the test scripts directly or with `Invoke-Pester`.\nThe InvokeBuild test tasks are for CI and do not generate console output.\n\n### Release\n\n1. Create a release branch using git-flow.\n2. Update the version number in the module manifest.\n3. Extend the changelog in this readme.\n4. If you want to create a pre-release.\n   1. Push the release branch to github, to publish the pre-release to PsGallery.\n5. Finish release using git-flow.\n6. Check if tags are not pushed to github.\n7. Check if the release branch is deleted on github.\n8. Create the release on github.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbgrade%2FPsSmo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabbgrade%2FPsSmo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbgrade%2FPsSmo/lists"}