Commit cd66271
authored
Install SqlServer module via Save-Module to pwsh-only modules path (#608)
Install the `SqlServer` module via `Save-Module` into `C:\Program
Files\PowerShell\Modules` (pwsh-only path) instead of `pwsh -Command
'Install-Module …'`.
Why:
- Avoids the pwsh 7.6 PowerShellGet AV crash on Server 2022 by running
the install under Windows PowerShell 5.1.
- Targets the pwsh-only modules path, so PS 5.1 keeps resolving
`Invoke-Sqlcmd` to the existing SQLPS 16 — preserves the historical "two
worlds" split and avoids SqlServer 22's strict-SSL defaults breaking
in-container localhost SQL connections.
- pwsh 7 still gets `SqlServer 22.2.0` (verified via `Import-Module`
post-install).
Verified locally with `New-BcContainer` against freshly built ltsc2019,
ltsc2022, and ltsc2025 generic images — all reach "Ready for
connections!" and pass `Set SQL Server memory limit`.
---------
Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>1 parent 7e05ee3 commit cd66271
1 file changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
8 | 25 | | |
9 | 26 | | |
0 commit comments