@@ -368,7 +368,7 @@ function Invoke-DscOperation {
368
368
$validateProperty | Write-DscTrace - Operation Debug
369
369
if ($validateProperty.PropertyType -eq ' [PSCredential]' ) {
370
370
if (-not $_.Value.Username -or -not $_.Value.Password ) {
371
- " The PSCredential property '$ ( $_.Name ) ' is missing required fields 'Username ' and 'Password' " | Write-DscTrace - Operation Error
371
+ " Credential object '$ ( $_.Name ) ' requires both 'username ' and 'password' properties " | Write-DscTrace - Operation Error
372
372
exit 1
373
373
}
374
374
$property .$ ($_.Name ) = [System.Management.Automation.PSCredential ]::new($_.Value.Username , (ConvertTo-SecureString - AsPlainText $_.Value.Password - Force))
@@ -418,7 +418,7 @@ function Invoke-DscOperation {
418
418
$validateProperty = $cachedDscResourceInfo.Properties | Where-Object - Property Name -EQ $_.Name
419
419
if ($validateProperty.PropertyType -eq ' [PSCredential]' ) {
420
420
if (-not $_.Value.Username -or -not $_.Value.Password ) {
421
- " The PSCredential property '$ ( $_.Name ) ' is missing required fields 'Username ' and 'Password' " | Write-DscTrace - Operation Error
421
+ " Credential object '$ ( $_.Name ) ' requires both 'username ' and 'password' properties " | Write-DscTrace - Operation Error
422
422
exit 1
423
423
}
424
424
$dscResourceInstance .$ ($_.Name ) = [System.Management.Automation.PSCredential ]::new($_.Value.Username , (ConvertTo-SecureString - AsPlainText $_.Value.Password - Force))
@@ -476,7 +476,7 @@ function Invoke-DscOperation {
476
476
$validateProperty = $cachedDscResourceInfo.Properties | Where-Object - Property Name -EQ $_.Name
477
477
if ($validateProperty.PropertyType -eq ' [PSCredential]' ) {
478
478
if (-not $_.Value.Username -or -not $_.Value.Password ) {
479
- " The PSCredential property '$ ( $_.Name ) ' is missing required fields 'Username ' and 'Password' " | Write-DscTrace - Operation Error
479
+ " Credential object '$ ( $_.Name ) ' requires both 'username ' and 'password' properties " | Write-DscTrace - Operation Error
480
480
exit 1
481
481
}
482
482
$property .$ ($_.Name ) = [System.Management.Automation.PSCredential ]::new($_.Value.Username , (ConvertTo-SecureString - AsPlainText $_.Value.Password - Force))
0 commit comments