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