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

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

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???