How can I set permission for a shared folder?
hello,
i want share folder , set permission shared folder.
i've shared folder. i used "net use z: \\server\folder" , "$shares=[wmiclass]"win32_share" $shares.create("\\server\folder","z:",0). both work expected.
now want set share permission shared folder. i've use cacls , get/set-acl. can set security permission folder, not sharing permission level.
is there cmdlet or other ways modify share permission?
thanks,
cyril
hi cyril,
to share file, recommend set ntfs permission instead of share permission second link posted, , can set ntfs permission cmdlet get/set-acl, more easy setting share permission cmd.
because access permission of shared file dependent on ntfs permission and share permission, set share permission everyone: full controll, can set cmd net share, , limit access permission setting ntfs permission.
best regards,
anna
Windows Server > Windows PowerShell
Comments
Post a Comment