The xSmbShare resource included in the DSC Resource Kit doesn't appear to be supported in Windows Server 2008 R2 as it uses the SmbShare module which comes with WS 2012, and now WS 2008 R2. Can someone confirm that I am correct about this?
If I am correct, as I need to be able to create shares on WS2008 R2, any suggestions on how to go about building a custom DSC resource for this?
I'm struggling with the same thing. I need to create a share on a Windows 7 machine, so xSmbShare will not work for me. You can use the "net share" command to do this, but I can't figure out how to make the command idempotent.
This works great the first time I run it, but it fails the second time (because the share already exists so net share returns an error code).
Path = "C:\windows\System32\net.exe"
Arguments = "share TestShare=c:\testshare /GRANT:username,FULL"
Ensure = "Present"
The topic ‘xSmbShare resource on Windows Server 2008 R2’ is closed to new replies.