Creating a DSC Configuration error

Welcome Forums General PowerShell Q&A Creating a DSC Configuration error

This topic contains 2 replies, has 2 voices, and was last updated by

1 year, 9 months ago.

  • Author
  • #72073

    Points: 0
    Rank: Member

    Configuration SetFileFolder
    Import-DscResource -ModuleName 'PSDesiredStateConfiguration'
    Node @('C10')
    File LogFiles
    SourcePath = "C:\fso"
    DestinationPath = "C:\scripts"
    Ensure = "present"
    Type = "Directory"
    Recurse = $true }

    Here is the error:
    File C:\Users\Vester\Documents\IT 385\Untitled5.ps1 cannot be loaded. The file C:\Users\Vester\Documents\IT 385\Untitled5.ps1 is not digitally signed. You cannot run this script on the
    current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at
    + CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnauthorizedAccess

    WindowsProcess notepad
    DependsOn = "[File]Logfiles"
    Arguments = "text.txt"
    Path = "notepad.exe"
    Ensure = "Present"
    } }
    SetFileFolder -output C:\Exercise21
    Start-DscConfiguration -Path C:\Exercise21 -Verbose -Wait -Force

  • #72091

    Points: 0
    Rank: Member

    Can you run other .ps1 files without a signature in the script from your workstation?

    Your error says that the script is not digitally signed, so you have a restricted execution policy.

    Here's a good article by Don Jones, might be a bit old though. Article

  • #72152

    Points: 0
    Rank: Member

    Hey Thanks

The topic ‘Creating a DSC Configuration error’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort