Running script (.cmd) or exe under user context using DSC

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 10 months, 1 week ago.

  • Author
  • #57025



    We are trying to install Windows 10 ADK under user context. We performed following steps:
    1. Created self signed certificate for Target Node and Authoring Node on Target Node(referred

    2. Ran following script to install ADK, but ADK keeps on installing under system context when checked in task manager on target node.
    I checked the mof file created and it shows credential=NULL.
    Please guide of we are missing on anything.

    Configuration MyConfiguration

    Import-DscResource -ModuleName PSDesiredStateConfiguration

    Node $AllNodes.NodeName
    Script ADK10
    SetScript = {& \\UNCPATH\ADK10.cmd}
    TestScript = {$False}
    GetScript = {# Do Nothing}
    Credential = $credential
    CertificateID = '3F6609C3FB9E8BC141F04C9EB07186E346DD64AA'
    $cd = @{
    AllNodes = @(
    NodeName = "TargetServerName"
    PSDscAllowDomainUser = $true
    CertificateFile = 'Path to public key certificate'
    Thumbprint = '3F6609C3FB9E8BC141F04C9EB07186E346DD64AA'
    MyConfiguration -ConfigurationData $Cd -OutputPath "\\UNCPath\Test3"
    Set-DscLocalConfigurationManager -Path "\\UNCPath\Test3" -Force -Verbose
    Start-DscConfiguration -Path "\\UNCPath\Test3" -Wait -Verbose -force

  • #57536

    Don Jones

    Again, this is really an ADK thing, not PowerShell – it's something you might need to take up with Microsoft Product Support.

You must be logged in to reply to this topic.