Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

DSC - File Provider

$
0
0

I can find plenty of examples that show the built-in File Resource using a remote share as the 'SourcePath', but I cant seem to make it work. Am I missing something?

File WebFiles
      {
         Ensure = "Present"
         Type = "Directory“
         Recurse = $true
         SourcePath = "\\DSC001\SetupFiles\inetpub" 
	 DestinationPath = "C:\inetpub"
         DependsOn = "[WindowsFeature]WebServerRole"
      }
the configuration always fails because the 'SourceName' location isn't valid.


SourcePath must be specified if you want to configure the destination directory recursively. Make sure that SourcePath is a directory and that it is accessible.+ CategoryInfo          : InvalidArgument: (:) [], CimException+ FullyQualifiedErrorId : MI RESULT 4+ PSComputerName        : 2008R2IISTEST01


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>