From bea7702d06f1bc7946d1d6a3a5598ffd8f631c68 Mon Sep 17 00:00:00 2001 From: Chris Hill <53898223+Borgquite@users.noreply.github.com> Date: Fri, 9 Feb 2024 12:52:51 +0000 Subject: [PATCH] Fix #702 - EffectiveTime is already a DateTime --- source/DSCResources/MSFT_ADKDSKey/MSFT_ADKDSKey.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/DSCResources/MSFT_ADKDSKey/MSFT_ADKDSKey.psm1 b/source/DSCResources/MSFT_ADKDSKey/MSFT_ADKDSKey.psm1 index 1760751e..5b11696a 100644 --- a/source/DSCResources/MSFT_ADKDSKey/MSFT_ADKDSKey.psm1 +++ b/source/DSCResources/MSFT_ADKDSKey/MSFT_ADKDSKey.psm1 @@ -107,7 +107,7 @@ function Get-TargetResource elseif ($kdsRootKey) { $targetResource['Ensure'] = 'Present' - $targetResource['EffectiveTime'] = ([DateTime]::Parse($kdsRootKey.EffectiveTime)).ToString() + $targetResource['EffectiveTime'] = $kdsRootKey.EffectiveTime.ToString() $targetResource['CreationTime'] = $kdsRootKey.CreationTime $targetResource['KeyId'] = $kdsRootKey.KeyId $targetResource['DistinguishedName'] = 'CN={0},CN=Master Root Keys,CN=Group Key Distribution Service,CN=Services,CN=Configuration,{1}' -f