#Set permissions on a folder
Function Set-permission ($Folder,$Group,$Permission)
    {
        $ACL = Get-Acl $Folder
        $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($Group,$Permisson,"ContainerInherit,Objectinherit","none","Allow")
        $ACL.AddAccessRule($AccessRule)
        Set-Acl $Folder $ACL
    }