From 38c493a3ef684e76f530de528eb3e05586d3e4b5 Mon Sep 17 00:00:00 2001 From: Chrissy LeMaire Date: Fri, 22 Mar 2019 12:07:22 +0100 Subject: [PATCH] fixes #5199 (#5282) --- functions/Get-DbaSpConfigure.ps1 | 3 ++- functions/Set-DbaSpConfigure.ps1 | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/functions/Get-DbaSpConfigure.ps1 b/functions/Get-DbaSpConfigure.ps1 index a33bbcc1de..379f661420 100644 --- a/functions/Get-DbaSpConfigure.ps1 +++ b/functions/Get-DbaSpConfigure.ps1 @@ -222,7 +222,8 @@ function Get-DbaSpConfigure { IsRunningDefaultValue = $isDefault Parent = $server ConfigName = ($smoName).$DisplayName - } | Select-DefaultView -ExcludeProperty ServerName, Parent, ConfigName + Property = $prop + } | Select-DefaultView -ExcludeProperty ServerName, Parent, ConfigName, Property } } } diff --git a/functions/Set-DbaSpConfigure.ps1 b/functions/Set-DbaSpConfigure.ps1 index ed9556636b..e060d783e8 100644 --- a/functions/Set-DbaSpConfigure.ps1 +++ b/functions/Set-DbaSpConfigure.ps1 @@ -78,8 +78,7 @@ function Set-DbaSpConfigure { [string[]]$Name, [parameter(ValueFromPipeline)] [object[]]$InputObject, - [switch][Alias('Silent')] - $EnableException + [switch]$EnableException ) process { foreach ($instance in $SqlInstance) { @@ -107,7 +106,7 @@ function Set-DbaSpConfigure { If ($Pscmdlet.ShouldProcess($SqlInstance, "Adjusting server configuration $configuration from $currentConfigValue to $value.")) { try { - $server.Configuration.$configuration.ConfigValue = $value + $configobject.Property.ConfigValue = $value $server.Configuration.Alter() [pscustomobject]@{