Skip to content

Commit 0d6c068

Browse files
Update PS Requirement, CI Workflows, and Docs (#9715)
1 parent 3fca4ce commit 0d6c068

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

.github/dbatools-library-version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"version": "2025.7.19-preview-freshold-20250719213145",
2+
"version": "2025.7.20",
33
"notes": "Version of dbatools.library to use for CI/CD and development"
44
}

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ jobs:
4343
Write-Output "Preview version detected, bypassing PSModuleCache and using install script"
4444
./.github/scripts/install-dbatools-library.ps1
4545
46-
- name: Set encryption values
46+
- name: Check file health and set encryption values
4747
run: |
4848
Import-Module ./dbatools.psd1 -Force
49-
(Get-Module dbatools.library).Path | Write-Warning
50-
Get-ChildItem /home/runner/.local/share/powershell/Modules/dbatools.library/core/lib/dac/linux | Write-Warning
49+
Get-Module dbatools.library | Select-Object -ExpandProperty Path -OutVariable lib | Write-Warning
50+
$lib = Split-Path -Path $lib -Parent
51+
Get-ChildItem (Join-Path $lib -ChildPath core/lib/dac/linux) | Write-Warning
5152
Set-DbatoolsConfig -FullName sql.connection.trustcert -Value $true -Register
5253
Set-DbatoolsConfig -FullName sql.connection.encrypt -Value $false -Register
5354
Get-DbatoolsConfigValue -FullName sql.connection.encrypt | Write-Warning

.github/workflows/xplat-import.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717

18+
- name: Show pwsh version
19+
shell: pwsh
20+
run: pwsh --version
21+
1822
- name: Read dbatools.library version
1923
id: get-version
2024
shell: pwsh

dbatools.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ If ($PSVersionTable.PSEdition -in "Desktop", $null) {
7575
}
7676
Write-ImportTime -Text "Checking for .NET"
7777

78-
# Core needs to be at least 7.4.5
79-
if ($PSVersionTable.PSEdition -eq 'Core' -and $PSVersionTable.PSVersion.Major -lt 7 -and $PSVersionTable.PSVersion.Minor -lt 4 -and $PSVersionTable.PSVersion.Build -lt 5) {
80-
throw "dbatools requires at least PowerShell 7.4.5 when running on Core. Please update your PowerShell."
78+
# Core needs to be at least 7.4.0
79+
if ($PSVersionTable.PSEdition -eq 'Core' -and $PSVersionTable.PSVersion -lt [version]"7.4.0") {
80+
throw "dbatools requires at least PowerShell 7.4.0 when running on Core. Please update your PowerShell."
8181
}
8282

8383

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ _Need an invite to the SQL Community Slack workspace? Check out the [self-invite
1818

1919
## Installer
2020

21-
dbatools works on Windows, Linux and macOS (M1 and Intel!) 🤩👍 Windows requires PowerShell v3 and above, while those using dbatools on PowerShell Core will need to be running 7.3 and above.
21+
dbatools works on Windows, Linux and macOS (M1 and Intel!) 🤩👍 Windows requires PowerShell v3 and above, while those using dbatools on PowerShell Core will need to be running 7.4.0 and above.
2222

2323
Run the following command to install dbatools from the PowerShell Gallery (to install on a server or for all users, remove the `-Scope` parameter and run in an elevated session):
2424

2525
```powershell
2626
Install-Module dbatools -Scope CurrentUser
2727
```
2828

29-
If you use an earlier version of PowerShell that does not support the PowerShell Gallery, you can download `PowerShellGet` from [Microsoft's site](https://learn.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.3) then run the command again.
29+
If you use an earlier version of PowerShell that does not support the PowerShell Gallery, you can download `PowerShellGet` from [Microsoft's site](https://learn.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7.4) then run the command again.
3030

3131
## Usage scenarios
3232

@@ -41,7 +41,7 @@ In addition to the simple things you can do in SSMS (e.g. starting a job, backin
4141

4242
As previously mentioned, dbatools now offers [over 700 commands](https://dbatools.io/commands)! [Here are some of the ones we highlight at conferences](https://gist.github.com/potatoqualitee/e8932b64aeb6ef404e252d656b6318a2).
4343

44-
PowerShell v3 and above required. (See below for important information about alternative logins and specifying SQL Server ports).
44+
PowerShell v3 and above required for Windows PowerShell, PowerShell Core 7.4.0+ required for cross-platform. (See below for important information about alternative logins and specifying SQL Server ports).
4545

4646
```powershell
4747
# Set some vars
@@ -248,7 +248,7 @@ Stop-Transcript
248248

249249
dbatools aims to support as many configurations as possible, including
250250

251-
* PowerShell v3 and above
251+
* PowerShell v3 and above (Windows PowerShell) or PowerShell Core 7.4.0+ (cross-platform)
252252
* Windows, macOS and Linux
253253
* SQL Server 2000 - Current
254254
* Express - Datacenter Edition

0 commit comments

Comments
 (0)