From 183a566735c88f12e661fc089670bd2dfa9c8249 Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Wed, 29 Nov 2017 18:27:33 +0100 Subject: [PATCH] Changes to SqlServerDsc - The examples in the root of the Examples folder are obsolete. Those examples now have a note saying so, in the comment-based help, until they can be replaced (issue #904). --- CHANGELOG.md | 6 +++++- Examples/DSCClusterSqlBuild.ps1 | 14 +++++++++++++- Examples/DSCFCISqlBuild.ps1 | 14 +++++++++++++- Examples/DSCSQLBuildEncrypted.ps1 | 13 ++++++++++++- Examples/DSCSqlBuild.ps1 | 13 ++++++++++++- Examples/SQL-ClusterDB.ps1 | 14 ++++++++++++-- Examples/SQL-Standalone.ps1 | 14 ++++++++++++-- Examples/SQLPush_SingleServer.ps1 | 13 ++++++++++++- 8 files changed, 91 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0ba24d88..8042eeb6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,13 @@ - Impact to all resources - Changes to CONTRIBUTING.md - Added details to the naming convention used in SqlServerDsc. +- Changes to SqlServerDsc + - The examples in the root of the Examples folder are obsolete. Those examples + now have a note saying so, in the comment-based help, until they can be replaced + ([issue #904](https://github.com/PowerShell/SqlServerDsc/issues/904)). - Changes to SqlAGDatabase - Changed the Get-MatchingDatabaseNames function to be case insensitive when - matching database names. ([issue #912](https://github.com/PowerShell/SqlServerDsc/issues/912)) + matching database names. ([issue #912](https://github.com/PowerShell/SqlServerDsc/issues/912)) ## 9.0.0.0 diff --git a/Examples/DSCClusterSqlBuild.ps1 b/Examples/DSCClusterSqlBuild.ps1 index 367b55a09..5526fbe17 100644 --- a/Examples/DSCClusterSqlBuild.ps1 +++ b/Examples/DSCClusterSqlBuild.ps1 @@ -1,4 +1,16 @@ -#requires -Version 5 +<# + .NOTES + THIS EXAMPLE IS OBSOLETE. Due to major changes to the resource modules + (this and other modules) over the last few months this example has not + been updated to reflect those changes. + Please refer to the examples in each individual resource example folder + for updated examples. + https://github.com/PowerShell/SqlServerDsc/tree/dev/Examples/Resources + + There is an issue open to replace this example, please see issue + https://github.com/PowerShell/SqlServerDsc/issues/462 +#> + $StartTime = [System.Diagnostics.Stopwatch]::StartNew() Function check-even($num){[bool]!($num%2)} diff --git a/Examples/DSCFCISqlBuild.ps1 b/Examples/DSCFCISqlBuild.ps1 index 53802d33b..93a8f6070 100644 --- a/Examples/DSCFCISqlBuild.ps1 +++ b/Examples/DSCFCISqlBuild.ps1 @@ -1,4 +1,16 @@ -#requires -Version 5 +<# + .NOTES + THIS EXAMPLE IS OBSOLETE. Due to major changes to the resource modules + (this and other modules) over the last few months this example has not + been updated to reflect those changes. + Please refer to the examples in each individual resource example folder + for updated examples. + https://github.com/PowerShell/SqlServerDsc/tree/dev/Examples/Resources + + There is an issue open to replace this example, please see issue + https://github.com/PowerShell/SqlServerDsc/issues/462 +#> + $computers = 'OHSQL9034N1','OHSQL9034N2','OHSQL9034N3' $OutputPath = 'F:\DSCConfig' diff --git a/Examples/DSCSQLBuildEncrypted.ps1 b/Examples/DSCSQLBuildEncrypted.ps1 index 343b1e564..1e1db681c 100644 --- a/Examples/DSCSQLBuildEncrypted.ps1 +++ b/Examples/DSCSQLBuildEncrypted.ps1 @@ -1,4 +1,15 @@ -#requires -Version 5 +<# + .NOTES + THIS EXAMPLE IS OBSOLETE. Due to major changes to the resource modules + (this and other modules) over the last few months this example has not + been updated to reflect those changes. + Please refer to the examples in each individual resource example folder + for updated examples. + https://github.com/PowerShell/SqlServerDsc/tree/dev/Examples/Resources + + There is an issue open to replace this example, please see issue + https://github.com/PowerShell/SqlServerDsc/issues/462 +#> $StartTime = [System.Diagnostics.Stopwatch]::StartNew() $computers = 'OHSQL9012' diff --git a/Examples/DSCSqlBuild.ps1 b/Examples/DSCSqlBuild.ps1 index e90e07974..22895dcdd 100644 --- a/Examples/DSCSqlBuild.ps1 +++ b/Examples/DSCSqlBuild.ps1 @@ -1,4 +1,15 @@ -#requires -Version 5 +<# + .NOTES + THIS EXAMPLE IS OBSOLETE. Due to major changes to the resource modules + (this and other modules) over the last few months this example has not + been updated to reflect those changes. + Please refer to the examples in each individual resource example folder + for updated examples. + https://github.com/PowerShell/SqlServerDsc/tree/dev/Examples/Resources + + There is an issue open to replace this example, please see issue + https://github.com/PowerShell/SqlServerDsc/issues/462 +#> $StartTime = [System.Diagnostics.Stopwatch]::StartNew() $computers = 'OHSQL9015' diff --git a/Examples/SQL-ClusterDB.ps1 b/Examples/SQL-ClusterDB.ps1 index 451b3015a..3a37726b2 100644 --- a/Examples/SQL-ClusterDB.ps1 +++ b/Examples/SQL-ClusterDB.ps1 @@ -1,5 +1,15 @@ -#requires -Version 5 - +<# + .NOTES + THIS EXAMPLE IS OBSOLETE. Due to major changes to the resource modules + (this and other modules) over the last few months this example has not + been updated to reflect those changes. + Please refer to the examples in each individual resource example folder + for updated examples. + https://github.com/PowerShell/SqlServerDsc/tree/dev/Examples/Resources + + There is an issue open to replace this example, please see issue + https://github.com/PowerShell/SqlServerDsc/issues/462 +#> [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] param () diff --git a/Examples/SQL-Standalone.ps1 b/Examples/SQL-Standalone.ps1 index 3cab9d36b..0adaae2b6 100644 --- a/Examples/SQL-Standalone.ps1 +++ b/Examples/SQL-Standalone.ps1 @@ -1,5 +1,15 @@ -#requires -Version 5 - +<# + .NOTES + THIS EXAMPLE IS OBSOLETE. Due to major changes to the resource modules + (this and other modules) over the last few months this example has not + been updated to reflect those changes. + Please refer to the examples in each individual resource example folder + for updated examples. + https://github.com/PowerShell/SqlServerDsc/tree/dev/Examples/Resources + + There is an issue open to replace this example, please see issue + https://github.com/PowerShell/SqlServerDsc/issues/462 +#> [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] param () diff --git a/Examples/SQLPush_SingleServer.ps1 b/Examples/SQLPush_SingleServer.ps1 index e357c5cad..0bd77b5c3 100644 --- a/Examples/SQLPush_SingleServer.ps1 +++ b/Examples/SQLPush_SingleServer.ps1 @@ -1,4 +1,15 @@ -#requires -Version 5 +<# + .NOTES + THIS EXAMPLE IS OBSOLETE. Due to major changes to the resource modules + (this and other modules) over the last few months this example has not + been updated to reflect those changes. + Please refer to the examples in each individual resource example folder + for updated examples. + https://github.com/PowerShell/SqlServerDsc/tree/dev/Examples/Resources + + There is an issue open to replace this example, please see issue + https://github.com/PowerShell/SqlServerDsc/issues/462 +#> $computers = 'OHSQL1016' $OutputPath = 'D:\DSCLocal' $cim = New-CimSession -ComputerName $computers