Categories
Archive
![]() Blogroll
|
Posted in Hosting & IIS7, Windows Powershell, Windows Server | No Comment | 1,793 views | 27/02/2010 15:51
You can assign a domain user called FABRIKAM\user_yusufozturk.info to a directory with Powershell: $LogDir = "C:\inetpub\yusufozturk" $Account = New-Object System.Security.Principal.Ntaccount("FABRIKAM\user_yusufozturk.info") $ACL = Get-Acl -Path "$LogDir" $ACL.SetAccessRuleProtection($True, $True) Set-Acl -Path "$LogDir" -AclObject $ACL $Permission = "$Account","Modify","ContainerInherit,ObjectInherit","None","Allow" $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $Permission $ACL.SetAccessRule($AccessRule) $ACL | Set-Acl "$LogDir" You can change Inherit Settings with changing “ObjectInherit”.
Posted in Hosting & IIS7, Windows Powershell, Windows Server | No Comment | 2,073 views | 27/02/2010 15:48
You can assign a domain user called FABRIKAM\user_yusufozturk.info to a directory with Powershell: $LogDir = "C:\inetpub\yusufozturk" $Account = New-Object System.Security.Principal.Ntaccount("FABRIKAM\user_yusufozturk.info") $ACL = Get-Acl -Path "$LogDir" $ACL.SetAccessRuleProtection($True, $True) Set-Acl -Path "$LogDir" -AclObject $ACL $Permission = "$Account","ReadAndExecute","ContainerInherit,ObjectInherit","None","Allow" $AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $Permission $ACL.SetAccessRule($AccessRule) $ACL | Set-Acl "$LogDir" You can change Inherit Settings with changing “ObjectInherit”. |