I am trying to set the permissions on a folder using the below code, However i get this error :-
Cannot find an overload for "FileSystemAccessRule" and the argument count: "6".
Functin kozos_Permission($Server) { $FolderLocation = "C:\inetpub\ftproot\kozos" $GroupToBeAdded = "$Server\administrators" $acl = Get-Acl -Path $FolderLocation $User = [System.Security.Principal.NTAccount]$GroupToBeAdded $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($User, "FullControl","ContainerInherit", "ObjectInherit", "None", "Allow") $acl.AddAccessRule($AccessRule) set-acl -Path $FolderLocation -AclObject $acl } kozos_Permission localhost