Fix Get-DscConfiguration for Registry

This commit is contained in:
Katie Keim
2017-03-07 11:29:52 -08:00
parent b8a9a0c88b
commit 16a8697816
2 changed files with 4 additions and 4 deletions
@@ -66,6 +66,9 @@ function Get-TargetResource
$registryResource = @{
Key = $Key
Ensure = 'Absent'
ValueName = $null
ValueType = $null
ValueData = $null
}
# Retrieve the registry key at the specified path
@@ -104,7 +107,7 @@ function Get-TargetResource
$actualValueType = Get-RegistryKeyValueType -RegistryKey $registryKey -RegistryKeyValueName $ValueName
# If the registry key value exists, convert it to a readable string
$registryKeyValueAsReadableString = ConvertTo-ReadableString -RegistryKeyValue $registryKeyValue -RegistryKeyValueType $actualValueType
$registryKeyValueAsReadableString = @() + (ConvertTo-ReadableString -RegistryKeyValue $registryKeyValue -RegistryKeyValueType $actualValueType)
$registryResource['Ensure'] = 'Present'
$registryResource['ValueType'] = $actualValueType
@@ -24,8 +24,6 @@ $script:testEnvironment = Enter-DscResourceTestEnvironment `
-DscResourceName 'MSFT_RegistryResource' `
-TestType 'Integration'
$VerbosePreference = 'Continue'
try
{
Describe 'Registry End to End Tests' {
@@ -353,7 +351,6 @@ try
}
finally
{
$VerbosePreference = 'SilentlyContinue'
Exit-DscResourceTestEnvironment -TestEnvironment $script:testEnvironment
}