diff --git a/DSCResources/MSFT_SqlServerLogin/MSFT_SqlServerLogin.psm1 b/DSCResources/MSFT_SqlServerLogin/MSFT_SqlServerLogin.psm1 index fd8f30d8f..c327d92e3 100644 --- a/DSCResources/MSFT_SqlServerLogin/MSFT_SqlServerLogin.psm1 +++ b/DSCResources/MSFT_SqlServerLogin/MSFT_SqlServerLogin.psm1 @@ -381,7 +381,7 @@ function Test-TargetResource $testPassed = $false } - if ( $Ensure -eq 'Present' ) + if ( $Ensure -eq 'Present' -and $($loginInfo.Ensure) -ne 'Absent' ) { if ( $LoginType -ne $loginInfo.LoginType ) {