Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

help with setting share permissions.

$
0
0

Hi there, I'm hoping some one can help me figure this out. I need to set the permission of a share folder. I want to set everyone to Full Access, but my code set the permissions on the security tab instead. has anyone done this before that can help. 

the code I'm using. 

 

$acl = Get-Acl -Path $FolderPath

$permission = 'Everyone', 'FullControl', 'ContainerInherit, ObjectInherit', 'None', 'Allow'

$rule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $permission

$acl.SetAccessRule($rule)

 

I want the results to be as the picture below. Thanks in advanced. 


Viewing all articles
Browse latest Browse all 6937

Trending Articles