System.IO.FileInfo
Owner
[Security2.IdentityReference2]$this.GetAccessControl().GetOwner([System.Security.Principal.SecurityIdentifier])
IsInheritanceBlocked
$this.GetAccessControl([System.Security.AccessControl.AccessControlSections]::Access).AreAccessRulesProtected
LengthOnDisk
$driveInfo = New-Object NTFS.DriveInfoExt($this.PSDrive.Name + ":")
[Math]::Ceiling($this.Length / ($driveInfo.BytesPerSector * $driveInfo.SectorsPerCluster)) * ($driveInfo.BytesPerSector * $driveInfo.SectorsPerCluster)
Size
LengthOnDisk
EnableInheritance
DisableInheritance
GetHash
System.IO.DirectoryInfo
Owner
[Security2.IdentityReference2]$this.GetAccessControl().GetOwner([System.Security.Principal.SecurityIdentifier])
IsInheritanceBlocked
$this.GetAccessControl([System.Security.AccessControl.AccessControlSections]::Access).AreAccessRulesProtected
EnableInheritance
DisableInheritance
Security2.FileSystemAccessRule2
AccountType
if (-not [System.Security.Principal.WindowsIdentity]::GetCurrent().Name.ToLower().Contains([System.Environment]::MachineName.ToLower()))
{
try
{
([ADSI]"LDAP://<SID=$($this.Account.Sid)>").ObjectClass[-1]
}
catch
{
[string]::Empty
}
}