powershell - How to add a user in a folder security tab -



powershell - How to add a user in a folder security tab -

hi have shared folder on have given next permissions

net share $networksharepath '/grant:administrators,full' '/grant:iis_iusrs,full' | out-null

but creates user on shared permission tab add together iis user in security tab dont have clue how that

$networkshare_name = 'media' $networkshare_path = 'media=c:\_projects\mediafolder' net share $networksharepath '/grant:administrators,full' '/grant:iis_iusrs,full' | out-null $acl = get-acl $networksharepath $rule = new-object system.security.accesscontrol.filesystemaccessrule("iis_iusrs","fullcontrol", "containerinherit,objectinherit", "none", "allow") $acl.addaccessrule($rule) set-acl $networksharepath $acl

still no luck this

$folder = "c:\_projects\mediafolder" $acl = get-acl $folder $permission = "iis_iusrs","fullcontrol","allow" $rule = new-object system.security.accesscontrol.filesystemaccessrule $permission $acl.addaccessrule($rule) set-acl $folder $acl

$acl = get-acl $networksharepath $rule = new-object system.security.accesscontrol.filesystemaccessrule("administrators","fullcontrol", "containerinherit, objectinherit", "none", "allow") $acl.addaccessrule($rule) set-acl $networksharepath $acl

powershell

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -