Error while executing .cmd file under user context using DSC

Hello,

We are installing Windows 10 ADK using user context. For this we created certificated on target node and imported public key on Authoring node using link https://msdn.microsoft.com/en-us/powershell/dsc/secureMOF.

We created and ran following script on authoring node, but when we run the script we get following error:
“Script ADK10.cmd threw non-terminating error when running Set-TargetResource functionality”
We checked the mof file created and it shows the password is encrypted.
Please help!!!

Configuration ADKTest
{
param(
[Parameter(Mandatory=$true)]
[ValidateNotNullorEmpty()]
[PsCredential]$credential
)
Import-DscResource -ModuleName PSDesiredStateConfiguration

Node $AllNodes.NodeName
{
    Script ADK10
    {
        SetScript = {& \\Server1\ADK10.cmd}
        TestScript = {$False}
        GetScript = {# Do Nothing}
        }
        Credential = $credential
    }
    LocalConfigurationManager
    {
    CertificateID = $Node.Thumbprint
    }
}                   

}

$ConfigData = @{
AllNodes = @(
@{
NodeName = ‘TargetNode’
PSDscAllowDomainUser = $true
#PsDscAllowPlainTextPassword = $false
CertificateFile = ‘Path of public certificate file’
Thumbprint = ‘3F6609C3FB9E8BC141F04C9EB07186E346DD64AA’
}
)
}

ADKTest -ConfigurationData $ConfigData -OutputPath “\Server1\Test2”
Set-DscLocalConfigurationManager -Path “\Server1\Test2” -Force -Verbose
Start-DscConfiguration -Path “\Server1\Test2” -Wait -Verbose -force

So, unfortunately “Script ADK10.cmd threw non-terminating error when running Set-TargetResource functionality” isn’t a very detailed error message - there’s nothing anyone over the Internet is going to be able to do to help you, with just that information. You’re going to have to troubleshoot the CMD script itself, which obviously isn’t PowerShell, but there’s no way from this end to tell you what’s wrong.