question

fja-9602 avatar image
0 Votes"
fja-9602 asked YoungYang-MSFT answered

PowerShell DSC - Unable To Access a Share using Script Resource

Hi,

I am looking to set up a DSC Script to download some files from a network share and unzip them to a location on the remote node.

I cannot get the script to work, I have granted the correct permissions to the share, the receiving node has Full Control to the share, here is my script




 Configuration ScriptTest
 {
     Import-DscResource -ModuleName 'PSDesiredStateConfiguration'
    
     Node Node1
     {
         Script ScriptExample
    
         {
             SetScript = {Expand-Archive -Path \\node0\reposhare\example.zip -DestinationPath c:\repos -Verbose}
              
             TestScript = { Do Nothing }
             GetScript = { Do Nothing }
         }
     }
 }
    
 ScriptTest -OutputPath C:\DSC
    
 Start-DscConfiguration -Path C:\DSC -Verbose

I am running this from Node0 (control node as-well as where the share lies).

So basically, i want to run this script which then pulls the files across to the local machine and i cannot get it working!

Help please!

windows-server-powershellwindows-server-management
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

YoungYang-MSFT avatar image
0 Votes"
YoungYang-MSFT answered

Accroding to this question, we are still looking for useful information and will recover you as soon as possible.
If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.