magnify
Home Posts tagged "folder"
formats

Bir dizinde (folder) everyone için auditing’i aktif eden örnek PowerShell scripti

Tarih 13 Ocak 2010 yazar içinde IpUcu

$computer = gc env:computername $path = “C:\New Folder” $user = “everyone” $path = $path.replace(“\”, “\\”) $SD = ([WMIClass] “Win32_SecurityDescriptor”).CreateInstance() $ace = ([WMIClass] “Win32_ace”).CreateInstance() $Trustee = ([WMIClass] “Win32_Trustee”).CreateInstance() $SID = (new-object security.principal.ntaccount $user).translate([security.principal.securityidentifier]) [byte[]] $SIDArray = ,0 * $SID.BinaryLength $SID.GetBinaryForm($SIDArray,0) $Trustee.Name = $user $Trustee.SID = $SIDArray $ace.AccessMask = [System.Security.AccessControl.FileSystemRights]”Modify” $ace.AceFlags = “0x67″ $ace.AceType = 2 $ace.Trustee

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
Bir dizinde (folder) everyone için auditing’i aktif eden örnek PowerShell scripti için yorumlar kapalı  comments 
© Hakan UZUNER - MCT- MVP - RD
credit