@@ -368,7 +368,7 @@ function Invoke-DscOperation {
368368 $validateProperty | Write-DscTrace - Operation Debug
369369 if ($validateProperty.PropertyType -eq ' [PSCredential]' ) {
370370 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
372372 exit 1
373373 }
374374 $property .$ ($_.Name ) = [System.Management.Automation.PSCredential ]::new($_.Value.Username , (ConvertTo-SecureString - AsPlainText $_.Value.Password - Force))
@@ -418,7 +418,7 @@ function Invoke-DscOperation {
418418 $validateProperty = $cachedDscResourceInfo.Properties | Where-Object - Property Name -EQ $_.Name
419419 if ($validateProperty.PropertyType -eq ' [PSCredential]' ) {
420420 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
422422 exit 1
423423 }
424424 $dscResourceInstance .$ ($_.Name ) = [System.Management.Automation.PSCredential ]::new($_.Value.Username , (ConvertTo-SecureString - AsPlainText $_.Value.Password - Force))
@@ -476,7 +476,7 @@ function Invoke-DscOperation {
476476 $validateProperty = $cachedDscResourceInfo.Properties | Where-Object - Property Name -EQ $_.Name
477477 if ($validateProperty.PropertyType -eq ' [PSCredential]' ) {
478478 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
480480 exit 1
481481 }
482482 $property .$ ($_.Name ) = [System.Management.Automation.PSCredential ]::new($_.Value.Username , (ConvertTo-SecureString - AsPlainText $_.Value.Password - Force))
0 commit comments