From 62f7e924a055e710e336990808239db7faedba1b Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Sun, 24 Dec 2017 12:27:30 +0100 Subject: [PATCH] SqlServiceAccount: Parameter RestartService more descriptive (#962) - Changes to SqlServiceAccount - Made the description of parameter RestartService more descriptive (issue #960). --- CHANGELOG.md | 2 ++ .../MSFT_SqlServiceAccount/MSFT_SqlServiceAccount.psm1 | 6 ++++-- .../MSFT_SqlServiceAccount.schema.mof | 2 +- .../1-ConfigureServiceAccount-UserAccount.ps1 | 2 +- .../2-ConfigureServiceAccount-VirtualAccount.ps1 | 6 +++--- README.md | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8d212900..d0853938d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ - Changes to SqlServiceAccount - Default services are now properly detected ([issue #930](https://github.com/PowerShell/SqlServerDsc/issues/930)). + - Made the description of parameter RestartService more descriptive + ([issue #960](https://github.com/PowerShell/SqlServerDsc/issues/960)). ## 10.0.0.0 diff --git a/DSCResources/MSFT_SqlServiceAccount/MSFT_SqlServiceAccount.psm1 b/DSCResources/MSFT_SqlServiceAccount/MSFT_SqlServiceAccount.psm1 index 16ad7dcba..e835cce86 100644 --- a/DSCResources/MSFT_SqlServiceAccount/MSFT_SqlServiceAccount.psm1 +++ b/DSCResources/MSFT_SqlServiceAccount/MSFT_SqlServiceAccount.psm1 @@ -92,7 +92,8 @@ function Get-TargetResource Credential of the service account that should be used. .PARAMETER RestartService - Determines whether the service is automatically restarted. + Determines whether the service is automatically restarted when a change + to the configuration was needed. .PARAMETER Force Forces the service account to be updated. @@ -164,7 +165,8 @@ function Test-TargetResource Credential of the service account that should be used. .PARAMETER RestartService - Determines whether the service is automatically restarted. + Determines whether the service is automatically restarted when a change + to the configuration was needed. .PARAMETER Force Forces the service account to be updated. diff --git a/DSCResources/MSFT_SqlServiceAccount/MSFT_SqlServiceAccount.schema.mof b/DSCResources/MSFT_SqlServiceAccount/MSFT_SqlServiceAccount.schema.mof index a19f16a84..3be1e26c4 100644 --- a/DSCResources/MSFT_SqlServiceAccount/MSFT_SqlServiceAccount.schema.mof +++ b/DSCResources/MSFT_SqlServiceAccount/MSFT_SqlServiceAccount.schema.mof @@ -5,6 +5,6 @@ class MSFT_SqlServiceAccount : OMI_BaseResource [Key, Description("Name of the SQL instance.")] String InstanceName; [Key, Description("Type of service being managed."), ValueMap {"DatabaseEngine","SQLServerAgent","Search","IntegrationServices","AnalysisServices","ReportingServices","SQLServerBrowser","NotificationServices"}, Values {"DatabaseEngine","SQLServerAgent","Search","IntegrationServices","AnalysisServices","ReportingServices","SQLServerBrowser","NotificationServices"}] String ServiceType; [Required, EmbeddedInstance("MSFT_Credential"), Description("The service account that should be used when running the service.")] String ServiceAccount; - [Write, Description("Determines whether the service is automatically restarted.")] Boolean RestartService; + [Write, Description("Determines whether the service is automatically restarted when a change to the configuration was needed.")] Boolean RestartService; [Write, Description("Forces the service account to be updated. Useful for password changes.")] Boolean Force; }; diff --git a/Examples/Resources/SqlServiceAccount/1-ConfigureServiceAccount-UserAccount.ps1 b/Examples/Resources/SqlServiceAccount/1-ConfigureServiceAccount-UserAccount.ps1 index e1459f217..9c48e84e2 100644 --- a/Examples/Resources/SqlServiceAccount/1-ConfigureServiceAccount-UserAccount.ps1 +++ b/Examples/Resources/SqlServiceAccount/1-ConfigureServiceAccount-UserAccount.ps1 @@ -15,7 +15,7 @@ Configuration Example Import-DscResource -ModuleName SqlServerDsc Node localhost { - SqlServiceAccount SetServiceAcccount_User + SqlServiceAccount SetServiceAccount_User { ServerName = 'TestServer' InstanceName = 'MSSQLSERVER' diff --git a/Examples/Resources/SqlServiceAccount/2-ConfigureServiceAccount-VirtualAccount.ps1 b/Examples/Resources/SqlServiceAccount/2-ConfigureServiceAccount-VirtualAccount.ps1 index d74b11b8b..4a4e6f5c0 100644 --- a/Examples/Resources/SqlServiceAccount/2-ConfigureServiceAccount-VirtualAccount.ps1 +++ b/Examples/Resources/SqlServiceAccount/2-ConfigureServiceAccount-VirtualAccount.ps1 @@ -12,18 +12,18 @@ Configuration Example param( [Parameter(Mandatory = $true)] [PSCredential] - $ServiceAcccountCredential + $ServiceAccountCredential ) Import-DscResource -ModuleName SqlServerDsc Node localhost { - SqlServiceAccount SetServiceAcccount_User + SqlServiceAccount SetServiceAccount_User { ServerName = 'TestServer' InstanceName = 'DSC' ServiceType = 'DatabaseEngine' - ServiceAccount = $ServiceAcccountCredential + ServiceAccount = $ServiceAccountCredential RestartService = $true Force = $true } diff --git a/README.md b/README.md index 21c9ed5b6..150cb89cd 100644 --- a/README.md +++ b/README.md @@ -1254,7 +1254,7 @@ Manage the service account for SQL Server services. * **`[PSCredential]` ServiceAccount** (Required): The service account that should be used when running the service. * **`[Boolean]` RestartService** (Write): Determines whether the service is - automatically restarted. + automatically restarted when a change to the configuration was needed. * **`[Boolean]` Force** (Write): Forces the service account to be updated. Useful for password changes. This will cause `Set-TargetResource` to be run on each consecutive run.