Error while executing .cmd file under user context using DSC

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 7 months, 2 weeks ago.

  • Author
  • #57028
    Profile photo of divya


    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

    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
    Import-DscResource -ModuleName PSDesiredStateConfiguration

    Node $AllNodes.NodeName
    Script ADK10
    SetScript = {& \\Server1\ADK10.cmd}
    TestScript = {$False}
    GetScript = {# Do Nothing}
    Credential = $credential
    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

  • #57535
    Profile photo of Don Jones
    Don Jones

    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.

You must be logged in to reply to this topic.