51
14 – rasm. 3-command
Fayl yoki jildga ruxsatnomalarni olib tashlash:
Ushbu
ruxsatlarni
qo'shgandan
so'ng,
biz
bunga
qaror
qildik TestUser1 ga ruxsat bermaslik kerak Test1.txt fayl.
Qoidani olib
tashlashdagi
farq
shundaki,
biz
aniq
qayta
yaratishimiz
kerak FileSystemAccessRule biz olib tashlamoqchimiz.
Bu qanday ruxsatni
olib tashlash haqida noaniqlikni olib tashlaydigan ruxsatlarni olib tashlashning
aniq vositasi. Biz bunga ruxsatni qanday qo'shganimizga juda yaqinlashamiz.
$ ACL = Get-ACL -Path "Test1.txt" $ AccessRule = New-Object
System.Security.AccessControl.FileSystemAccessRule ("TestUser1", "Read", "Allow") $
ACL.RemoveAccessRule ($ AccessRule) $ ACL | Set-Acl -Path "Test1.txt" (Get-ACL -Path
"Test1.txt"). Kirish | Format-Table IdentityReference, FileSystemRights, AccessControlType,
IsInherited, InheritanceFlags -AutoSize
15 – rasm. 4-command
Yuqorida ko'rib turganingizdek, biz olib tashladik read ushbu ob'ektdan
ruxsat. The synchronize ruxsat - bu operatsion tizim tomonidan fayl va papka
ruxsatlari ustidan to'g'ri nazoratni ta'minlash
uchun foydalanadigan maxsus
ruxsat.