Create Shortcuts in C:\Users\Public\Desktop - DSC Archive resource

Welcome Forums DSC (Desired State Configuration) Create Shortcuts in C:\Users\Public\Desktop - DSC Archive resource

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

 
Participant
1 week ago.

  • Author
    Posts
  • #129695

    Participant
    Points: 32
    Rank: Member

    Hi all

    I'm working on a DSC baseline config for our server systems. We use Azure Automation DSC as pull service. We have 3 shortscuts that we want to place in C:\Users\Public\Desktop, so those shortcuts are available to all users on the system.

    The shortcuts are within a zip file that is stored on a Azure Blob. We download the zip file with the xRemoteFile DSC resource to C:\Deploy. This works without problems so far.

    The problem is to use the DSC Archive resource to extract the 3 shortcuts into C:\Users\Public\Desktop

    The code I use so far is:

    $SMPackageLocalPath = "C:\Deploy\sysmgmt.zip"

    $PublicDesktop = "C:\Users\Public\Desktop"

    Archive ExtractSMzip {
    Ensure = "Present"
    Path = $SMPackageLocalPath
    Destination = $PublicDesktop
    Force = $true

    This is a partial output from get-dscconfiguration:

    ResourceId : [Archive]ExtractSMzip
    SourceInfo :
    Checksum :
    Credential :
    Destination : \Desktop
    Ensure : Present
    Force :
    Path : C:\Deploy\sysmgmt.zip

     

    The problem is, that no files are present in C:\Users\Public\Desktop.

    Any help would be very appreciated. Many thanks in advance.

    Cheers

    Fabio

  • #133371

    Participant
    Points: 98
    Helping Hand
    Rank: Member

    Hey Fabio,

    What can you see with the verbose output from DSC?
    Have you tried under another location to see if that works?
    DSDC runs under the system context and that might not have access????

You must be logged in to reply to this topic.