|
1 | 1 | #Set your file path |
2 | | -$FilePath = "C:\temp\SQL-Server-First-Responder-Kit" |
3 | | -$SqlVersionsPath = "$FilePath\SqlServerVersions.sql" |
4 | | -$BlitzFirstPath = "$FilePath\sp_BlitzFirst.sql" |
| 2 | +$FilePath = "/Users/brentozar/LocalOnly/Github/SQL-Server-First-Responder-Kit" |
| 3 | +$SqlVersionsPath = "$FilePath/SqlServerVersions.sql" |
| 4 | +$BlitzFirstPath = "$FilePath/sp_BlitzFirst.sql" |
5 | 5 |
|
6 | 6 | #All Core Blitz Without sp_BlitzQueryStore |
7 | 7 | Get-ChildItem -Path "$FilePath" -Filter "sp_Blitz*.sql" | |
8 | 8 | Where-Object { $_.FullName -notlike "*sp_BlitzQueryStore.sql*" -and $_.FullName -notlike "*sp_BlitzInMemoryOLTP*" -and $_.FullName -notlike "*sp_BlitzFirst*"} | |
9 | 9 | ForEach-Object { Get-Content $_.FullName } | |
10 | | -Set-Content -Path "$FilePath\Install-Core-Blitz-No-Query-Store.sql" -Force |
| 10 | +Set-Content -Path "$FilePath/Install-Core-Blitz-No-Query-Store.sql" -Force |
11 | 11 | #append script to (re-)create SqlServerVersions Table (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2429) |
12 | 12 | if ( test-path "$SqlVersionsPath") |
13 | | - { Add-Content -Path "$FilePath\Install-Core-Blitz-No-Query-Store.sql" -Value (Get-Content -Path "$SqlVersionsPath")} |
| 13 | + { Add-Content -Path "$FilePath/Install-Core-Blitz-No-Query-Store.sql" -Value (Get-Content -Path "$SqlVersionsPath")} |
14 | 14 | if ( test-path "$BlitzFirstPath") |
15 | | - { Add-Content -Path "$FilePath\Install-Core-Blitz-No-Query-Store.sql" -Value (Get-Content -Path "$BlitzFirstPath")} |
| 15 | + { Add-Content -Path "$FilePath/Install-Core-Blitz-No-Query-Store.sql" -Value (Get-Content -Path "$BlitzFirstPath")} |
16 | 16 |
|
17 | 17 |
|
18 | 18 | #All Core Blitz With sp_BlitzQueryStore |
19 | 19 | Get-ChildItem -Path "$FilePath" -Filter "sp_Blitz*.sql" | |
20 | 20 | Where-Object { $_.FullName -notlike "*sp_BlitzInMemoryOLTP*" -and $_.FullName -notlike "*sp_BlitzFirst*"} | |
21 | 21 | ForEach-Object { Get-Content $_.FullName } | |
22 | | -Set-Content -Path "$FilePath\Install-Core-Blitz-With-Query-Store.sql" -Force |
| 22 | +Set-Content -Path "$FilePath/Install-Core-Blitz-With-Query-Store.sql" -Force |
23 | 23 | #append script to (re-)create SqlServerVersions Table (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2429) |
24 | 24 | if ( test-path "$SqlVersionsPath") |
25 | | - { Add-Content -Path "$FilePath\Install-Core-Blitz-With-Query-Store.sql" -Value (Get-Content -Path "$SqlVersionsPath")} |
| 25 | + { Add-Content -Path "$FilePath/Install-Core-Blitz-With-Query-Store.sql" -Value (Get-Content -Path "$SqlVersionsPath")} |
26 | 26 | if ( test-path "$BlitzFirstPath") |
27 | | - { Add-Content -Path "$FilePath\Install-Core-Blitz-With-Query-Store.sql" -Value (Get-Content -Path "$BlitzFirstPath")} |
| 27 | + { Add-Content -Path "$FilePath/Install-Core-Blitz-With-Query-Store.sql" -Value (Get-Content -Path "$BlitzFirstPath")} |
28 | 28 |
|
29 | 29 |
|
30 | 30 | #All Scripts |
31 | 31 | Get-ChildItem -Path "$FilePath" -Filter "sp_*.sql" | |
32 | 32 | Where-Object { $_.FullName -notlike "*sp_BlitzInMemoryOLTP*" -and $_.FullName -notlike "*sp_BlitzFirst*"} | |
33 | 33 | ForEach-Object { Get-Content $_.FullName } | |
34 | | -Set-Content -Path "$FilePath\Install-All-Scripts.sql" -Force |
| 34 | +Set-Content -Path "$FilePath/Install-All-Scripts.sql" -Force |
35 | 35 | #append script to (re-)create SqlServerVersions Table (https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/issues/2429) |
36 | 36 | if ( test-path "$SqlVersionsPath") |
37 | | - { Add-Content -Path "$FilePath\Install-All-Scripts.sql" -Value (Get-Content -Path "$SqlVersionsPath")} |
| 37 | + { Add-Content -Path "$FilePath/Install-All-Scripts.sql" -Value (Get-Content -Path "$SqlVersionsPath")} |
38 | 38 | if ( test-path "$BlitzFirstPath") |
39 | | - { Add-Content -Path "$FilePath\Install-All-Scripts.sql" -Value (Get-Content -Path "$BlitzFirstPath")} |
| 39 | + { Add-Content -Path "$FilePath/Install-All-Scripts.sql" -Value (Get-Content -Path "$BlitzFirstPath")} |
0 commit comments