You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dbatools.psm1
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -75,9 +75,9 @@ If ($PSVersionTable.PSEdition -in "Desktop", $null) {
75
75
}
76
76
Write-ImportTime-Text "Checking for .NET"
77
77
78
-
# Core needs to be at least 7.4.5
79
-
if ($PSVersionTable.PSEdition-eq'Core'-and$PSVersionTable.PSVersion.Major-lt7-and$PSVersionTable.PSVersion.Minor-lt4-and$PSVersionTable.PSVersion.Build-lt5) {
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."
Copy file name to clipboardExpand all lines: readme.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,15 @@ _Need an invite to the SQL Community Slack workspace? Check out the [self-invite
18
18
19
19
## Installer
20
20
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.
22
22
23
23
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):
24
24
25
25
```powershell
26
26
Install-Module dbatools -Scope CurrentUser
27
27
```
28
28
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.
30
30
31
31
## Usage scenarios
32
32
@@ -41,7 +41,7 @@ In addition to the simple things you can do in SSMS (e.g. starting a job, backin
41
41
42
42
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).
43
43
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).
45
45
46
46
```powershell
47
47
# Set some vars
@@ -248,7 +248,7 @@ Stop-Transcript
248
248
249
249
dbatools aims to support as many configurations as possible, including
250
250
251
-
* PowerShell v3 and above
251
+
* PowerShell v3 and above (Windows PowerShell) or PowerShell Core 7.4.0+ (cross-platform)
0 commit comments