Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Ensure-DscResource and DSC Resource with embedded subclass
-
Hi, how can I use Ensure-DscResource with a resource containing embedded subclass e.g. https://github.com/dsccommunity/cNtfsAccessControl. Can you please give some examples?
-
Hello
Here is two exemple :
- one with Carbon module (http://get-carbon.org)
- One wit h xSmbshare (From Pwershll Gallery)
I assumed you have install the module
Ensure-DscResource ( ConfigurationKey: Identity, Name: Carbon_Permission, Module: Carbon, Properties: %(Path:$DFSFolder,Identity:$Mydomain\$MyGroup,Permission:FullControl) ); Ensure-DscResource ( Name: xSmbShare, Module: xSmbShare, Properties: %(Name:$ShareFolder,Path:$FoldertoShare,ReadAccess:$Mydomain\$MyGroup,FolderEnumerationMode:AccessBased,CachingMode:None) );
The Carbon example use as ConfigurationKey the property Identity while in the xSmbShare, the configuraitonKey is the default property (ie, Name)
I hope to not make a mistake and it will be useful.
Best Regards
PhilippeC.