Skip to content

Commit 63a5e44

Browse files
committed
Update verbose messages for New-SqlDscLogin to clarify login creation process
1 parent 6b250ce commit 63a5e44

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

source/Public/New-SqlDscLogin.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,12 @@ function New-SqlDscLogin
225225
)
226226
}
227227

228-
$verboseDescriptionMessage = $script:localizedData.Login_Add_ShouldProcessVerboseDescription -f $Name, $ServerObject.InstanceName
228+
$verboseDescriptionMessage = $script:localizedData.Login_Add_ShouldProcessVerboseDescription -f $Name, $loginType, $ServerObject.InstanceName
229229
$verboseWarningMessage = $script:localizedData.Login_Add_ShouldProcessVerboseWarning -f $Name
230230
$captionMessage = $script:localizedData.Login_Add_ShouldProcessCaption
231231

232232
if ($PSCmdlet.ShouldProcess($verboseDescriptionMessage, $verboseWarningMessage, $captionMessage))
233233
{
234-
Write-Verbose -Message ($script:localizedData.Login_Add_CreatingLogin -f $Name, $loginType)
235-
236234
# Create the login object
237235
$loginObject = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Login -ArgumentList $ServerObject, $Name
238236

source/en-US/SqlServerDsc.strings.psd1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,10 @@ ConvertFrom-StringData @'
242242
Assert_Login_LoginExists = The principal '{0}' exists as a login.
243243
244244
## New-SqlDscLogin
245-
Login_Add_ShouldProcessVerboseDescription = Adding the login '{0}' on the instance '{1}'.
246-
Login_Add_ShouldProcessVerboseWarning = Are you sure you want to add the login '{0}'?
245+
Login_Add_ShouldProcessVerboseDescription = Creating the login '{0}' of type '{1}' on the instance '{2}'.
246+
Login_Add_ShouldProcessVerboseWarning = Are you sure you want to create the login '{0}'?
247247
# This string shall not end with full stop (.) since it is used as a title of ShouldProcess messages.
248-
Login_Add_ShouldProcessCaption = Add login on instance
249-
Login_Add_CreatingLogin = Creating login '{0}' of type '{1}'.
248+
Login_Add_ShouldProcessCaption = Create login on instance
250249
Login_Add_LoginCreated = Successfully created login '{0}' on the instance '{1}'.
251250
Login_Add_LoginAlreadyExists = The login '{0}' already exists on the instance '{1}'.
252251
'@

0 commit comments

Comments
 (0)