PowerShell DSC copy from network share

The DSC Local Configuration Manager runs as the local SYSTEM account, not your user account. It therefore won’t be able to access network resources unless it is given explicit permissions.

There are two possible situations. Either the share is on the same machine as the DSC configuration is being applied to (let’s call this machine A) or the share is on a different machine (let’s call this machine B).

If the share is on machine A, READ permissions need to be granted to the SYSTEM user. For example:

net share SomeShare=C:\SomeShare /GRANT:"NT AUTHORITY\SYSTEM",READ

If the share is on machine B, READ permissions need to be granted to the computer account of machine A. For example:

net share SomeShare=C:\SomeShare /GRANT:DOMAIN\MachineA$,READ

Source: http://www.powershellmagazine.com/2013/09/02/copying-powershell-modules-and-custom-dsc-resources-using-dsc/

Leave a Comment